Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit ab58233

Browse files
jyecuschdavemooreuws
authored andcommitted
Update secrets sequences
1 parent 6cf6fc6 commit ab58233

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed

docs/architecture/buckets.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ classDef edgeLabel line-height:2;
8787

8888
### Build Sequence
8989

90-
Below is a sequence diagram showing the sequence of events that occur when a developer registers a bucket with Nitric. Including, optionally registering event handlers for file change events.
90+
Below is the sequence of events that occur when a developer registers a bucket with Nitric. Including, optionally registering event handlers for file change events.
9191

9292
```mermaid
9393
sequenceDiagram
@@ -119,7 +119,7 @@ sequenceDiagram
119119

120120
### Runtime Sequence
121121

122-
Below is a sequence diagram showing the runtime flow of a storage operation in a Nitric application, using the Nitric SDK. The SDK forwards the request to the Nitric runtime, which converts the request and forwards it to the cloud storage API. The plugin nature of the Nitric runtime allows for seamless integration with different cloud providers.
122+
Below is the runtime flow of a storage operation in a Nitric application, using the Nitric SDK. The SDK forwards the request to the Nitric runtime, which converts the request and forwards it to the cloud storage API. The plugin nature of the Nitric runtime allows for seamless integration with different cloud providers.
123123

124124
```mermaid
125125
sequenceDiagram

docs/architecture/secrets.mdx

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,43 @@ classDef edgeLabel line-height:2;
7070

7171
## 2. Sequence
7272

73+
### Build Sequence
74+
75+
Below is the sequence of events that occur when a developer registers a secret with Nitric. This includes defining the secret and its access requirements, which are then provisioned by the Nitric provider using IaC.
76+
77+
```mermaid
78+
sequenceDiagram
79+
participant Worker as App Worker(s)
80+
participant SDK as Nitric SDK
81+
participant Nitric as Nitric CLI
82+
participant Provider as Nitric Provider <br> (plugin)
83+
participant IAC as IaC <br> (e.g. Terraform)
84+
85+
Worker->>SDK: Register Secret
86+
Worker->>SDK: Register Access Requirements
87+
SDK->>Nitric: Register Secret
88+
SDK->>Nitric: Register Access Requirements
89+
90+
Nitric->>Provider: Forward Nitric Spec
91+
Provider->>IAC: Provision Secret
92+
Provider->>IAC: Provision IAM
93+
```
94+
95+
### Runtime Sequence
96+
97+
Below is a sequence diagram showing the runtime flow of a secret operation in a Nitric application, using the Nitric SDK. The SDK forwards the request to the Nitric runtime, which converts the request and forwards it to the cloud secrets management API. The plugin nature of the Nitric runtime allows for seamless integration with different cloud providers.
98+
7399
```mermaid
74100
sequenceDiagram
75-
participant Client as Client
76-
participant NitricSDK as Nitric SDK
77-
participant NitricRuntime as Nitric Runtime
78-
participant SecretManager as Cloud Secret Manager (e.g., AWS Secrets Manager, GCP Secret Manager)
79-
80-
Client->>NitricSDK: Perform secret operation (e.g., get, set, delete)
81-
NitricSDK->>NitricRuntime: Forward secret API call
82-
NitricRuntime->>SecretManager: Execute secret operation
83-
84-
alt Successful Operation
85-
SecretManager-->>NitricRuntime: Return result (e.g., secret value, success status)
86-
NitricRuntime-->>NitricSDK: Return result
87-
NitricSDK-->>Client: Return result to client
88-
else Failure
89-
SecretManager-->>NitricRuntime: Return error
90-
NitricRuntime-->>NitricSDK: Forward error
91-
NitricSDK-->>Client: Return error response
92-
end
101+
participant Client as App Code
102+
participant SDK as Nitric SDK
103+
participant Nitric as Nitric Runtime <br> (plugin)
104+
participant CloudAPI as Secrets Management <br> (e.g. AWS Secrets Manager)
105+
106+
Client->>SDK: Access()
107+
SDK->>Nitric: Forward Request
108+
Nitric->>Nitric: Convert Request
109+
Nitric->>CloudAPI: Secrets Management Request
93110
```
94111

95112
## 3. Component

0 commit comments

Comments
 (0)