Skip to content

Commit

Permalink
Merge pull request #10 from ccgarant/ccg-dev--240223
Browse files Browse the repository at this point in the history
clarifications on env variable setup updates & warning verboseness for security
  • Loading branch information
zargarzadehm authored Feb 25, 2024
2 parents ee10405 + e0105b0 commit 0ef5375
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
8 changes: 6 additions & 2 deletions docs/guard/env-references.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Environment Variable References
Note:
- For the environmental variable file, no quotes are needed around the strings.
- Delete all comments after copying and pasting in.
- Delete all whitespaces after the last word of the line item entry.

# Required Environments
```
Expand All @@ -14,9 +18,9 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it.

# Optional Environments
```
API_KEY_HASH= # blake2b hash of api_key
API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere
MNEMONIC= # ergo mnemonic phrases
MNEMONIC= # ergo mnemonic phrases, e.g. MNEMONIC=word1 word2 word3 ... wordn
TSS_SECRET= # the secret used to encrypt messages to start the signing process
Expand Down
4 changes: 2 additions & 2 deletions docs/guard/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Use [rosen command line](https://github.com/rosen-bridge/utils/tree/dev/packages
#### Update Configuration File
After obtaining the hash, input it into your config file. For example, the Blake2b hash of `hello` is `324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf`.

> **NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration.
> **⚠️ NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration. See your `.env` file. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your api key while troubleshooting etc. After updating, you can delete `apiKeyHash` from /config/local.yaml.

## DATABASE
Specify your database connection and credentials.
Expand Down Expand Up @@ -245,7 +245,7 @@ guard:
mnemonic: 'YOUR_MNEMONIC'
```

> **NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings.
> **⚠️ NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your seed phrase while troubleshooting etc. See your `.env` file. Once updated, in /config/local.yaml delete your mnemonic phrase and put in a comment like so "mnemonic: #see local config env file"

## Logs

Expand Down
8 changes: 6 additions & 2 deletions docs/watcher/deploy-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Create your environment file `.env` based on `env.template` file in the `watcher
cp env.template .env
```

To view hidden .env later, use `ls -a`.

## Environment Variable Configs
You can configure some Environment Variables when deploying with docker, you can find all of them [here](./env-references.md).

Expand Down Expand Up @@ -94,7 +96,9 @@ Use [rosen command line](https://github.com/rosen-bridge/utils/tree/dev/packages
#### Update Configuration File
After obtaining the hash, input it into your config file. For example, the Blake2b hash of `hello` is `324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf`.

> **NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration.
> **⚠️ NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration. See your `.env` file. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your api key while troubleshooting etc. After updating, you can delete `apiKeyHash` from /config/local.yaml.


### Ergo Config (Essential for all watchers)

Expand All @@ -108,7 +112,7 @@ mnemonic: <your wallet mnemonic>
> Note: Utilizing this mnemonic in a standard multi-address wallet will lead to watcher misbehavior.
> **NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings.
> **⚠️ NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your seed phrase while troubleshooting etc. See your `.env` file. Once updated, in /config/local.yaml delete your mnemonic phrase and put in a comment like so "mnemonic: #see local config env file"

1. Select your primary data source for the Ergo network; block and box information are retrieved from this source. You can use either `explorer` or `node` as the primary source:

Expand Down
9 changes: 6 additions & 3 deletions docs/watcher/env-references.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Environment Variable References

Note:
- For the environmental variable file, no quotes are needed around the the strings.
- Delete all comments after copying and pasting in.
- Delete all whitespaces after the last word of the line item entry.

# Required Environments
```
Expand All @@ -15,9 +18,9 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it.

# Optional Environments
```
API_KEY_HASH= # blake2b hash of api_key
API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere
MNEMONIC= # watcher mnemonic phrases
MNEMONIC= # watcher mnemonic phrases, e.g. MNEMONIC=word1 word2 word3 ... wordn
KOIOS_AUTH_TOKEN=
Expand Down

0 comments on commit 0ef5375

Please sign in to comment.