Wallet Seed Environment variables name consistency
sgroh opened this issue · 2 comments
sgroh commented
On the docker-compose is declared INDY_WALLET_SEED with the environment variable AGENT_WALLET_SEED but I did not find it's usage on the container, Would not it be better to declare ACAPY_WALLET_SEED on the manage script as environment variable and use it here in the command and also to provide the value to the container?
I've created a PR to reflect this: #428
agent:
image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.9.0
environment:
LEDGER_URL: ${LEDGER_URL}
WALLET_TYPE: ${AGENT_STORAGE_WALLET_TYPE}
POSTGRESQL_WALLET_HOST: ${WALLET_HOST}
POSTGRESQL_WALLET_PORT: ${WALLET_PORT}
POSTGRESQL_WALLET_USER: ${WALLET_USER}
POSTGRESQL_WALLET_PASSWORD: ${WALLET_PASSWORD}
WALLET_ENCRYPTION_KEY: ${AGENT_WALLET_ENCRYPTION_KEY}
INDY_WALLET_SEED: ${AGENT_WALLET_SEED}
WEBHOOK_URL: ${AGENT_WEBHOOK_URL}
HTTP_INTERFACE_PORT: ${AGENT_HTTP_INTERFACE_PORT}
AGENT_ADMIN_PORT: ${AGENT_ADMIN_PORT}
AGENT_NAME: ${AGENT_NAME}
AGENT_ADMIN_API_KEY: ${AGENT_ADMIN_API_KEY}
TAILS_SERVER_URL: ${TAILS_SERVER_URL}
networks:
- issuer_kit
ports:
- ${AGENT_HTTP_INTERFACE_PORT}:${AGENT_HTTP_INTERFACE_PORT}
- ${AGENT_ADMIN_PORT}:${AGENT_ADMIN_PORT}
depends_on:
- wallet
entrypoint: /bin/bash
command: [
"-c",
"curl -d '{\"seed\":\"${AGENT_WALLET_SEED}\", \"role\":\"TRUST_ANCHOR\", \"alias\":\"${AGENT_NAME}\"}' -X POST ${LEDGER_URL}/register; \
sleep 5; \
aca-py start \
--inbound-transport http '0.0.0.0' ${AGENT_HTTP_INTERFACE_PORT} \
--outbound-transport http \
--endpoint ${AGENT_ENDPOINT} \
--genesis-url '${LEDGER_URL}/genesis' \
--auto-accept-invites \
--auto-accept-requests \
--auto-ping-connection \
--auto-respond-messages \
--auto-store-credential \
--auto-verify-presentation \
--auto-respond-presentation-proposal \
--auto-provision \
--wallet-type 'askar' \
--wallet-name '${AGENT_WALLET_NAME}' \
--wallet-key '${AGENT_WALLET_ENCRYPTION_KEY}' \
--wallet-storage-type '${AGENT_STORAGE_WALLET_TYPE}' \
--wallet-storage-config '{\"url\":\"${WALLET_HOST}:${WALLET_PORT}\",\"max_connections\":5}' \
--wallet-storage-creds '{\"account\":\"${WALLET_USER}\",\"password\":\"${WALLET_PASSWORD}\",\"admin_account\":\"${WALLET_USER}\",\"admin_password\":\"${WALLET_PASSWORD}\"}' \
--seed '${AGENT_WALLET_SEED}' \
--admin '0.0.0.0' ${AGENT_ADMIN_PORT} \
--${AGENT_ADMIN_MODE} \
--label ${AGENT_NAME} \
--tails-server-base-url ${TAILS_SERVER_URL}",
]
esune commented
Comment left on the PR, thanks for the issue/resolution - definitely a good idea to keep naming consistent