mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
secret/postgresql: testing support for multiple statements
This commit is contained in:
@@ -127,4 +127,5 @@ CREATE ROLE "{{name}}" WITH
|
|||||||
LOGIN
|
LOGIN
|
||||||
PASSWORD '{{password}}'
|
PASSWORD '{{password}}'
|
||||||
VALID UNTIL '{{expiration}}';
|
VALID UNTIL '{{expiration}}';
|
||||||
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "{{name}}";
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -68,5 +68,8 @@ This path configures the connection string used to connect to PostgreSQL.
|
|||||||
The value of the string can be a URL, or a PG style string in the
|
The value of the string can be a URL, or a PG style string in the
|
||||||
format of "user=foo host=bar" etc.
|
format of "user=foo host=bar" etc.
|
||||||
|
|
||||||
|
The URL looks like:
|
||||||
|
"postgresql://user:pass@host:port/dbname"
|
||||||
|
|
||||||
When configuring the connection string, the backend will verify its validity.
|
When configuring the connection string, the backend will verify its validity.
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ by "{{" and "}}" to be replaced.
|
|||||||
|
|
||||||
Example of a decent SQL query to use:
|
Example of a decent SQL query to use:
|
||||||
|
|
||||||
CREATE ROLE '{{name}}' WITH
|
CREATE ROLE "{{name}}" WITH
|
||||||
LOGIN
|
LOGIN
|
||||||
PASSWORD '{{password}}'
|
PASSWORD '{{password}}'
|
||||||
VALID UNTIL '{{expiration}}';
|
VALID UNTIL '{{expiration}}';
|
||||||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA db1 TO '{{name}}';
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "{{name}}";
|
||||||
|
|
||||||
Note the above user would be able to access everything. In schema dc1.
|
Note the above user would be able to access everything. In schema dc1.
|
||||||
For more complex GRANT clauses, see the PostgreSQL manuel.
|
For more complex GRANT clauses, see the PostgreSQL manuel.
|
||||||
|
|||||||
Reference in New Issue
Block a user