secret/postgresql: testing support for multiple statements

This commit is contained in:
Armon Dadgar
2015-04-27 12:00:07 -07:00
parent db5f74f6b4
commit 212aa9fb5b
3 changed files with 9 additions and 5 deletions

View File

@@ -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}}";
` `

View File

@@ -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.
` `

View File

@@ -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.