diff --git a/README.md b/README.md index 310e650..da07d0c 100644 --- a/README.md +++ b/README.md @@ -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