From c15657e4da828e29d4dc4c8f6662b38e4dd7c8e5 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Tue, 3 Oct 2023 14:53:03 -0700 Subject: [PATCH 1/3] Enable Sorvin TestNet endorser. Signed-off-by: Wade Barnes --- openshift/manage | 25 +++++++++++-------- ...es-endorser-agent-deploy.sovrin.test.param | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/openshift/manage b/openshift/manage index 5a8709ae..0360ed9e 100644 --- a/openshift/manage +++ b/openshift/manage @@ -354,7 +354,10 @@ EOL -H "Authorization: ${endorserTokenType^} ${endorserToken}" \ "${endorserUrl}/endorser/v1/admin/config") - endoserPublicDid=$(${JQ_EXE} -nr "${endorserConfig} | .endorser_config.public_did.did") + # Write results to a file, as they can be too long for direct input into jq. + echo "${endorserConfig}" > endorserConfig.json + endoserPublicDid=$(${JQ_EXE} -r ".endorser_config.public_did.did" endorserConfig.json) + rm endorserConfig.json echo -e "Retrieving author configuration from ${authorUrl} ..." authorConfig=$(${CURL_EXE} \ @@ -365,8 +368,8 @@ EOL "${authorUrl}/wallet/did/public") authorPublicDid=$(${JQ_EXE} -nr "${authorConfig} | .result.did") - # Author Agent: Use the POST /didexchange/create-request to request a connection with the endorser, using the endorser's public DID. - # Set the alias to Endorser - this MUST match the --endorser-alias 'Endorser' setting (in the ngrok-wait.sh script). + # Author Agent: Use the POST /didexchange/create-request to request a connection with the endorser, using the endorser's public DID. + # Set the alias to Endorser - this MUST match the --endorser-alias 'Endorser' setting (in the ngrok-wait.sh script). # Use the GET /connections endpoint to verify the connection is in request state. # -------------------------------------------------------------------------------------------------------------------------------------------------------------------- echo -e "Searching for existing author connections ..." @@ -386,7 +389,7 @@ EOL -H "accept: application/json" \ -H "X-Api-Key: ${authorApiKey}" \ "${authorUrl}/didexchange/create-request?their_public_did=${endoserPublicDid}&alias=${endorserAlias}&use_public_did=true") - + # Give the connection request some time to be registered with the endorser. sleep 5 elif (( ${authorConnectionResults} == 1 )); then @@ -408,8 +411,8 @@ EOL authorConnectionId=$(${JQ_EXE} -nr "${authorConnection} | .connection_id") authorConnectionState=$(${JQ_EXE} -nr "${authorConnection} | .state") - # Endorser Service: Use the GET /v1/connections endpoint to see the connection request (state request). - # Using the connection_id, call the POST /connections/{connection_id}/accept endpoint to accept the request. + # Endorser Service: Use the GET /v1/connections endpoint to see the connection request (state request). + # Using the connection_id, call the POST /connections/{connection_id}/accept endpoint to accept the request. # Verify that the connection state goes to active. # -------------------------------------------------------------------------------------------------------------------------------------------------------------------- echo -e "Locating the matching connection on the endorser side ..." @@ -485,9 +488,9 @@ EOL echo fi - # Author Agent: Verify the connection state goes to active. - # Use the POST /transactions/{conn_id}/set-endorser-role to set the connection role to TRANSACTION_AUTHOR, - # and then use POST /transactions/{conn_id}/set-endorser-info to set the endorser's alias to Endorser and + # Author Agent: Verify the connection state goes to active. + # Use the POST /transactions/{conn_id}/set-endorser-role to set the connection role to TRANSACTION_AUTHOR, + # and then use POST /transactions/{conn_id}/set-endorser-info to set the endorser's alias to Endorser and # the public DID to the endorser's public DID. Verify the settings using the GET /connections/{conn_id}/meta-data endpoint. # -------------------------------------------------------------------------------------------------------------------------------------------------------------------- if [[ "${authorConnectionState}" != "${ACTIVE_STATE}" ]]; then @@ -506,7 +509,7 @@ EOL echo else echo -e "The author connection is already ${ACTIVE_STATE}." - fi + fi echo -e "Setting up the roles and endorser information on the author's connection ..." authorSetEndorserRoleResponse=$(${CURL_EXE} \ @@ -616,7 +619,7 @@ case "${_cmd}" in registerauthor) isCurlInstalled isJQInstalled - + registerAuthor ${@} ;; diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param index 669735be..b09493d4 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param @@ -13,7 +13,7 @@ # PROXY_ROLE=proxy # IMAGE_NAMESPACE=4a9599-tools TAG_NAME=test -ACAPY_READ_ONLY_LEDGER=true +ACAPY_READ_ONLY_LEDGER=false # ADMIN_API_KEY=[a-zA-Z0-9]{32} # ACAPY_AUTO_PROVISION=true # ACAPY_EMIT_NEW_DIDCOMM_PREFIX=true From 8e36c0f68dee02cdddb3ad149c4531e0ddba38e4 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Wed, 4 Oct 2023 14:41:16 -0700 Subject: [PATCH 2/3] Update Endorser settings - Enable endorser to accept unsolicited connection requests though it's public DID. Signed-off-by: Wade Barnes --- .../aries-endorser-agent-deploy.bcovrin.dev.param | 1 + .../aries-endorser-agent-deploy.bcovrin.param | 1 + .../aries-endorser-agent-deploy.bcovrin.prod.param | 1 + .../aries-endorser-agent-deploy.bcovrin.test.param | 1 + .../aries-endorser-agent-deploy.dev.param | 1 + .../aries-endorser-agent/aries-endorser-agent-deploy.param | 1 + .../aries-endorser-agent-deploy.prod.param | 1 + .../aries-endorser-agent-deploy.sovrin.param | 1 + .../aries-endorser-agent-deploy.sovrin.prod.param | 1 + .../aries-endorser-agent-deploy.sovrin.test.param | 1 + .../aries-endorser-agent-deploy.test.param | 1 + .../aries-endorser-agent/aries-endorser-agent-deploy.yaml | 7 +++++++ 12 files changed, 18 insertions(+) diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.dev.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.dev.param index d7ced5d7..64611c63 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.dev.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.dev.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.param index 335df8a0..098b85ed 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.param @@ -20,6 +20,7 @@ ACAPY_EMIT_NEW_DIDCOMM_PREFIX=true ACAPY_AUTO_PING_CONNECTION=true ACAPY_MONITOR_PING=true ACAPY_PUBLIC_INVITES=true +ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true ACAPY_NOTIFY_REVOCATION=true ACAPY_MONITOR_REVOCATION_NOTIFICATION=true AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.prod.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.prod.param index c89579ab..fb91fdaa 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.prod.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.prod.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.test.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.test.param index 4123ca66..245b3ae3 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.test.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.bcovrin.test.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.dev.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.dev.param index 7bee23ff..62e3d7bc 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.dev.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.dev.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.param index 539a9df5..845ec6ab 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.param @@ -20,6 +20,7 @@ ACAPY_EMIT_NEW_DIDCOMM_PREFIX=true ACAPY_AUTO_PING_CONNECTION=true ACAPY_MONITOR_PING=true ACAPY_PUBLIC_INVITES=true +ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true ACAPY_NOTIFY_REVOCATION=true ACAPY_MONITOR_REVOCATION_NOTIFICATION=true AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.prod.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.prod.param index ac8f2a59..b3ae52f5 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.prod.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.prod.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.param index 741d5697..08d6fe3e 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.param @@ -20,6 +20,7 @@ ACAPY_EMIT_NEW_DIDCOMM_PREFIX=true ACAPY_AUTO_PING_CONNECTION=true ACAPY_MONITOR_PING=true ACAPY_PUBLIC_INVITES=true +ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true ACAPY_NOTIFY_REVOCATION=true ACAPY_MONITOR_REVOCATION_NOTIFICATION=true AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param index a58d90e0..051693df 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=true # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param index b09493d4..dbaf42db 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.test.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.test.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.test.param index f271c5a8..666469eb 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.test.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.test.param @@ -20,6 +20,7 @@ ACAPY_READ_ONLY_LEDGER=false # ACAPY_AUTO_PING_CONNECTION=true # ACAPY_MONITOR_PING=true # ACAPY_PUBLIC_INVITES=true +# ACAPY_REQUESTS_THROUGH_PUBLIC_DID=true # ACAPY_NOTIFY_REVOCATION=true # ACAPY_MONITOR_REVOCATION_NOTIFICATION=true # AGENT_ADMIN_PORT=8051 diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.yaml b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.yaml index 38955f76..76189150 100755 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.yaml +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.yaml @@ -189,6 +189,8 @@ objects: value: ${ACAPY_MONITOR_PING} - name: ACAPY_PUBLIC_INVITES value: ${ACAPY_PUBLIC_INVITES} + - name: ACAPY_REQUESTS_THROUGH_PUBLIC_DID + value: ${ACAPY_REQUESTS_THROUGH_PUBLIC_DID} - name: ACAPY_NOTIFY_REVOCATION value: ${ACAPY_NOTIFY_REVOCATION} - name: ACAPY_MONITOR_REVOCATION_NOTIFICATION @@ -429,6 +431,11 @@ parameters: description: Send invitations out, and receive connection requests, using the public DID for the agent. required: true value: 'true' + - name: ACAPY_REQUESTS_THROUGH_PUBLIC_DID + displayName: Accept Requests Through Public DID + description: Allow agent to receive unsolicited connection requests, using the public DID for the agent. + required: true + value: 'true' - name: ACAPY_NOTIFY_REVOCATION displayName: Notify Revocation description: Specifies that aca-py will notify credential recipients when revoking a credential it issued. From 069ffe213871bd84d3655f94c7af6ab8b861d6da Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Thu, 5 Oct 2023 10:30:35 -0700 Subject: [PATCH 3/3] Enable Sorvin MainNet endorser. Signed-off-by: Wade Barnes --- .../aries-endorser-agent-deploy.sovrin.prod.param | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param index 051693df..4ed4bfb1 100644 --- a/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param +++ b/openshift/templates/aries-endorser-agent/aries-endorser-agent-deploy.sovrin.prod.param @@ -13,7 +13,7 @@ # PROXY_ROLE=proxy # IMAGE_NAMESPACE=4a9599-tools TAG_NAME=prod -ACAPY_READ_ONLY_LEDGER=true +ACAPY_READ_ONLY_LEDGER=false # ADMIN_API_KEY=[a-zA-Z0-9]{32} # ACAPY_AUTO_PROVISION=true # ACAPY_EMIT_NEW_DIDCOMM_PREFIX=true