Skip to content

Commit

Permalink
Merge pull request #33 from WadeBarnes/sovrin
Browse files Browse the repository at this point in the history
Enable Sovrin TestNet and MainNet endorser, and update endorser agent settings
  • Loading branch information
esune authored Oct 6, 2023
2 parents 8810c01 + 069ffe2 commit 4926cb9
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 13 deletions.
25 changes: 14 additions & 11 deletions openshift/manage
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand All @@ -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 ..."
Expand All @@ -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
Expand All @@ -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 ..."
Expand Down Expand Up @@ -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
Expand All @@ -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} \
Expand Down Expand Up @@ -616,7 +619,7 @@ case "${_cmd}" in
registerauthor)
isCurlInstalled
isJQInstalled

registerAuthor ${@}
;;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
# 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
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
# 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
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4926cb9

Please sign in to comment.