diff --git a/documentation/Gaia-X Organization Credential Manager.postman_collection.json b/documentation/Gaia-X Organization Credential Manager.postman_collection.json index 7c4ebfed981e26d7e89e9f2ac9ac267800468c9b..851eccb55c5e711078632bd729b239067a605171 100644 --- a/documentation/Gaia-X Organization Credential Manager.postman_collection.json +++ b/documentation/Gaia-X Organization Credential Manager.postman_collection.json @@ -2,7 +2,7 @@ "info": { "_postman_id": "ab160828-a6d8-4f4c-a730-eaeaf5ba3754", "name": "Gaia-X Organization Credential Manager", - "description": "## Overview\n\nOCM (Organizational Credential Manager) is a Node.js-based microservice system designed to manage organizational credentials.\n\n## Quick Start\n\n### Clone the repository:\n\n``` bash\ngit clone -b chore/e2e git@gitlab.eclipse.org:tsabolov/ocm-engine.git\n\n ```\n\n### Start the stack using `docker-compose up -d` in the root of the project:\n\n``` bash\ncd ocm-engine\ndocker compose up -d\n\n ```\n\n> **Note:** By default, this collection is configured to interact with services running locally (using Docker Compose or directly on the bare metal). If you wish to run the requests of this collection against the OCM stack hosted on a remote machine, you will need to create a new Postman Environment. Within this environment, specify the base URLs for each of the services and DevTools as follows: \n \n\n### Initial Setup\n\nIn the \"Integration\" folder, execute all requests under the `Init` subfolder one-by-one. These are needed to \"seed\" the stack with some initial data and actors (tenants).\n\n> You can use Postman's feature `Run Folder` for this. \n \n\nOnce the `Init` step is done, execute the steps in the following folders in the order they are defined.\n\n## Known Issues\n\nAs of the current time, the following flows are known to be broken. We are aware of these issues and are working on resolving them:\n\n- Self-Issuance\n- Issuance of a credential with revocation support, and therefore revocation\n \n\nIf you encounter any other issues, please let us know.", + "description": "## Overview\n\nOCM (Organizational Credential Manager) is a Node.js-based microservice system designed to manage organizational credentials.\n\n## Quick Start\n\n### Clone the repository:\n\n``` bash\ngit clone git@gitlab.eclipse.org:eclipse/xfsc/ocm/ocm-engine.git\n\n ```\n\n### Start the stack using `docker-compose up -d` in the root of the project:\n\n``` bash\ncd ocm-engine\ndocker compose up -d\n\n ```\n\n> **Note:** By default, this collection is configured to interact with services running locally (using Docker Compose or directly on the bare metal). If you wish to run the requests of this collection against the OCM stack hosted on a remote machine, you will need to create a new Postman Environment. \n \n\n### Initial Setup\n\nIn the \"Integration\" folder, execute all requests under the `Init` subfolder one-by-one. These are needed to \"seed\" the stack with some initial data and actors (tenants).\n\n> You can use Postman's feature `Run Folder` for this. \n \n\nOnce the `Init` step is done, execute the steps in the following folders in the order they are defined.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "14427538" }, @@ -11,24 +11,1452 @@ "name": "APIs", "item": [ { - "name": "Schema Manager", - "item": [] + "name": "Tenant Manager", + "item": [ + { + "name": "tenants", + "item": [ + { + "name": "Tenants Controller find", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{Tenant Manager Base URL}}/v1/tenants", + "host": [ + "{{Tenant Manager Base URL}}" + ], + "path": [ + "v1", + "tenants" + ] + } + }, + "response": [] + }, + { + "name": "Tenants Controller create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"label\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Tenant Manager Base URL}}/v1/tenants", + "host": [ + "{{Tenant Manager Base URL}}" + ], + "path": [ + "v1", + "tenants" + ] + } + }, + "response": [] + } + ] + } + ] }, { - "name": "Connection Manager", - "item": [] + "name": "Schema Manager", + "item": [ + { + "name": "schemas", + "item": [ + { + "name": "Fetch a list of schemas", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/schemas?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "schemas" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of schemas for a given tenant" + }, + "response": [] + }, + { + "name": "Register a new schema", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"issuerDid\": \"\",\n \"name\": \"\",\n \"version\": \"\",\n \"attributeNames\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Schema Manager Base URL}}/v1/schemas?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "schemas" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides the capability to create new schema on ledger by name, author, version, schema attributes and type. Later this schema can be used to issue new credential definition. This call returns an information about created schema." + }, + "response": [] + }, + { + "name": "Fetch a schema by id", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/schemas/:schemaId?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "schemas", + ":schemaId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "schemaId", + "value": "", + "description": "(Required) The schema ID to retrieve" + } + ] + }, + "description": "This call allows you to retrieve schema data for a given tenant by specifying the `schemaId`." + }, + "response": [] + } + ] + }, + { + "name": "credential-definitions", + "item": [ + { + "name": "Fetch a list of credential definitions", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/credential-definitions?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "credential-definitions" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credential definitions for a given tenant" + }, + "response": [] + }, + { + "name": "Create a credential definition", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"issuerDid\": \"\",\n \"schemaId\": \"\",\n \"tag\": \"\",\n \"supportsRevocation\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Schema Manager Base URL}}/v1/credential-definitions?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "credential-definitions" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call allows you to create a credential definition for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a credential definition by ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Schema Manager Base URL}}/v1/credential-definitions/:credentialDefinitionId?tenantId=", + "host": [ + "{{Schema Manager Base URL}}" + ], + "path": [ + "v1", + "credential-definitions", + ":credentialDefinitionId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialDefinitionId", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "This call provides a credential definition for a given tenant" + }, + "response": [] + } + ] + } + ] }, { - "name": "Credential Manager", - "item": [] + "name": "Connection Manager", + "item": [ + { + "name": "connections", + "item": [ + { + "name": "Fetch a list of connections", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of connections for a given tenant" + }, + "response": [] + }, + { + "name": "Create a connection", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a self connection for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a connection by ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "", + "description": "(Required) The connection ID" + } + ] + }, + "description": "This call provides a connection for a given tenant and connection ID" + }, + "response": [] + }, + { + "name": "Block a connection", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:idOrDid/block?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":idOrDid", + "block" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "idOrDid", + "value": "", + "description": "(Required) The connection ID or DID" + } + ] + }, + "description": "This call blocks a connection for a given tenant and connection ID" + }, + "response": [] + } + ] + }, + { + "name": "invitations", + "item": [ + { + "name": "Create a new invitation", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a new invitation for a given tenant" + }, + "response": [] + }, + { + "name": "Receive an invitation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"invitationUrl\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations/receive?tenantId=", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations", + "receive" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call receives an invitation for a given tenant" + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Credential Manager", + "item": [ + { + "name": "credentials", + "item": [ + { + "name": "Fetch a list of credentials", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credentials for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a credential", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials/:credentialRecordId?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials", + ":credentialRecordId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialRecordId", + "value": "", + "description": "(Required) The credential record ID to retrieve" + } + ] + }, + "description": "This call provides a credential for a given tenant" + }, + "response": [] + }, + { + "name": "Revoke a credential", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials/:credentialId/revoke?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials", + ":credentialId", + "revoke" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialId" + } + ] + }, + "description": "This call revokes a credential for a given tenant" + }, + "response": [] + }, + { + "name": "Delete a credential", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credentials/:credentialId?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credentials", + ":credentialId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialId" + } + ] + }, + "description": "This call deletes a credential for a given tenant" + }, + "response": [] + } + ] + }, + { + "name": "credential-offers", + "item": [ + { + "name": "Fetch a list of credential offers", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credential offers for a given tenant" + }, + "response": [] + }, + { + "name": "Create a credential offer", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"connectionId\": \"\",\n \"credentialDefinitionId\": \"\",\n \"attributes\": [\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n },\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n }\n ],\n \"revocationRegistryDefinitionId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a credential offer for a given connection ID and credential definition ID" + }, + "response": [] + }, + { + "name": "Fetch a credential offer by ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers/:credentialOfferId?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers", + ":credentialOfferId" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialOfferId", + "value": "", + "description": "(Required) The credential offer ID to retrieve" + } + ] + }, + "description": "This call provides a credential offer for a given ID" + }, + "response": [] + }, + { + "name": "Create a credential offer to self", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialDefinitionId\": \"\",\n \"attributes\": [\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n },\n {\n \"name\": \"\",\n \"value\": \"\",\n \"mimeType\": \"\"\n }\n ],\n \"revocationRegistryDefinitionId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers/self?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers", + "self" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call creates a credential offer for a given credential definition ID" + }, + "response": [] + }, + { + "name": "Accept a credential offer", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-offers/:credentialOfferId/accept?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-offers", + ":credentialOfferId", + "accept" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "credentialOfferId", + "value": "", + "description": "(Required) The credential offer ID to retrieve" + } + ] + }, + "description": "This call accepts a credential offer for a given ID" + }, + "response": [] + } + ] + }, + { + "name": "credential-requests", + "item": [ + { + "name": "Fetch a list of credential requests", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-requests?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-requests" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of credential requests for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a credential request by id", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Credential Manager Base URL}}/v1/credential-requests/:id?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "credential-requests", + ":id" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "id" + } + ] + }, + "description": "This call provides a credential request for a given tenant by id" + }, + "response": [] + } + ] + }, + { + "name": "policies", + "item": [ + { + "name": "Check if a credential can be reissued", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/policies/check-reissue?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "policies", + "check-reissue" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Check if a credential can be reissued" + }, + "response": [] + }, + { + "name": "Check if a credential should be revoked", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/policies/check-revocation?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "policies", + "check-revocation" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Check if a credential should be revoked" + }, + "response": [] + }, + { + "name": "Check if a credential should be refreshed", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"credentialId\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Credential Manager Base URL}}/v1/policies/refresh?tenantId=", + "host": [ + "{{Credential Manager Base URL}}" + ], + "path": [ + "v1", + "policies", + "refresh" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Check if a credential should be refreshed" + }, + "response": [] + } + ] + } + ] }, { "name": "Proof Manager", - "item": [] + "item": [ + { + "name": "proofs", + "item": [ + { + "name": "Fetch a list of presentation proofs", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call provides a list of presentation proofs for a given tenant" + }, + "response": [] + }, + { + "name": "Request a presentation proof", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"connectionId\": \"\",\n \"requestedAttributes\": {},\n \"requestedPredicates\": {}\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "This call requests a presentation proof for a given tenant" + }, + "response": [] + }, + { + "name": "Fetch a presentation proof by id", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs/:id?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs", + ":id" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "id" + } + ] + }, + "description": "This call provides a presentation proof for a given tenant and id" + }, + "response": [] + }, + { + "name": "Delete a presentation proof", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs/:id?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs", + ":id" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "id" + } + ] + }, + "description": "This call deletes a presentation proof for a given tenant" + }, + "response": [] + }, + { + "name": "Proofs Controller accept", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{Proof Manager Base URL}}/v1/proofs/:proofRecordId/accept?tenantId=", + "host": [ + "{{Proof Manager Base URL}}" + ], + "path": [ + "v1", + "proofs", + ":proofRecordId", + "accept" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "proofRecordId" + } + ] + } + }, + "response": [] + } + ] + } + ] }, { "name": "DID Manager", - "item": [] + "item": [ + { + "name": "dids", + "item": [ + { + "name": "Resolve DID", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids/:did?tenantId=", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids", + ":did" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ], + "variable": [ + { + "key": "did", + "value": "", + "description": "(Required) DID to resolve" + } + ] + }, + "description": "Resolve DID" + }, + "response": [] + }, + { + "name": "Register DID from seed", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"seed\": \"\",\n \"services\": []\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids?tenantId=", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Register DID from seed" + }, + "response": [] + }, + { + "name": "Get DID configuration", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids/configuration?tenantId=", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids", + "configuration" + ], + "query": [ + { + "key": "tenantId", + "value": "", + "description": "(Required) Specifies the tenant ID" + } + ] + }, + "description": "Get DID configuration" + }, + "response": [] + } + ] + } + ] } ], "description": "This folder contains the documentation for the individual microservices of the Organization Credential Manager (OCM)" @@ -40,7 +1468,7 @@ "name": "Init", "item": [ { - "name": "Register Endorser DID", + "name": "Create 'issuer' tenant", "event": [ { "listen": "test", @@ -48,7 +1476,10 @@ "exec": [ "pm.test(\"Status code is 201\", function () {", " pm.response.to.have.status(201);", - "});" + "});", + "", + "const json = pm.response.json();", + "pm.collectionVariables.set(\"issuer_id\", json.data.id);" ], "type": "text/javascript" } @@ -57,20 +1488,30 @@ "request": { "method": "POST", "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"label\": \"issuer\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, "url": { - "raw": "{{DevTools Base URL}}/register-endorser-did", + "raw": "{{Tenant Manager Base URL}}/v1/tenants", "host": [ - "{{DevTools Base URL}}" + "{{Tenant Manager Base URL}}" ], "path": [ - "register-endorser-did" + "v1", + "tenants" ] } }, "response": [] }, { - "name": "Create 'issuer' tenant", + "name": "Create 'holder' tenant", "event": [ { "listen": "test", @@ -81,7 +1522,7 @@ "});", "", "const json = pm.response.json();", - "pm.collectionVariables.set(\"issuer_id\", json.id);" + "pm.collectionVariables.set(\"holder_id\", json.data.id);" ], "type": "text/javascript" } @@ -92,7 +1533,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"label\": \"issuer\"\n}", + "raw": "{\n \"label\": \"holder\"\n}", "options": { "raw": { "language": "json" @@ -100,19 +1541,20 @@ } }, "url": { - "raw": "{{DevTools Base URL}}/create-tenant", + "raw": "{{Tenant Manager Base URL}}/v1/tenants", "host": [ - "{{DevTools Base URL}}" + "{{Tenant Manager Base URL}}" ], "path": [ - "create-tenant" + "v1", + "tenants" ] } }, "response": [] }, { - "name": "Create 'holder' tenant", + "name": "Create 'verifier' tenant", "event": [ { "listen": "test", @@ -123,7 +1565,7 @@ "});", "", "const json = pm.response.json();", - "pm.collectionVariables.set(\"holder_id\", json.id);" + "pm.collectionVariables.set(\"verifier_id\", json.data.id);" ], "type": "text/javascript" } @@ -134,7 +1576,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"label\": \"holder\"\n}", + "raw": "{\n \"label\": \"verifier\"\n}", "options": { "raw": { "language": "json" @@ -142,19 +1584,20 @@ } }, "url": { - "raw": "{{DevTools Base URL}}/create-tenant", + "raw": "{{Tenant Manager Base URL}}/v1/tenants", "host": [ - "{{DevTools Base URL}}" + "{{Tenant Manager Base URL}}" ], "path": [ - "create-tenant" + "v1", + "tenants" ] } }, "response": [] }, { - "name": "Create 'verifier' tenant", + "name": "Create 'intruder' tenant", "event": [ { "listen": "test", @@ -165,7 +1608,7 @@ "});", "", "const json = pm.response.json();", - "pm.collectionVariables.set(\"verifier_id\", json.id);" + "pm.collectionVariables.set(\"intruder_id\", json.data.id);" ], "type": "text/javascript" } @@ -176,7 +1619,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"label\": \"verifier\"\n}", + "raw": "{\n \"label\": \"intruder\"\n}", "options": { "raw": { "language": "json" @@ -184,12 +1627,13 @@ } }, "url": { - "raw": "{{DevTools Base URL}}/create-tenant", + "raw": "{{Tenant Manager Base URL}}/v1/tenants", "host": [ - "{{DevTools Base URL}}" + "{{Tenant Manager Base URL}}" ], "path": [ - "create-tenant" + "v1", + "tenants" ] } }, @@ -227,7 +1671,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"seed\": \"{{$randomPassword}}{{$randomAlphaNumeric}}{{$randomAlphaNumeric}}{{$randomPassword}}\"\n}", + "raw": "{\n \"seed\": \"{{$randomPassword}}{{$randomAlphaNumeric}}{{$randomAlphaNumeric}}{{$randomPassword}}\",\n \"services\": [\n {\n \"id\": \"#endpoint\",\n \"type\": \"endpoint\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n },\n {\n \"id\": \"#didcomm-messaging\",\n \"type\": \"didcomm-messaging\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n },\n {\n \"id\": \"#did-communication\",\n \"type\": \"did-communication\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n },\n {\n \"id\": \"#DIDComm\",\n \"type\": \"DIDComm\",\n \"serviceEndpoint\": \"https://bar.example.com\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -260,7 +1704,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"domain\": \"\",\n \"expiryTime\": 1\n}", + "raw": "{\n \"domain\": \"https://did.spherity.com\",\n \"expiryTime\": 1800\n}", "options": { "raw": { "language": "json" @@ -286,9 +1730,40 @@ } }, "response": [] + }, + { + "name": "Resolve 'issuer' DID", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{DID Manager Base URL}}/v1/dids/:did?tenantId={{issuer_id}}", + "host": [ + "{{DID Manager Base URL}}" + ], + "path": [ + "v1", + "dids", + ":did" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ], + "variable": [ + { + "key": "did", + "value": "{{issuer_did}}" + } + ] + } + }, + "response": [] } ], - "description": "This folder contains a series of preliminary requests essential for execution before proceeding with the rest of the integration tests:\n\n- Register the Endorser DID.\n \n- Create a tenant named 'issuer'.\n \n- Create a tenant named 'holder'.\n \n- Create a tenant named 'verifier'.\n \n- Create a public DID for the 'issuer'.\n \n\nThese steps are performed by DevTools - a separate web service designed to assist developers in performing various service-related tasks that are crucial for setting up and maintaining the OCM environment. Although not a part of the OCM itself, DevTools acts as an essential developer aid, providing a suite of tools and features that streamline the execution of tasks such as DID registration, tenant creation, and configuration of public DIDs.\n\nTo find out how to run the DevTools please refer to the documentation in the OCM repository." + "description": "This folder contains a series of preliminary requests essential for execution before proceeding with the rest of the integration tests:\n\n- Create a tenant named 'issuer'.\n- Create a tenant named 'holder'.\n- Create a tenant named 'verifier'.\n- Create a public DID for the 'issuer'." }, { "name": "Create Schema and Credential Definition", @@ -531,7 +2006,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"issuerDid\": \"{{issuer_did}}\",\n \"schemaId\": \"{{revocation_schema_id}}\",\n \"tag\": \"default\",\n \"supportsRevocation\": true\n}", + "raw": "{\n \"issuerDid\": \"{{issuer_did}}\",\n \"schemaId\": \"{{revocation_schema_id}}\",\n \"tag\": \"{{$randomSemver}}\",\n \"supportsRevocation\": true\n}", "options": { "raw": { "language": "json" @@ -1510,7 +2985,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"{{$randomBsAdjective}}_{{$randomBsNoun}}\",\n \"connectionId\": \"{{verifier_holder_connection_id_for_verifier}}\",\n \"requestedAttributes\": {\n \"color\": {\n \"names\": [\"color\"]\n },\n \"size\": {\n \"names\": [\"size\"]\n }\n },\n \"requestedPredicates\": {}\n}", + "raw": "{\n \"name\": \"{{$randomBsAdjective}}_{{$randomBsNoun}}\",\n \"connectionId\": \"{{verifier_holder_connection_id_for_verifier}}\",\n \"requestedAttributes\": {\n \"tshirt_info\": {\n \"names\": [\"color\", \"size\"],\n \"restrictions\": [\n {}\n ]\n }\n },\n \"requestedPredicates\": {}\n}", "options": { "raw": { "language": "json" @@ -1654,6 +3129,233 @@ "response": [] } ] + }, + { + "name": "Block connection", + "item": [ + { + "name": "Create invitation (issuer)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const json = pm.response.json();", + "pm.collectionVariables.set('issuer_to_inruder_invitationUrl', json.data.invitationUrl);" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations?tenantId={{issuer_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Receive invitation from issuer (intruder)", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.sendRequest({", + " url: pm.collectionVariables.get('Connection Manager Base URL') + \"/v1/connections?tenantId=\" + pm.collectionVariables.get('issuer_id'),", + " method: \"GET\"", + "}, (err, res) => {", + " const connections = res.json().data;", + " const connectionIds = connections.map(({ id }) => id);", + " pm.variables.set('issuer_connection_ids', connectionIds);", + "})" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.collectionVariables.unset('issuer_to_inruder_invitationUrl');", + "", + "const json = pm.response.json();", + "pm.collectionVariables.set('issuer_intruder_connection_id_for_intruder', json.data.id);", + "", + "const oldConnectionIds = pm.variables.get('issuer_connection_ids');", + "", + "pm.sendRequest({", + " url: pm.collectionVariables.get('Connection Manager Base URL') + \"/v1/connections?tenantId=\" + pm.collectionVariables.get('issuer_id'),", + " method: \"GET\"", + "}, (err, res) => {", + " const connections = res.json().data;", + " const connectionIds = connections.map(({ id }) => id);", + " const newConnectionIds = connectionIds.filter((id) => !oldConnectionIds.includes(id));", + "", + " if (newConnectionIds.length) {", + " pm.collectionVariables.set('issuer_intruder_connection_id_for_issuer', newConnectionIds[0]);", + " }", + "})" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"invitationUrl\": \"{{issuer_to_inruder_invitationUrl}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{Connection Manager Base URL}}/v1/invitations/receive?tenantId={{intruder_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "invitations", + "receive" + ], + "query": [ + { + "key": "tenantId", + "value": "{{intruder_id}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get issuer connection to intruder", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId?tenantId={{issuer_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "{{issuer_intruder_connection_id_for_issuer}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get intruder connection to issuer", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId?tenantId={{intruder_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId" + ], + "query": [ + { + "key": "tenantId", + "value": "{{intruder_id}}" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "{{issuer_intruder_connection_id_for_intruder}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Block connection to intruder", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{Connection Manager Base URL}}/v1/connections/:connectionId/block?tenantId={{issuer_id}}", + "host": [ + "{{Connection Manager Base URL}}" + ], + "path": [ + "v1", + "connections", + ":connectionId", + "block" + ], + "query": [ + { + "key": "tenantId", + "value": "{{issuer_id}}" + } + ], + "variable": [ + { + "key": "connectionId", + "value": "{{issuer_intruder_connection_id_for_issuer}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "TSA Policies", + "item": [] } ], "description": "This folder is designed to house a comprehensive series of requests aimed at conducting end-to-end testing for all APIs" @@ -1670,7 +3372,8 @@ " 'Connection Manager Base URL',", " 'Credential Manager Base URL',", " 'Proof Manager Base URL',", - " 'DevTools Base URL'", + " 'DID Manager Base URL',", + " 'Tenant Manager Base URL'", "];", "", "for (const variable of variables) {", @@ -1713,13 +3416,13 @@ "type": "string" }, { - "key": "DevTools Base URL", - "value": "http://localhost:4100", + "key": "DID Manager Base URL", + "value": "http://localhost:4006", "type": "string" }, { - "key": "DID Manager Base URL", - "value": "http://localhost:4006", + "key": "Tenant Manager Base URL", + "value": "http://localhost:4007", "type": "string" }, { @@ -1801,6 +3504,18 @@ { "key": "revocable_credential_id", "value": "" + }, + { + "key": "intruder_id", + "value": "" + }, + { + "key": "issuer_intruder_connection_id_for_intruder", + "value": "" + }, + { + "key": "issuer_intruder_connection_id_for_issuer", + "value": "" } ] } \ No newline at end of file