Skip to content

Commit

Permalink
add rewnew_statement for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Apr 26, 2018
1 parent 90e1c5d commit 6e7eafc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose/vault/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ else
echo "bootstrapping postgres stufffff"
VAULT_TOKEN=$VAULT_DEV_ROOT_TOKEN_ID vault secrets enable database
VAULT_TOKEN=$VAULT_DEV_ROOT_TOKEN_ID vault write database/config/cabotage plugin_name=postgresql-database-plugin allowed_roles="cabotage" connection_url="postgresql://postgres@db/cabotage_dev?sslmode=disable" verify_connection=false
VAULT_TOKEN=$VAULT_DEV_ROOT_TOKEN_ID vault write database/roles/cabotage db_name=cabotage default_ttl="168h" max_ttl="720h" creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}' IN ROLE cabotage;" revocation_statements="REASSIGN OWNED BY \"{{name}}\" TO cabotage"
VAULT_TOKEN=$VAULT_DEV_ROOT_TOKEN_ID vault write database/roles/cabotage db_name=cabotage default_ttl="60s" max_ttl="120s" creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}' IN ROLE cabotage;" revocation_statements="REASSIGN OWNED BY \"{{name}}\" TO cabotage" renew_statements="ALTER ROLE \"{{name}}\" VALID UNTIL '{{expiration}}';"
wait
fi

0 comments on commit 6e7eafc

Please sign in to comment.