Vault Postgres ERROR: permission denied for relation

84 views
Skip to first unread message

aa60...@gmail.com

unread,
Aug 18, 2018, 12:19:39 PM8/18/18
to Vault
My vault config:

   
    vault write database/config/demo \
    plugin_name
="postgresql-database-plugin" \
    allowed_roles
="*" \
    connection_url
="postgresql://postgres:pgp...@xxx.xxx.xxx.xxx:5432/postgres

I’ve created role:

   
    vault write database/roles/demobase \
    db_name
="demo" \
    creation_statements
="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}’ CREATEDB; \
    GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO \"{{name}}\";"
\
    default_ttl
="1h" \
    max_ttl
="24h"

and got ERROR:  permission denied for relation

Whats wrong?

Subodh Joshi

unread,
Nov 10, 2018, 7:08:07 AM11/10/18
to Vault
Issue with db_name ,first you created a config for dbanme="postgres" while you create a role for db_name="demo"
Reply all
Reply to author
Forward
0 new messages