From 7f3d4953c406e15fc1c425cd028aed424c540a51 Mon Sep 17 00:00:00 2001 From: Zdravko Iliev <zdravko.iliev@vereign.com> Date: Wed, 4 Oct 2023 12:28:44 +0000 Subject: [PATCH] ci: svdx deploy --- .gitlab-ci.yml | 8 + OCM Gateway.postman_collection.json | 2413 ----------------- agent-swagger.json | 1 + apps/agent/README.md | 2 +- .../ci-cd/helm/templates/deployment.yaml | 38 + .../ci-cd/helm/templates/ingress.yaml | 18 + apps/agent/deployment/ci-cd/helm/values.yaml | 37 +- apps/agent/deployment/local/HinDockerfile | 15 + apps/agent/src/main.ts | 2 + libs/askar/src/agent.utils.ts | 3 + libs/config/src/config/agent.config.ts | 5 +- libs/config/src/config/gateway.config.ts | 2 +- libs/config/src/config/nats.config.ts | 12 +- .../interfaces/gateway.config.interface.ts | 2 +- libs/config/src/schemas/nats.schema.ts | 6 +- 15 files changed, 138 insertions(+), 2426 deletions(-) delete mode 100644 OCM Gateway.postman_collection.json create mode 100644 agent-swagger.json create mode 100644 apps/agent/deployment/local/HinDockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6f4da11..3debc386 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -145,6 +145,14 @@ helm-gateway: extends: .helm-gateway stage: helm +deploy agent hin: + extends: .deploy-agent-hin-main + stage: deploy-test + +deploy agent hin tagged: + extends: .deploy-agent-hin-tag + stage: deploy-test + deploy agent ocm: extends: .deploy-agent-ocm-main stage: deploy-test diff --git a/OCM Gateway.postman_collection.json b/OCM Gateway.postman_collection.json deleted file mode 100644 index be7c2032..00000000 --- a/OCM Gateway.postman_collection.json +++ /dev/null @@ -1,2413 +0,0 @@ -{ - "info": { - "_postman_id": "db24c889-0f25-4851-b3a6-c8f036119252", - "name": "OCM Gateway", - "description": "OCM ENGINE GATEWAY API", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "1453906", - "_collection_link": "https://interstellar-resonance-579562.postman.co/workspace/My-Workspace~0fb5d194-7df6-48c6-8d80-b735c624826a/collection/1453906-db24c889-0f25-4851-b3a6-c8f036119252?action=share&creator=1453906&source=collection_link" - }, - "item": [ - { - "name": "api", - "item": [ - { - "name": "v1", - "item": [ - { - "name": "schemas-by-id", - "item": [ - { - "name": "Get schema by id", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"did:indy:LEDNGER:SXM76gQwRnjkgoz2oBnGjd/anoncreds/v0/SCHEMA/test schema/1.0.2\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas-by-id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas-by-id" - ] - }, - "description": "Method will fetch specific schema or return null. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"did:indy:LEDNGER:SXM76gQwRnjkgoz2oBnGjd/anoncreds/v0/SCHEMA/test schema/1.0.2\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas-by-id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas-by-id" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"did:indy:LEDNGER:SXM76gQwRnjkgoz2oBnGjd/anoncreds/v0/SCHEMA/test schema/1.0.2\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas-by-id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas-by-id" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"schemaId must be a string\",\n \"schemaId should not be empty\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"did:indy:LEDNGER:SXM76gQwRnjkgoz2oBnGjd/anoncreds/v0/SCHEMA/test schema/1.0.2\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas-by-id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas-by-id" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "schemas", - "item": [ - { - "name": "Create schema", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"my test schema\",\n \"attributes\": [\n \"first_name, last_name\"\n ],\n \"version\": \"/1015535231.*/\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - }, - "description": "Method will create schema. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"my test schema\",\n \"attributes\": [\n \"first_name, last_name\"\n ],\n \"version\": \"/1015535231.*/\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"my test schema\",\n \"attributes\": [\n \"first_name, last_name\"\n ],\n \"version\": \"/1015535231.*/\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"name must be a string\",\n \"name should not be empty\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"my test schema\",\n \"attributes\": [\n \"first_name, last_name\"\n ],\n \"version\": \"/1015535231.*/\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - }, - { - "name": "List all schemas", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - }, - "description": "Method will fetch all schemas. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/schemas", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "schemas" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "messages", - "item": [ - { - "name": "Send basic message", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"message\": \"hello world\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/messages", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "messages" - ] - }, - "description": "Method will send basic message to a connection. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"message\": \"hello world\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/messages", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "messages" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Untitled Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"message\": \"hello world\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/messages", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "messages" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"message\": \"hello world\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/messages", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "messages" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"connectionId must be a string\",\n \"connectionId should not be empty\",\n \"message must be a string\",\n \"message should not be empty\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"message\": \"hello world\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/messages", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "messages" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "invitations", - "item": [ - { - "name": "accept", - "item": [ - { - "name": "Accept invitation for connection", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invitationUrl\": \"http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/invitations/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations", - "accept" - ] - }, - "description": "Method will accept the invitation and will return connection thought the websocket. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invitationUrl\": \"http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/invitations/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations", - "accept" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invitationUrl\": \"http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/invitations/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations", - "accept" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"invitationUrl must be a string\",\n \"invitationUrl should not be empty\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"invitationUrl\": \"http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/invitations/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations", - "accept" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:4312\"\n}" - } - ] - } - ] - }, - { - "name": "Create invitation for connection", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/invitations", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations" - ] - }, - "description": "Method will create invitation url. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/invitations", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/invitations", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "invitations" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:4312\"\n}" - } - ] - } - ] - }, - { - "name": "credentials", - "item": [ - { - "name": "proof", - "item": [ - { - "name": "{proof_record_id}", - "item": [ - { - "name": "accept", - "item": [ - { - "name": "Accept credential proof", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/:proof_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - ":proof_record_id", - "accept" - ], - "variable": [ - { - "key": "proof_record_id", - "value": "est ullamco in" - } - ] - }, - "description": "Method accept credential proof. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/:proof_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - ":proof_record_id", - "accept" - ], - "variable": [ - { - "key": "proof_record_id" - } - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to proof manager. This error shows that proof manager could not convert request to event or proof manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/:proof_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - ":proof_record_id", - "accept" - ], - "variable": [ - { - "key": "proof_record_id" - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1919\"\n}" - } - ] - } - ] - } - ] - }, - { - "name": "issue", - "item": [ - { - "name": "Issue proof for credential", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attributes\": [\n {\n \"attributeName\": \"proident eu ea dolore\",\n \"credentialDefinitionId\": \"dolore Ut sit\",\n \"schemaId\": \"enim in proident dolore\"\n },\n {\n \"attributeName\": \"nisi\",\n \"credentialDefinitionId\": \"minim commodo non\",\n \"schemaId\": \"anim cupidatat ad Duis eiusmod\"\n }\n ],\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - "issue" - ] - }, - "description": "Method will issue proof. If connection id is not passed, the proof will be OOB. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attributes\": [\n {\n \"attributeName\": \"proident eu ea dolore\",\n \"credentialDefinitionId\": \"dolore Ut sit\",\n \"schemaId\": \"enim in proident dolore\"\n },\n {\n \"attributeName\": \"nisi\",\n \"credentialDefinitionId\": \"minim commodo non\",\n \"schemaId\": \"anim cupidatat ad Duis eiusmod\"\n }\n ],\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - "issue" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attributes\": [\n {\n \"attributeName\": \"proident eu ea dolore\",\n \"credentialDefinitionId\": \"dolore Ut sit\",\n \"schemaId\": \"enim in proident dolore\"\n },\n {\n \"attributeName\": \"nisi\",\n \"credentialDefinitionId\": \"minim commodo non\",\n \"schemaId\": \"anim cupidatat ad Duis eiusmod\"\n }\n ],\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - "issue" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"attributes must contain at least 1 elements\",\n \"attributes must be an array\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to proof manager. This error shows that proof manager could not convert request to event or proof manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"attributes\": [\n {\n \"attributeName\": \"proident eu ea dolore\",\n \"credentialDefinitionId\": \"dolore Ut sit\",\n \"schemaId\": \"enim in proident dolore\"\n },\n {\n \"attributeName\": \"nisi\",\n \"credentialDefinitionId\": \"minim commodo non\",\n \"schemaId\": \"anim cupidatat ad Duis eiusmod\"\n }\n ],\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof", - "issue" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1919\"\n}" - } - ] - } - ] - }, - { - "name": "List received unaccepted proofs", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof" - ] - }, - "description": "Method list all received unaccepted proofs. Status - request-receive. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to proof manager. This error shows that proof manager could not convert request to event or proof manager could not send the event to the broker.", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/proof", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "proof" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1919\"\n}" - } - ] - } - ] - }, - { - "name": "offers", - "item": [ - { - "name": "{credential_record_id}", - "item": [ - { - "name": "accept", - "item": [ - { - "name": "Accept credential offers", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers/:credential_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers", - ":credential_record_id", - "accept" - ], - "variable": [ - { - "key": "credential_record_id", - "value": "est ullamco in" - } - ] - }, - "description": "Method list accept credential offer. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers/:credential_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers", - ":credential_record_id", - "accept" - ], - "variable": [ - { - "key": "credential_record_id" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Untitled Response", - "originalRequest": { - "method": "POST", - "header": [], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers/:credential_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers", - ":credential_record_id", - "accept" - ], - "variable": [ - { - "key": "credential_record_id" - } - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers/:credential_record_id/accept", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers", - ":credential_record_id", - "accept" - ], - "variable": [ - { - "key": "credential_record_id" - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - } - ] - }, - { - "name": "List unaccepted credential offers", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers" - ] - }, - "description": "Method list offers that are received, but not accepted. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/offers", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "offers" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "issue", - "item": [ - { - "name": "Issue credential", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"credentialDefinitionId\": \"eiusmod\",\n \"attributes\": [\n {\n \"name\": \"veniam sunt in et\",\n \"value\": \"aliquip sed cillum ut\"\n },\n {\n \"name\": \"ut fugiat aute sed\",\n \"value\": \"ea\"\n }\n ]\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "issue" - ] - }, - "description": "Method issue credential, it will create an offer and send it to specified receiver (connectionId). The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"credentialDefinitionId\": \"eiusmod\",\n \"attributes\": [\n {\n \"name\": \"veniam sunt in et\",\n \"value\": \"aliquip sed cillum ut\"\n },\n {\n \"name\": \"ut fugiat aute sed\",\n \"value\": \"ea\"\n }\n ]\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "issue" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"credentialDefinitionId\": \"eiusmod\",\n \"attributes\": [\n {\n \"name\": \"veniam sunt in et\",\n \"value\": \"aliquip sed cillum ut\"\n },\n {\n \"name\": \"ut fugiat aute sed\",\n \"value\": \"ea\"\n }\n ]\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "issue" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"connectionId must be a string\",\n \"connectionId should not be empty\",\n \"credentialDefinitionId must be a string\",\n \"credentialDefinitionId should not be empty\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"connectionId\": \"6464b521-005a-4379-91e0-a3692b31cafd\",\n \"credentialDefinitionId\": \"eiusmod\",\n \"attributes\": [\n {\n \"name\": \"veniam sunt in et\",\n \"value\": \"aliquip sed cillum ut\"\n },\n {\n \"name\": \"ut fugiat aute sed\",\n \"value\": \"ea\"\n }\n ]\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/issue", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "issue" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "definition", - "item": [ - { - "name": "Create credential definition", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"exercitation minim pariatur\",\n \"tag\": \"voluptate eiusmod\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/definition", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "definition" - ] - }, - "description": "Method create credential definition. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"exercitation minim pariatur\",\n \"tag\": \"voluptate eiusmod\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/definition", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "definition" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Validation error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"exercitation minim pariatur\",\n \"tag\": \"voluptate eiusmod\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/definition", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "definition" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 400,\n \"message\": [\n \"schemaId must be a string\",\n \"schemaId should not be empty\",\n \"tag must be a string\",\n \"tag should not be empty\"\n ],\n \"error\": \"Bad Request\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"schemaId\": \"exercitation minim pariatur\",\n \"tag\": \"voluptate eiusmod\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/credentials/definition", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials", - "definition" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "List all credential", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials" - ] - }, - "description": "Method list credential definition no filters applied. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to attestation manager. This error shows that attestation manager could not convert request to event or attestation manager could not send the event to the broker.", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/credentials", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "credentials" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:1234\"\n}" - } - ] - } - ] - }, - { - "name": "connections", - "item": [ - { - "name": "{id}", - "item": [ - { - "name": "Get connection by id", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/connections/:id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "connections", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "est ullamco in" - } - ] - }, - "description": "The method will search for connection id, if not found null will be returned. The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/connections/:id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "connections", - ":id" - ], - "variable": [ - { - "key": "id" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/connections/:id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "connections", - ":id" - ], - "variable": [ - { - "key": "id" - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:4312\"\n}" - } - ] - } - ] - }, - { - "name": "List all connections", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/connections", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "connections" - ] - }, - "description": "The id of the response will be matched when you receive event from the websocket" - }, - "response": [ - { - "name": "Request is accepted for execution, the response id will match the event id received from the web socket", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/connections", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "connections" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"80633e6d-c606-4539-a3df-287fedd09253\"\n}" - }, - { - "name": "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/connections", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "connections" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"statusCode\": 500,\n \"message\": \"connect ECONNREFUSED 0.0.0.0.0:4312\"\n}" - } - ] - } - ] - } - ] - } - ] - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "http://0.0.0.0:8081" - } - ] -} \ No newline at end of file diff --git a/agent-swagger.json b/agent-swagger.json new file mode 100644 index 00000000..2294a84f --- /dev/null +++ b/agent-swagger.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","paths":{"/api/v1/invitation":{"post":{"operationId":"RestController_createInvitation","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationResponseDto"}}}}}}},"/api/v1/invitation/accept":{"post":{"operationId":"RestController_acceptInvitation","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationResponseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationResponseDto"}}}}}}},"/api/v1/connections":{"get":{"operationId":"RestController_connections","parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/schema":{"post":{"operationId":"RestController_createSchema","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSchemaRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSchemaResponseDto"}}}}}}},"/api/v1/credential/definition":{"post":{"operationId":"RestController_createCredentialDefinition","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialDefinitionRequsetDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialDefinitionResponseDto"}}}}}}},"/api/v1/credential/issue":{"post":{"operationId":"RestController_issueCredential","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCredentialRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCredentialResponseDto"}}}}}}},"/api/v1/credentials":{"get":{"operationId":"RestController_credentials","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IssueCredentialResponseDto"}}}}}}}},"/api/v1/credential/offers":{"get":{"operationId":"RestController_getCredentialOffers","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IssueCredentialResponseDto"}}}}}}}},"/api/v1/credential/{credential_record_id}/accept":{"post":{"operationId":"RestController_acceptCredential","parameters":[{"name":"credential_record_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCredentialResponseDto"}}}}}}},"/api/v1/credential/proof":{"get":{"operationId":"RestController_proofs","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IssueProofResponseDto"}}}}}}}},"/api/v1/credential/proof/issue":{"post":{"operationId":"RestController_issueProof","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueProofRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueProofResponseDto"}}}}}}},"/api/v1/credential/proof/{proof_record_id}/accept":{"post":{"operationId":"RestController_acceptProof","parameters":[{"name":"proof_record_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueProofResponseDto"}}}}}}},"/api/v1/resolve":{"post":{"operationId":"RestController_resolve","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/messages":{"post":{"operationId":"RestController_sendMeesage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MakeBasicMessageRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MakeBasicMessageResponseDto"}}}}}}}},"info":{"title":"Agent","description":"Agent API","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"CreateInvitationResponseDto":{"type":"object","properties":{"invitationUrl":{"type":"string","description":"A list of user's roles","example":"http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ"}},"required":["invitationUrl"]},"AcceptInvitationResponseDto":{"type":"object","properties":{"connectionId":{"type":"string"},"connectionName":{"type":"string"},"did":{"type":"string"},"invitationDid":{"type":"string"},"outOfBandId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["connectionId","createdAt"]},"CreateSchemaRequestDto":{"type":"object","properties":{"name":{"type":"string","example":"my test schema"},"attributes":{"example":["first_name, last_name"],"type":"array","items":{"type":"string"}},"version":{"type":"string","example":"1.0.2","pattern":"/^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$/"}},"required":["name","attributes","version"]},"CreateSchemaResponseDto":{"type":"object","properties":{"schemaId":{"type":"string"},"issuerId":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"attributes":{"type":"array","items":{"type":"string"}}},"required":["schemaId","issuerId","name","version","attributes"]},"CreateCredentialDefinitionRequsetDto":{"type":"object","properties":{"schemaId":{"type":"string"},"tag":{"type":"string"}},"required":["schemaId","tag"]},"CreateCredentialDefinitionResponseDto":{"type":"object","properties":{"credentialDefinitionId":{"type":"string"},"schemaId":{"type":"string"},"isserId":{"type":"string"},"tag":{"type":"string"}},"required":["credentialDefinitionId","schemaId","isserId","tag"]},"IssueCredentialAttributes":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"IssueCredentialRequestDto":{"type":"object","properties":{"connectionId":{"type":"string","example":"6464b521-005a-4379-91e0-a3692b31cafd"},"credentialDefinitionId":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/IssueCredentialAttributes"}}},"required":["connectionId","credentialDefinitionId","attributes"]},"Credential":{"type":"object","properties":{"credentialRecordType":{"type":"string"},"credentialRecordId":{"type":"string"}},"required":["credentialRecordType","credentialRecordId"]},"IssueCredentialResponseDto":{"type":"object","properties":{"credentials":{"type":"array","items":{"$ref":"#/components/schemas/Credential"}},"credentialId":{"type":"string"},"connectionId":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/IssueCredentialAttributes"}},"createdAt":{"format":"date-time","type":"string"}},"required":["credentialId","createdAt"]},"IssueProofResponseDto":{"type":"object","properties":{"proofId":{"type":"string"},"connectionId":{"type":"string","example":"6464b521-005a-4379-91e0-a3692b31cafd"},"state":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["proofId","state","createdAt"]},"IssueProofAttribute":{"type":"object","properties":{"attributeName":{"type":"string"},"credentialDefinitionId":{"type":"string"},"schemaId":{"type":"string"}},"required":["attributeName","credentialDefinitionId","schemaId"]},"IssueProofRequestDto":{"type":"object","properties":{"connectionId":{"type":"string","example":"6464b521-005a-4379-91e0-a3692b31cafd"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/IssueProofAttribute"}}},"required":["attributes"]},"MakeBasicMessageRequestDto":{"type":"object","properties":{"connectionId":{"type":"string","example":"6464b521-005a-4379-91e0-a3692b31cafd"},"message":{"type":"string","example":"hello world"}},"required":["connectionId","message"]},"MakeBasicMessageResponseDto":{"type":"object","properties":{"id":{"type":"string"},"connectionId":{"type":"string","example":"6464b521-005a-4379-91e0-a3692b31cafd"},"from":{"type":"string","example":"example-ocm-name"},"to":{"type":"string","example":"example-ocm-name"},"message":{"type":"string","example":"hello world"}},"required":["id","connectionId","message"]}}}} \ No newline at end of file diff --git a/apps/agent/README.md b/apps/agent/README.md index 4ac3348f..63a0c611 100644 --- a/apps/agent/README.md +++ b/apps/agent/README.md @@ -1,4 +1,4 @@ -# OCM ENGINE - AGENT +# OCM ENGINE - AGENT Agent service is a wrapper around @ocm-engine/askar library. diff --git a/apps/agent/deployment/ci-cd/helm/templates/deployment.yaml b/apps/agent/deployment/ci-cd/helm/templates/deployment.yaml index 360712b0..b49dfb1c 100644 --- a/apps/agent/deployment/ci-cd/helm/templates/deployment.yaml +++ b/apps/agent/deployment/ci-cd/helm/templates/deployment.yaml @@ -126,6 +126,44 @@ spec: value: {{ .Values.ocmtest.gateway.messagePattern | quote }} - name: GATEWAY_HOST value: {{ .Values.ocmtest.gateway.host | quote }} + {{- else if eq .Release.Namespace "hin" }} + - name: LEDGERS + value: {{ .Values.hin.agent.ledgers | quote }} + - name : AGENT_PEER_URL + value: {{ .Values.hin.agent.peer.url | quote }} + - name: AGENT_NAME + value: {{ .Values.hin.agent.name | quote }} + - name: AGENT_KEY + value: {{ .Values.hin.agent.key | quote }} + - name: AGENT_DID_SEED + value: {{ .Values.hin.agent.did.seed | quote }} + - name: AGENT_DB_HOST + value: {{ .Values.hin.agent.db.host | quote }} + - name: AGENT_DB_USER + value: {{ .Values.hin.agent.db.user | quote }} + - name: AGENT_DB_PASS + value: {{ .Values.hin.agent.db.pass | quote }} + - name: AGENT_PORT + value: {{ .Values.hin.agent.port | quote }} + - name: AGENT_IS_REST + value: {{ .Values.hin.agent.is.rest | quote }} + - name: AGENT_IS_SVDX + value: {{ .Values.hin.agent.is.svdx | quote }} + - name: AGENT_SVDX_SCHEMA_ID + value: {{ .Values.hin.agent.svdx.schema.id | quote }} + - name: AGENT_SVDX_CRED_DEF_ID + value: {{ .Values.hin.agent.svdx.cred.def.id | quote }} + - name: AGENT_SVDX_WEBHOOK_URL + value: {{ .Values.hin.agent.svdx.webhook.url | quote }} + - name: AGENT_SVDX_BASIC_USER + value: {{ .Values.hin.agent.svdx.basic.user | quote }} + - name: AGENT_SVDX_BASIC_PASS + value: {{ .Values.hin.agent.svdx.basic.pass | quote }} + - name: AGENT_MAX_MESSAGES + value: {{ .Values.hin.agent.max.messages | quote }} + - name: AGENT_RETE_LIMIT + value: {{ .Values.hin.agent.rete.limit | quote }} + {{- end }} {{- if .Values.extraVars }} {{ toYaml .Values.extraVars | indent 8 }} diff --git a/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml b/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml index 39fd7c1d..0bd3c660 100644 --- a/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml +++ b/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml @@ -38,5 +38,23 @@ spec: name: {{ template "app.name" . }} port: number: {{ .Values.service.port1 }} + {{- else if eq .Release.Namespace "hin" }} + - host: {{ .Values.ingress.frontendDomain }} + http: + paths: + - path: /hin-agent(/|$)(.*) + pathType: Prefix + backend: + service: + name: {{ template "app.name" . }} + port: + number: {{ .Values.service.port1 }} + - path: /api-hin-agent(/|$)(.*) + pathType: Prefix + backend: + service: + name: {{ template "app.name" . }} + port: + number: {{ .Values.hin.agent.port }} {{- end }} {{- end }} diff --git a/apps/agent/deployment/ci-cd/helm/values.yaml b/apps/agent/deployment/ci-cd/helm/values.yaml index 39dfbf04..786ae568 100644 --- a/apps/agent/deployment/ci-cd/helm/values.yaml +++ b/apps/agent/deployment/ci-cd/helm/values.yaml @@ -7,9 +7,9 @@ nameOverride: "" image: repository: eu.gcr.io/vrgn-infra-prj - # -- Image name . + # -- Image name .. name: gaiax/ocm/ocm-engine/agent - # -- Image tag . + # -- Image tag .. # Uses .Chart.AppVersion if empty . tag: "" # -- Image sha, usually generated by the CI . @@ -115,6 +115,39 @@ ocmtest: maxMessage: 10 rateLimit: 5 +hin: + agent: + ledgers: "BCOVRIN_TEST" + peer: + url: "https://ssi-dev.vereign.com/hin-agent" + name: "hin-agent" + key: "Fpvsvz0seqevq7RRiPbRT6AcrMXcaY8d" + did: + seed: "8rQuMQ6YeVF1CVyKp4KZTwM4irGl26Ds" + port: 8080 + is: + rest: "true" + svdx: "true" + svdx: + basic: + user: "" + pass: "" + schema: + id: "did:indy:bcovrin:test:Qtays75Zq3NbMRMGbw9JKM/anoncreds/v0/SCHEMA/demo-hin-schema/0.0.1" + cred: + def: + id: "did:indy:bcovrin:test:Qtays75Zq3NbMRMGbw9JKM/anoncreds/v0/CLAIM_DEF/66375/demo-hin-cred-def" + webhook: + url: "https://did.svdx.pro/ocm/connection" + max: + messages: 10 + rete: + limit: 5 + db: + host: "" + user: "" + pass: "" + nats: server: "nats.ocm-test:4222" name: "ssi_holder_stream" diff --git a/apps/agent/deployment/local/HinDockerfile b/apps/agent/deployment/local/HinDockerfile new file mode 100644 index 00000000..23dab27c --- /dev/null +++ b/apps/agent/deployment/local/HinDockerfile @@ -0,0 +1,15 @@ +FROM node:18.16.0-buster-slim + +RUN apt update -y && apt install python3 git make cmake build-essential -y + +WORKDIR /app + +COPY . . + +RUN yarn install +RUN yarn build:agent + +EXPOSE 8080 +EXPOSE 8001 + +CMD ["node", "./dist/apps/agent/main.js"] diff --git a/apps/agent/src/main.ts b/apps/agent/src/main.ts index 14dc11a6..2cec87b8 100644 --- a/apps/agent/src/main.ts +++ b/apps/agent/src/main.ts @@ -8,6 +8,7 @@ import { NestFactory } from "@nestjs/core"; import { AppModule } from "./app/app.module"; import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; +import * as fs from "fs"; async function bootstrap() { const app = await NestFactory.create(AppModule); @@ -23,6 +24,7 @@ async function bootstrap() { .build(); const document = SwaggerModule.createDocument(app, config); + fs.writeFileSync("./agent-swagger.json", JSON.stringify(document)); SwaggerModule.setup("api", app, document); await app.listen(port, "0.0.0.0"); diff --git a/libs/askar/src/agent.utils.ts b/libs/askar/src/agent.utils.ts index f28e6acb..2b6ab20a 100644 --- a/libs/askar/src/agent.utils.ts +++ b/libs/askar/src/agent.utils.ts @@ -242,6 +242,9 @@ export const svdxProofStateChangeHandler = async ( } try { + console.log( + `sending data to svdx ${email}, ${ev.payload.proofRecord.connectionId}`, + ); await axios.post( config?.agentSVDXWebHook, { diff --git a/libs/config/src/config/agent.config.ts b/libs/config/src/config/agent.config.ts index c7fced91..112fd7a3 100644 --- a/libs/config/src/config/agent.config.ts +++ b/libs/config/src/config/agent.config.ts @@ -15,8 +15,9 @@ export const agentConfig = registerAs( agentDbPass: process.env["AGENT_DB_PASS"]!, agentIsRest: process.env["AGENT_IS_REST"] === "true", agentConsumerName: process.env["AGENT_CONSUMER_NAME"]!, - agentConsumerMaxMessagess: parseInt(process.env["AGENT_MAX_MESSAGES"]!), - agentConsumerRateLimit: parseInt(process.env["AGENT_RETE_LIMIT"]!), + agentConsumerMaxMessagess: + parseInt(process.env["AGENT_MAX_MESSAGES"]!) || 10, + agentConsumerRateLimit: parseInt(process.env["AGENT_RETE_LIMIT"]!) || 5, agentPort: parseInt(process.env["AGENT_PORT"]!), agentIsSVDX: process.env["AGENT_IS_SVDX"] === "true", agentSVDXSchemaId: process.env["AGENT_SVDX_SCHEMA_ID"]!, diff --git a/libs/config/src/config/gateway.config.ts b/libs/config/src/config/gateway.config.ts index b10c37b6..73bc0dc5 100644 --- a/libs/config/src/config/gateway.config.ts +++ b/libs/config/src/config/gateway.config.ts @@ -8,6 +8,6 @@ export const gatewayConfig = registerAs( httpPort: parseInt(process.env["GATEWAY_HTTP_PORT"]!), tcpPort: parseInt(process.env["GATEWAY_TCP_PORT"]!), messagePattern: process.env["GATEWAY_MESSAGE_PATTERN"]!, - host: process.env["GATEWAY_HOST"]!, + host: process.env["GATEWAY_HOST"], }), ); diff --git a/libs/config/src/config/nats.config.ts b/libs/config/src/config/nats.config.ts index 8ff40b17..852221e2 100644 --- a/libs/config/src/config/nats.config.ts +++ b/libs/config/src/config/nats.config.ts @@ -5,8 +5,14 @@ import { IConfNats } from "../interfaces/nats.config.interface"; export const natsConfig = registerAs( "nats", (): IConfNats => ({ - servers: process.env["NATS_SERVERS"]!.split(","), - streamName: process.env["NATS_STREAM_NAME"]!, - subjects: process.env["NATS_SUBJECTS"]!.split(","), + servers: + (process.env["NATS_SERVERS"] && + process.env["NATS_SERVERS"]!.split(",")) || + [], + streamName: process.env["NATS_STREAM_NAME"]! || "default-stream", + subjects: + (process.env["NATS_SUBJECTS"] && + process.env["NATS_SUBJECTS"]!.split(",")) || + [], }), ); diff --git a/libs/config/src/interfaces/gateway.config.interface.ts b/libs/config/src/interfaces/gateway.config.interface.ts index 2ded1cce..fc944722 100644 --- a/libs/config/src/interfaces/gateway.config.interface.ts +++ b/libs/config/src/interfaces/gateway.config.interface.ts @@ -2,5 +2,5 @@ export interface IGateway { httpPort: number; tcpPort: number; messagePattern: string; - host: string; + host?: string; } diff --git a/libs/config/src/schemas/nats.schema.ts b/libs/config/src/schemas/nats.schema.ts index 4d0d3d39..fa750741 100644 --- a/libs/config/src/schemas/nats.schema.ts +++ b/libs/config/src/schemas/nats.schema.ts @@ -1,7 +1,7 @@ import Joi from "joi"; export const natsSchema = Joi.object({ - NATS_SERVERS: Joi.string().required(), - NATS_STREAM_NAME: Joi.string().required(), - NATS_SUBJECTS: Joi.string().required(), + NATS_SERVERS: Joi.string(), + NATS_STREAM_NAME: Joi.string(), + NATS_SUBJECTS: Joi.string(), }); -- GitLab