diff --git a/GAIA-X-Documentation.docx b/GAIA-X-Documentation.docx new file mode 100644 index 0000000000000000000000000000000000000000..faa65386efec9048f2e329b35c6db0e2e54defc3 Binary files /dev/null and b/GAIA-X-Documentation.docx differ diff --git a/GAIA-X-OCM-BlockDiagram.png b/GAIA-X-OCM-BlockDiagram.png new file mode 100644 index 0000000000000000000000000000000000000000..8468f2e6d5a96529990b826b61eb68d0fdb829db Binary files /dev/null and b/GAIA-X-OCM-BlockDiagram.png differ diff --git a/GAIA-X-OCM.Participant Onboarding.drawio.png b/GAIA-X-OCM.Participant Onboarding.drawio.png new file mode 100644 index 0000000000000000000000000000000000000000..d7bbdbba5e92079e14eddf0975dad0c80910f5f1 Binary files /dev/null and b/GAIA-X-OCM.Participant Onboarding.drawio.png differ diff --git a/GAIA-X-Overview-blockDiagram.png b/GAIA-X-Overview-blockDiagram.png new file mode 100644 index 0000000000000000000000000000000000000000..2d16bb7022b7d67b0aac91af1e414ebc33943623 Binary files /dev/null and b/GAIA-X-Overview-blockDiagram.png differ diff --git a/SRS_GXFS_IDM_OCM-lot3.pdf b/SRS_GXFS_IDM_OCM.pdf similarity index 100% rename from SRS_GXFS_IDM_OCM-lot3.pdf rename to SRS_GXFS_IDM_OCM.pdf diff --git a/create-credential-definition.md b/create-credential-definition.md new file mode 100644 index 0000000000000000000000000000000000000000..0b40958bdb81e4f860b76cab3af09214e80ca2aa --- /dev/null +++ b/create-credential-definition.md @@ -0,0 +1,9 @@ +```mermaid +sequenceDiagram +participant OCM Admin +participant OCM Attestation Manager + par + OCM Admin ->> OCM Attestation Manager: Calls the POST method credentialDef with relevant attributes. + OCM Attestation Manager ->> OCM Admin: Responds with status code 201, with message 'Credential definition created successfully', if credential definition is created on ledger successfully + end +``` diff --git a/create-schema-sequence.md b/create-schema-sequence.md new file mode 100644 index 0000000000000000000000000000000000000000..fa530f544ccdfef38042cca4247dea3ff0f82f23 --- /dev/null +++ b/create-schema-sequence.md @@ -0,0 +1,9 @@ +```mermaid +sequenceDiagram +participant OCM Admin +participant OCM Attestation Manager + par + OCM Admin ->> OCM Attestation Manager: Calls the POST method Schemas with relevant attributes. + OCM Attestation Manager ->> OCM Admin: Responds with status code 201, with message 'Schema created successfully', if schema is created on ledger successfully + end + ``` diff --git a/er-diagram.md b/er-diagram.md new file mode 100644 index 0000000000000000000000000000000000000000..9ed933222417317affc970d963a32a51a32b9bd8 --- /dev/null +++ b/er-diagram.md @@ -0,0 +1,155 @@ +# OCM ER Diagram + +```mermaid + erDiagram + Participant ||--o{ Schema : Creates-Consume + Schema ||--|{ Attributes : Has + CredentialDef ||--|| Schema : Has + + Connection ||--o{ Credential : Issues + Credential ||--|| CredentialDef : Has + + Participant ||--o{ Connection : Has + Proof }o--|| Connection : Requests + Agent }o--|| Participant : Has + + Agent ||--|{ Ledger : Has + + User }|--|| Participant : Has + + OTP ||--|| Participant : Sends-Email-OTP + + Config { + uuid id + string key + string value + DateTime created_date + DateTime updated_date + } + + OTP { + uuid id + string otp + DateTime created_date + DateTime updated_date + } + + Participant { + uuid id + string name + string address + string website + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + User { + uuid id + string email + string password + string otp_id + Boolean is_verified + Role role + uuid participant_id + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + Agent { + uuid id + uuid participant_id + string agent_url + string invitation_url + string public_did + string wallet_name + string status + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + Ledger { + uuid id + uuid agent_id + string network + Blob genesis_file + string environment + DateTime created_date + DateTime updated_date + } + + Schema { + uuid id + string schemaID + string participant_did + string name + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + Attributes { + uuid id + string schemaID + string name + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + Credential { + uuid id + uuid exchange_id + uuid cred_def_id + string connection_id + string participant_id + string principal_did + DateTime created_date + DateTime updated_date + } + + CredentialDef { + uuid id + string cred_def_id + string schemaID + string name + Boolean is_auto_issue + Boolean is_revokable + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + Connection { + uuid id + string connection_id + string status + string participant_did + string their_did + string their_label + DateTime created_date + uuid created_by + DateTime updated_date + uuid updated_by + } + + Proof { + uuid id + string presentation_id + string credential_def_id + string participant_did + string their_did + string status + DateTime created_date + DateTime updated_date + + } +``` diff --git a/issue-credential-sequence.md b/issue-credential-sequence.md new file mode 100644 index 0000000000000000000000000000000000000000..86a4d4eaefb1251adf608ddc1c3671b51534621c --- /dev/null +++ b/issue-credential-sequence.md @@ -0,0 +1,14 @@ +```mermaid +sequenceDiagram +participant PCM User +participant PCM App +participant OCM Admin +participant OCM Attestation Manager + par + OCM Admin ->> OCM Attestation Manager: Calls the POST method create-offer-Credential with connectionId, credentialDefinitionId and relevant attributes and their values. + OCM Attestation Manager ->> PCM App: Offers the Credential to the corresponding PCM + PCM User->> PCM App: Accepts the Credential + PCM App ->> OCM Attestation Manager: Sends acknowledgement + OCM Attestation Manager ->> PCM App: Accepts the acknowledgement on accept-request API, and issues the Verifiable Credential, which gets stored in PCM wallet. + end + ``` diff --git a/ocm-services.md b/ocm-services.md new file mode 100644 index 0000000000000000000000000000000000000000..ffbf1baea6057edae44cb8452b603ed84db6edd6 --- /dev/null +++ b/ocm-services.md @@ -0,0 +1,12 @@ +# OCM ER Diagram + +```mermaid + flowchart LR + gateway[API Gateway] -->Connection + subgraph test + service1 --> service2 + subgraph subgraph + subgraph2-->subgraph1 + end + end +``` diff --git a/onboarding.md b/onboarding.md new file mode 100644 index 0000000000000000000000000000000000000000..105df24b2fa668c4e1a63678829a028da001aa1f --- /dev/null +++ b/onboarding.md @@ -0,0 +1,50 @@ +# Onboarding Diagram + +```mermaid + flowchart LR + subgraph AA["Authentication & Authorization"] + g-reg["Registration"] + end + + subgraph gaiax[Gaiax] + TSA["Trust Services API"] + subgraph ocm + AISBL + Services-->g-db + g-reg-->Services + Services-- Request -->AISBL + AISBL-- callback -->Services + end + g-db[(Database)] + end + + subgraph ayanworks[Ayanworks] + aAdmin((Admin)) + aAdmin-->g-reg + a-ocm["OCM Services"]-- Request -->a-afj + a-afj["AFJ"]-- callback -->a-ocm + a-ocm-->a-db[(Database)] + AISBL-- "Credential Issue v2" -->a-afj + a-TSA["Trust Service API"] + end + + subgraph vereign[Vereign] + vAdmin((Admin)) + vAdmin-->g-reg + v-ocm["OCM Services"]-- Request -->v-afj + v-afj["AFJ"]-- callback -->v-ocm + v-ocm-->v-db[(Database)] + AISBL-- "Credential Issue v2" -->v-afj + v-TSA["Trust Service API"] + end + + subgraph pcm[PCM] + p-afj["Mobile Aries Agent"]-- "Registration connection" -->AISBL + p-afj-- "Subscription Connection" -->v-afj + end + + subgraph Certifier + cAriesAgent["Aries Agent"]-- eIDAS VC -->a-afj + cAriesAgent["Aries Agent"]-- eIDAS VC -->v-afj + end +``` diff --git a/out-of-band-sequence.md b/out-of-band-sequence.md new file mode 100644 index 0000000000000000000000000000000000000000..dc001887fd9d52efce4c4e6361d01c7183a39832 --- /dev/null +++ b/out-of-band-sequence.md @@ -0,0 +1,16 @@ +```mermaid +sequenceDiagram +participant PCM User +participant PCM App +participant OCM Admin +participant OCM Proof Manager + par + OCM Admin ->> OCM Proof Manager: Calls the POST method send-out-of-band-presentation-request, with either schemaId or credentialDefinitionId and required attributes. + OCM Proof Manager ->> OCM Admin: Sends the URL generated of proof presentation request + OCM Admin->> OCM Admin: Receives the URL and converts it to QR code and displays the same. + PCM App ->> OCM Admin: Scans the QR code for Out of Band Proof Presentation. + PCM User ->> PCM App: The User accepts to share the requested attributes of specified credential. + PCM App ->> OCM Proof Manager: Sends the requested attributes, if proof verification is successful it sets isVerified as true and state as done in the database. + OCM Admin ->> OCM Proof Manager: Calls Get method find-by-presentation-id API, against the presentation-id of proof request, and confirms the status of isVerified and state. + end +``` diff --git a/principal-credential-schema.md b/principal-credential-schema.md new file mode 100644 index 0000000000000000000000000000000000000000..27cce9d81a340664def2d4fc2ed861dd5d97207e --- /dev/null +++ b/principal-credential-schema.md @@ -0,0 +1,9 @@ +## Principal Credential Schema +This schema is used to issue VC to Principal User at the time of registration. This VC will indicate respective principal user is part of Gaiax ecosystem. This VC will also be used every time to make respective connection as Trusted via Proof Verification of this schemaID + +Following attributes should be in schema (case sensitive) +``` + 1. email // principalUser email address + 2. issuerDID // issuer OCM organization public DID + 3. subjectDID // holder pairwise DID + ``` diff --git a/principal-user-registration-sequence.md b/principal-user-registration-sequence.md new file mode 100644 index 0000000000000000000000000000000000000000..e0debe21c49455aa85898ba5714234c5d320f9c2 --- /dev/null +++ b/principal-user-registration-sequence.md @@ -0,0 +1,37 @@ +```mermaid +sequenceDiagram +participant Playstore/Appstore +participant PCM User +participant PCM App +participant OCM Notification Manager(Federation) +participant Mediator +participant OCM Admin +participant OCM Connection Manager +participant OCM Principal Manager +participant OCM Attestation Manager + + par + User Device->>Playstore/Appstore: Downloads PCM App + PCM User ->> PCM App: Enters email + PCM App ->>OCM Notification Manager(Federation): sends email Address to notification/sendOTP(), for OTP generation + OCM Notification Manager(Federation) ->> PCM User: Sends OTP to Email address provided + PCM User->>PCM App: Enters OTP + PCM App ->>OCM Notification Manager(Federation): Sends OTP to notification/verifyOTP() + OCM Notification Manager(Federation)->>PCM App: On successful verification, returns success + PCM User ->> PCM App: Enters Pin and Biometric + PCM App ->> PCM App: Create Wallet, show mnemonic + PCM User->>PCM App: copies and saves mnemonic + end + par + PCM App->> Mediator: Sends DIDComm Connection + Mediator->>PCM App: On successful connection sends connected + end + par + OCM Admin ->> OCM Connection Manager: Uses invitationURL(), to generate new Invitation URL with parameter 'alias = member' + OCM Admin ->> OCM Admin: Converts URL to QR, and displays + PCM App ->> OCM Admin: Scans the QR code, and the connection between PCM and OCM gets completed and active + OCM Connection Manager ->> OCM Principal Manager: Request for issuance of Principal credential + OCM Principal Manager ->> OCM Attestation Manager: Requests Attestation Manager with Principal Credential CredDef to issue credential based on CredDef + OCM Attestation Manager ->> PCM App: Issues Credential to the individual and the credential gets stored in PCM App's wallet + end +``` diff --git a/proof-verification-sequence.md b/proof-verification-sequence.md new file mode 100644 index 0000000000000000000000000000000000000000..6869f6ff3a430ceb663a1211f1ca5f188f228b82 --- /dev/null +++ b/proof-verification-sequence.md @@ -0,0 +1,14 @@ +```mermaid +sequenceDiagram +participant PCM User +participant PCM App +participant OCM Admin +participant OCM Proof Manager + par + OCM Admin ->> OCM Proof Manager: Calls the POST method send-presentation-request, against the connectionID, with either schemaId or credentialDefinitionId and required attributes. + OCM Proof Manager ->> PCM App: Sends the Proof Presentation Request. + PCM User ->> PCM App: The User accepts to share the requested attributes of specified credential. + PCM App ->> OCM Proof Manager: Sends the requested attributes, if proof verification is successful it sets isVerified as true and state as done in the database. + OCM Admin ->> OCM Proof Manager: Calls Get method find-by-presentation-id API, against the presentation-id of proof request, and confirms the status of isVerified and state. + end +``` diff --git a/subscription-sequence.md b/subscription-sequence.md new file mode 100644 index 0000000000000000000000000000000000000000..786277b2cf5554f0743deb4a35e9478579da9f58 --- /dev/null +++ b/subscription-sequence.md @@ -0,0 +1,20 @@ +```mermaid +sequenceDiagram +participant PCM App +participant OCM Admin +participant OCM Connection Manager +participant OCM Connection Manager Db +participant OCM Principal Manager +participant OCM Proof Manager + + par + OCM Admin ->> OCM Connection Manager: Uses invitationURL(), to generate new Invitation URL with parameter 'alias = subscriber' + OCM Admin ->> OCM Admin: Converts URL to QR, and displays + PCM App ->> OCM Admin: Scans the QR code, and the connection between PCM and OCM gets completed and active + OCM Connection Manager ->> OCM Principal Manager: Requests for Proof Verification on Principal credential, to turn connection from active to trusted + OCM Principal Manager ->> OCM Proof Manager: Requests Proof Verification on sendMembershipProofRequest() on Principal Credential schema + OCM Proof Manager ->> PCM App: Requests for proof verification from PCM App + PCM App ->> OCM Proof Manager: Responds with Proof Request. + OCM Proof Manager ->> OCM Connection Manager Db: Changes the status of Connection to Trusted from Completed if proof verification is successful + end +```