crypto-com / thaler

Thaler Experimental Network; For Crypto.org Chain: github.com/crypto-org-chain/chain-main
https://thaler-testnet.crypto.com
Other
158 stars 80 forks source link

Problem: enclave-ra sp-* can't be configured as environment variable #1742

Open leejw51crypto opened 4 years ago

leejw51crypto commented 4 years ago

because of keypackage, global env variable for SPID, IAS_API_KEY is necessary. for ease of deployment.

for integrity export CRYPTO_SPID= ?? export CRYPTO_IAS_API_KEY= ??

change all source code to refer to this env variables ra-sp-server also refer to env if argument is not given for above

also make sure other env variables started with CRYPTO_ prefix

tomtau commented 4 years ago

@leejw51crypto why is it necessary? just the proxy ("sp-...") needs to be started with this?

leejw51crypto commented 4 years ago

i'm thinking to automate run proxy, or proxy url can be declared as env variable.

because serveral programs client-cli, dev-utils relies on ra-sp-server connection

usually, those will work with argument, but like CRYPTO_CHAIN_ID, if there is standard env variable, it would be handy

tomtau commented 4 years ago

i'm thinking to automate run proxy, or proxy url can be declared as env variable.

because serveral programs client-cli, dev-utils relies on ra-sp-server connection

usually, those will work with argument, but like CRYPTO_CHAIN_ID, if there is standard env variable, it would be handy

yes, proxy url is better to be a parameter

devashishdxt commented 4 years ago

@leejw51crypto SPID and IAS_KEY can be provided from environment variables also. https://github.com/crypto-com/chain/blob/ed20aa11c640c1ea5bd9a166563a85257566f8e1/chain-tx-enclave-next/enclave-ra/ra-sp-server/src/config.rs#L19