Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private key security updates/fixes #2108

Merged
merged 5 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions deployments/Dockerfiles/autonomy/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ function handleCosmosConnectionKeyAndCerts() {
if [ ! -f "cosmos_private_key.txt" ]; then
generateKey cosmos
fi
aea add-key cosmos --connection
aea issue-certificates

if [[ "$AEA_PASSWORD" != "" ]]; then
aea add-key cosmos --connection --password $AEA_PASSWORD
aea issue-certificates --password $AEA_PASSWORD
else
aea add-key cosmos --connection
aea issue-certificates
fi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #2088

}

function runAgent() {
Expand Down
25 changes: 25 additions & 0 deletions docs/advanced_reference/commands/autonomy_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,31 @@ autonomy deploy build keys.json -ltm

Builds a service deployment using the keys stored in the file `keys.json` and applying environment variables to the service configuration file. The deployment will be generated by default for as many agents as keys are stored in `keys.json`. By default, the command searches for the file `keys.json`, if no file name is provided.

### Private key security

When building deployments, you can use password protected privates keys (eg. generated using `autonomy generate-key LEDGER --password PASSWORD`) to avoid exposing them.

#### Docker Compose

In a `docker-compose` deployment you can just export `OPEN_AUTONOMY_PRIVATE_KEY_PASSWORD` environment variable before running the deployment like

```bash
OPEN_AUTONOMY_PRIVATE_KEY_PASSWORD=PASSWORD autonomy deploy run --build-dir PATH_TO_BUILD_DIR
angrybayblade marked this conversation as resolved.
Show resolved Hide resolved
```

or

```bash
OPEN_AUTONOMY_PRIVATE_KEY_PASSWORD=PASSWORD docker-compose -f PATH_TO_BUILD_DIR/docker-compose.yaml up
angrybayblade marked this conversation as resolved.
Show resolved Hide resolved
```

#### Kubernetes

In a `kubernetes` deployment, you'll have to export the `OPEN_AUTONOMY_PRIVATE_KEY_PASSWORD` variable when building the deployment, not when running.

```bash
OPEN_AUTONOMY_PRIVATE_KEY_PASSWORD=PASSWORD autonomy deploy build (...)
angrybayblade marked this conversation as resolved.
Show resolved Hide resolved
```

## `autonomy deploy run`

Expand Down
Loading