Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vagrant@master:~$ vault write mongodb/roles/create db_name="connection" roles='[ "readWrite", { "role": "read", "db": "admin" } ]'
- Success! Data written to: mongodb/roles/create
- vagrant@master:~$ vault read mongodb/creds/create
- Error reading mongodb/creds/create: Error making API request.
- URL: GET http://127.0.0.1:8200/v1/mongodb/creds/create
- Code: 500. Errors:
- * 1 error occurred:
- * empty creation statements
- # With creation_statements
- vagrant@master:~$ vault write mongodb/roles/create db_name="connection" roles='[ "readWrite", { "role": "read", "db": "admin" } ]' creation_statements="db.createUser( \
- { \
- roles: [ { role: "read", db: "admin" } ] \
- } \
- )
- "
- Success! Data written to: mongodb/roles/create
- vagrant@master:~$ vault read mongodb/roles/create
- Key Value
- --- -----
- creation_statements [db.createUser( { roles: [ { role: read, db: admin } ] } )]
- db_name connection
- default_ttl 0
- max_ttl 0
- renew_statements <nil>
- revocation_statements <nil>
- rollback_statements <nil>
- vagrant@master:~$ vault read mongodb/creds/create
- Error reading mongodb/creds/create: Error making API request.
- URL: GET http://127.0.0.1:8200/v1/mongodb/creds/create
- Code: 500. Errors:
- * 1 error occurred:
- * invalid character 'd' looking for beginning of value
- vagrant@master:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement