-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: #209
- Loading branch information
Showing
3 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
docs/technical-documentation/processes/01. create_credential.md
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,51 @@ | ||
# Create Credential Process | ||
|
||
## Summary | ||
|
||
The create credential process handles the creation of credentials. The process steps are the following: | ||
|
||
```mermaid | ||
flowchart TD | ||
A(CREATE_SIGNED_CREDENTIAL) --> B(SAVE_CREDENTIAL_DOCUMENT) | ||
B --> C(CREATE_CREDENTIAL_FOR_HOLDER) | ||
C --> D(TRIGGER_CALLBACK) | ||
``` | ||
|
||
## External dependencies | ||
|
||
The process worker communicates with the Issuer Wallet to revoke the credential. It further more communicates with the portal backend to create notifications and mails. | ||
|
||
## Process Steps | ||
|
||
### CREATE_SIGNED_CREDENTIAL | ||
|
||
The process step `CREATE_SIGNED_CREDENTIAL` is automatically triggered from the process worker. It calls the issuer wallet to create the requested credential. | ||
|
||
### SAVE_CREDENTIAL_DOCUMENT | ||
|
||
The process step `SAVE_CREDENTIAL_DOCUMENT` is automatically triggered from the process worker. Calls the issuer wallet to get the created credential to save it in the `documents` table. | ||
|
||
### CREATE_CREDENTIAL_FOR_HOLDER | ||
|
||
The process step `CREATE_CREDENTIAL_FOR_HOLDER` is automatically triggered from the process worker. If the wallet address is equal to the issuer wallet this step is skipped. Otherwise the created credential is imported to the holder wallet. | ||
|
||
### TRIGGER_CALLBACK | ||
|
||
The process step `TRIGGER_CALLBACK` is automatically triggered from the process worker. Posts a callback to the portal with a status of the credential creation. | ||
|
||
## Retrigger | ||
|
||
| Step Name | Retrigger Step | Retrigger Endpoint | | ||
|------------------------------|----------------------------------------|------------------------------------------------------------------------------| | ||
| CREATE_SIGNED_CREDENTIAL | RETRIGGER_CREATE_SIGNED_CREDENTIAL | api/issuer/{processId}/retrigger-step/RETRIGGER_CREATE_SIGNED_CREDENTIAL | | ||
| SAVE_CREDENTIAL_DOCUMENT | RETRIGGER_SAVE_CREDENTIAL_DOCUMENT | api/issuer/{processId}/retrigger-step/RETRIGGER_SAVE_CREDENTIAL_DOCUMENT | | ||
| CREATE_CREDENTIAL_FOR_HOLDER | RETRIGGER_CREATE_CREDENTIAL_FOR_HOLDER | api/issuer/{processId}/retrigger-step/RETRIGGER_CREATE_CREDENTIAL_FOR_HOLDER | | ||
| TRIGGER_CALLBACK | RETRIGGER_TRIGGER_CALLBACK | api/issuer/{processId}/retrigger-step/RETRIGGER_TRIGGER_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 Contributors to the Eclipse Foundation | ||
- Source URL: https://github.com/eclipse-tractusx/ssi-credential-issuer |
45 changes: 45 additions & 0 deletions
45
docs/technical-documentation/processes/02. delete_credential.md
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,45 @@ | ||
# Delete Credential Process | ||
|
||
## Summary | ||
|
||
The delete credential process handles the revocation of existing credentials. The process steps are the following: | ||
|
||
```mermaid | ||
flowchart TD | ||
A(REVOKE_CREDENTIAL) --> B(TRIGGER_NOTIFICATION) | ||
B --> C(TRIGGER_MAIL) | ||
``` | ||
|
||
## External dependencies | ||
|
||
The process worker communicates with the Issuer Wallet to revoke the credential. It further more communicates with the portal backend to create notifications and mails. | ||
|
||
## Process Steps | ||
|
||
### REVOKE_CREDENTIAL | ||
|
||
The process step `REVOKE_CREDENTIAL` is automatically triggered from the process worker. It revokes the credential in the wallet and sets the state of the document to inactive and the status of the ssi details to revoked. | ||
|
||
### TRIGGER_NOTIFICATION | ||
|
||
The process step `TRIGGER_NOTIFICATION` is automatically triggered from the process worker. It will create a notification for the requester of the credential via the portal. | ||
|
||
### TRIGGER_MAIL | ||
|
||
The process step `TRIGGER_MAIL` is automatically triggered from the process worker. It will create a mail for the requester of the credential via the portal. | ||
|
||
## Retrigger | ||
|
||
| Step Name | Retrigger Step | Retrigger Endpoint | | ||
|----------------------|---------------------------------| ------------------------------------------------------------------------ | | ||
| REVOKE_CREDENTIAL | RETRIGGER_REVOKE_CREDENTIAL | api/revocation/{processId}/retrigger-step/RETRIGGER_REVOKE_CREDENTIAL | | ||
| TRIGGER_NOTIFICATION | RETRIGGER_TRIGGER_NOTIFICATION | api/revocation/{processId}/retrigger-step/RETRIGGER_TRIGGER_NOTIFICATION | | ||
| TRIGGER_MAIL | RETRIGGER_TRIGGER_MAIL | api/revocation/{processId}/retrigger-step/RETRIGGER_TRIGGER_MAIL | | ||
|
||
## 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 Contributors to the Eclipse Foundation | ||
- Source URL: https://github.com/eclipse-tractusx/ssi-credential-issuer |
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,22 @@ | ||
# Summary | ||
|
||
The main process worker project is the `Processes.Worker` which runs all the processes. It therefor looks up `process_steps` in status `TODO` and their respective `processes` and executes those. | ||
|
||
## Processes | ||
|
||
The process worker supports the following processes: | ||
|
||
- [CreateCredential](../processes/01.%20create_credential.md) - handles the creation of new credentials | ||
- [DeleteCredential](../processes/02.%20delete_credential.md) - handles the revocation of credentials | ||
|
||
## Retriggering | ||
|
||
The process has a logic to retrigger failing steps. For this a retrigger step is created which can be triggered via an api call to retrigger the step. This logic is implemented separately for each process. In general the retriggering of a step is possible if for example external services are not available. The retrigger logic for each process can be found in the process file. | ||
|
||
## 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 Contributors to the Eclipse Foundation | ||
- Source URL: https://github.com/eclipse-tractusx/ssi-credential-issuer |