Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mealal authored Feb 22, 2019
1 parent 7074a3b commit fc0c470
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ Used source code from https://github.com/desteves/mongodb-atlas-service-broker/

### Build
```
go build -o vault-atlas-plugin ./mongodb-atlas-plugin/main.go
go build -o atlas ./mongodb-atlas-plugin/main.go
```

### Install
Place vault-atlas-plugin file into your plugins folder and run
Place atlas file into your plugins folder and run
```
SHASUM=$(shasum -a 256 "./vault-atlas-plugin" | cut -d " " -f1)
vault write sys/plugins/catalog/database/vault-atlas-plugin sha_256="$SHASUM" command="vault-atlas-plugin"
vault write database/config/vault-atlas-plugin plugin_name=vault-atlas-plugin allowed_roles="readonly" apiID="public API key" apiKey="private API key" groupID="group id"
vault secrets enable database
SHASUM=$(shasum -a 256 "./atlas" | cut -d " " -f1)
vault write sys/plugins/catalog/database/atlas sha_256="$SHASUM" command="atlas"
vault write database/roles/readonly db_name=atlas creation_statements='{ "db": "admin", "roles": [{ "role": "readAnyDatabase" }] }' default_ttl="1h" max_ttl="24h"
vault write database/config/atlas plugin_name=atlas allowed_roles="readonly" apiID="public API key" apiKey="private API key" groupID="group id"
```

### Test
Expand Down

0 comments on commit fc0c470

Please sign in to comment.