generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add documentation for the new process
Refs: #79
- Loading branch information
Showing
7 changed files
with
345 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# Create Wallet Process | ||
|
||
## Summary | ||
|
||
The create wallet process handles the creation of a wallet. The process steps are the following: | ||
|
||
```mermaid | ||
flowchart TD | ||
A((Start wallet creation process)) | ||
B(CREATE_WALLET) | ||
C(CHECK_OPERATION) | ||
D(GET_COMPANY) | ||
E(GET_DID_DOCUMENT) | ||
F(CREATE_STATUS_LIST) | ||
G(SEND_CALLBACK) | ||
H((Process completed)) | ||
I(RETRIGGER_CREATE_WALLET) | ||
J(RETRIGGER_CHECK_OPERATION) | ||
K(RETRIGGER_GET_COMPANY) | ||
L(RETRIGGER_GET_DID_DOCUMENT) | ||
M(RETRIGGER_CREATE_STATUS_LIST) | ||
N(RETRIGGER_SEND_CALLBACK) | ||
A--> B | ||
B -->|Success| C | ||
C -->|Success| D | ||
D -->|Success| E | ||
E -->|Success, if not issuer| G | ||
E -->|Success, if issuer| F | ||
F -->|Success| G | ||
G --> H | ||
B-->|Error| I | ||
C-->|Error| J | ||
D-->|Error| K | ||
E-->|Error| L | ||
F-->|Error| M | ||
G-->|Error| N | ||
I--> B | ||
J--> C | ||
K--> D | ||
L--> E | ||
M--> F | ||
N--> G | ||
``` | ||
|
||
## External dependencies | ||
|
||
The process worker communicates with the SAP Dim to create the wallet. It further more communicates with the portal backend to return the wallet data. | ||
|
||
## Process Steps | ||
|
||
### CREATE_WALLET | ||
|
||
The process step `CREATE_WALLET` is automatically triggered from the process worker. It sends a request to create the wallet to the SAP Dim. | ||
|
||
### CHECK_OPERATION | ||
|
||
The process step `CHECK_OPERATION` is automatically triggered from the process worker. It requests the status of the operation which is created in the `CREATE_WALLET` step. If the status is `completed` it takes the data of the wallet and saves it in the database. | ||
|
||
### GET_COMPANY | ||
|
||
The process step `GET_COMPANY` is automatically triggered from the process worker. It retrieves Did download url and company id and saves it to the database. | ||
|
||
Example did document: | ||
|
||
```json | ||
{ | ||
"@context": | ||
[ | ||
"https://www.w3.org/ns/did/v1", | ||
"https://w3id.org/security/suites/jws-2020/v1", | ||
], | ||
"id": "did:web:example.org:api:did:BPNL0000001TEST", | ||
"service": | ||
[ | ||
{ | ||
"type": "CredentialService", | ||
"serviceEndpoint": "https://dis-agent-prod.eu10.dim.cloud.sap/api/v1.0.0/iatp", | ||
"id": "did:web:example.org:api:did:BPNL0000001TEST#CredentialService", | ||
}, | ||
], | ||
"verificationMethod": | ||
[ | ||
{ | ||
"id": "did:web:example.org:api:did:BPNL0000001TEST#keys-1c55236c-f974-4c7e-bdd3-b667d0c2e1a4", | ||
"type": "JsonWebKey2020", | ||
"controller": "did:web:example.org:api:did:BPNL0000001TEST", | ||
"publicKeyJwk": | ||
{ | ||
"kty": "EC", | ||
"crv": "secp256k1", | ||
"x": "kxZJ_7xWDmRm6VX11Oi7JYYzicfme53whduBhpJSM_c", | ||
"y": "p47wM71fs0rBLM6la9eat6f1sIMtzbqOON0PG393rso", | ||
}, | ||
}, | ||
{ | ||
"id": "did:web:example.org:api:did:BPNL0000001TEST#keys-2a5052ac-dac7-47b4-842a-786efe60e8cb", | ||
"type": "JsonWebKey2020", | ||
"controller": "did:web:example.org:api:staticdata:did:BPNL0000001TEST", | ||
"publicKeyJwk": | ||
{ | ||
"kty": "EC", | ||
"crv": "secp256k1", | ||
"x": "AUHunkMYUecQfgrJUbksH83mRpcqHdhAdMEBP-Z0lTQ", | ||
"y": "68HOmlhB1gdfggV9AvMlbe4yfI-Ce6brV-ge6z-7shg", | ||
}, | ||
}, | ||
], | ||
"authentication": | ||
[ | ||
"did:web:example.org:api:did:BPNL0000001TEST#keys-1c55236c-f974-4c7e-bdd3-b667d0c2e1a4", | ||
], | ||
"assertionMethod": | ||
[ | ||
"did:web:example.org:api:did:BPNL0000001TEST#keys-2a5052ac-dac7-47b4-842a-786efe60e8cb", | ||
], | ||
"keyAgreement": [], | ||
} | ||
``` | ||
|
||
### GET_DID_DOCUMENT | ||
|
||
The process step `GET_DID_DOCUMENT` is automatically triggered from the process worker. It retrieves the did and saves it to the database. | ||
|
||
### CREATE_STATUS_LIST | ||
|
||
The process step `CREATE_STATUS_LIST` is automatically triggered from the process worker if the wallet is created for the issuer. It creates a status list. | ||
|
||
### SEND_CALLBACK | ||
|
||
The process step `SEND_CALLBACK` is automatically triggered from the process worker. It sends the wallet data, did and the did document to the portal backend. | ||
|
||
## Retrigger | ||
|
||
| Step Name | Retrigger Step | Retrigger Endpoint | | ||
| ------------------ | ---------------------------- | ------------------------------------------------------------------------------------------- | | ||
| CREATE_WALLET | RETRIGGER_CREATE_WALLET | api/dim/process/wallet/{processId}/retrigger?processStepTypeId=RETRIGGER_CREATE_WALLET | | ||
| CHECK_OPERATION | RETRIGGER_CHECK_OPERATION | api/dim/process/wallet/{processId}/retrigger?processStepTypeId=RETRIGGER_CHECK_OPERATION | | ||
| GET_COMPANY | RETRIGGER_GET_COMPANY | api/dim/process/wallet/{processId}/retrigger?processStepTypeId=RETRIGGER_GET_COMPANY | | ||
| GET_DID_DOCUMENT | RETRIGGER_GET_DID_DOCUMENT | api/dim/process/wallet/{processId}/retrigger?processStepTypeId=RETRIGGER_GET_DID_DOCUMENT | | ||
| CREATE_STATUS_LIST | RETRIGGER_CREATE_STATUS_LIST | api/dim/process/wallet/{processId}/retrigger?processStepTypeId=RETRIGGER_CREATE_STATUS_LIST | | ||
| SEND_CALLBACK | RETRIGGER_SEND_CALLBACK | api/dim/process/wallet/{processId}/retrigger?processStepTypeId=RETRIGGER_SEND_CALLBACK | | ||
|
||
## NOTICE | ||
|
||
This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). | ||
|
||
- SPDX-License-Identifier: Apache-2.0 | ||
- SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company, BMW Group AG and ssi-dim-middle-layer contributors | ||
- Source URL: https://github.com/SAP/ssi-dim-middle-layer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Create Technical User Process | ||
|
||
## Summary | ||
|
||
The create technical user process handles the creation of a technical user. The process steps are the following: | ||
|
||
```mermaid | ||
flowchart TD | ||
A((Start technical user creation process)) | ||
B(CREATE_TECHNICAL_USER) | ||
C(GET_TECHNICAL_USER_DATA) | ||
D(GET_TECHNICAL_USER_SERVICE_KEY) | ||
E(SEND_TECHNICAL_USER_CREATION_CALLBACK) | ||
F(RETRIGGER_CREATE_TECHNICAL_USER) | ||
G(RETRIGGER_GET_TECHNICAL_USER_DATA) | ||
H(RETRIGGER_GET_TECHNICAL_USER_SERVICE_KEY) | ||
I(RETRIGGER_SEND_TECHNICAL_USER_CREATION_CALLBACK) | ||
J((Process completed)) | ||
A --> B | ||
B -->|Success| C | ||
C -->|Success| D | ||
D -->|Success| E | ||
E -->|Success| J | ||
B-->|Error| F | ||
C-->|Error| G | ||
D-->|Error| H | ||
E-->|Error| I | ||
F--> B | ||
G--> C | ||
H--> D | ||
I--> E | ||
``` | ||
|
||
## External dependencies | ||
|
||
The process worker communicates with the SAP Dim to create the technical user. It further more communicates with the portal backend to return the technical user data. | ||
|
||
## Process Steps | ||
|
||
### CREATE_TECHNICAL_USER | ||
|
||
The process step `CREATE_TECHNICAL_USER` is automatically triggered from the process worker. It sends a request to create the technical user to the SAP Dim. | ||
|
||
### GET_TECHNICAL_USER_DATA | ||
|
||
The process step `GET_TECHNICAL_USER_DATA` is automatically triggered from the process worker. It requests the status of the operation which is created in the `CREATE_TECHNICAL_USER` step. If the status is `completed` it takes the data of the technical user and saves it in the database. | ||
|
||
### GET_TECHNICAL_USER_SERVICE_KEY | ||
|
||
The process step `GET_TECHNICAL_USER_SERVICE_KEY` is automatically triggered from the process worker. It retrieves the service key id which is the unique identifier of the technical user in the SAP Dim. | ||
|
||
### SEND_TECHNICAL_USER_CREATION_CALLBACK | ||
|
||
The process step `SEND_TECHNICAL_USER_CREATION_CALLBACK` is automatically triggered from the process worker. It sends the technical user details to the portal backend. | ||
|
||
## Retrigger | ||
|
||
| Step Name | Retrigger Step | Retrigger Endpoint | | ||
| ------------------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | ||
| CREATE_TECHNICAL_USER | RETRIGGER_CREATE_TECHNICAL_USER | api/dim/process/technicalUser/{processId}/retrigger?processStepTypeId=RETRIGGER_CREATE_TECHNICAL_USER | | ||
| GET_TECHNICAL_USER_DATA | RETRIGGER_GET_TECHNICAL_USER_DATA | api/dim/process/technicalUser/{processId}/retrigger?processStepTypeId=RETRIGGER_GET_TECHNICAL_USER_DATA | | ||
| GET_TECHNICAL_USER_SERVICE_KEY | RETRIGGER_GET_TECHNICAL_USER_SERVICE_KEY | api/dim/process/technicalUser/{processId}/retrigger?processStepTypeId=RETRIGGER_GET_TECHNICAL_USER_SERVICE_KEY | | ||
| SEND_TECHNICAL_USER_CREATION_CALLBACK | RETRIGGER_SEND_TECHNICAL_USER_CREATION_CALLBACK | api/dim/process/technicalUser/{processId}/retrigger?processStepTypeId=RETRIGGER_SEND_TECHNICAL_USER_CREATION_CALLBACK | | ||
|
||
## NOTICE | ||
|
||
This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). | ||
|
||
- SPDX-License-Identifier: Apache-2.0 | ||
- SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company, BMW Group AG and ssi-dim-middle-layer contributors | ||
- Source URL: https://github.com/SAP/ssi-dim-middle-layer |
Oops, something went wrong.