Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.40 KB | None | 0 0
  1. vagrant@master:~$ vault write mongodb/roles/create db_name="connection" roles='[ "readWrite", { "role": "read", "db": "admin" } ]'
  2. Success! Data written to: mongodb/roles/create
  3. vagrant@master:~$ vault read mongodb/creds/create
  4. Error reading mongodb/creds/create: Error making API request.
  5.  
  6. URL: GET http://127.0.0.1:8200/v1/mongodb/creds/create
  7. Code: 500. Errors:
  8.  
  9. * 1 error occurred:
  10.  
  11. * empty creation statements
  12.  
  13.  
  14. # With creation_statements
  15.  
  16.  
  17. vagrant@master:~$ vault write mongodb/roles/create db_name="connection" roles='[ "readWrite", { "role": "read", "db": "admin" } ]' creation_statements="db.createUser( \
  18.  { \
  19.    roles: [ { role: "read", db: "admin" } ] \
  20.  } \
  21. )
  22. "
  23. Success! Data written to: mongodb/roles/create
  24. vagrant@master:~$ vault read mongodb/roles/create
  25. Key                      Value
  26. ---                      -----
  27. creation_statements      [db.createUser(   {     roles: [ { role: read, db: admin } ]   } )]
  28. db_name                  connection
  29. default_ttl              0
  30. max_ttl                  0
  31. renew_statements         <nil>
  32. revocation_statements    <nil>
  33. rollback_statements      <nil>
  34. vagrant@master:~$ vault read mongodb/creds/create
  35. Error reading mongodb/creds/create: Error making API request.
  36.  
  37. URL: GET http://127.0.0.1:8200/v1/mongodb/creds/create
  38. Code: 500. Errors:
  39.  
  40. * 1 error occurred:
  41.  
  42. * invalid character 'd' looking for beginning of value
  43. vagrant@master:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement