Role¶
A role is an entity that can own database objects and have database privileges.
Properties¶
| Property | Type | Required | Description |
|---|---|---|---|
name |
string |
— | Role Name. |
comment |
string |
— | An optional comment about the role. |
create |
boolean |
— | Used in special cases where a role should be definied, but not created, such as "PUBLIC". Default: true. |
environments |
array of (DEVELOPMENT | STAGING | TESTING | PRODUCTION) |
— | Used to limit the environments the role is created in. The default value is all environments. Entries must be unique. |
grants |
acls | — | ACLs to add to the role. |
revocations |
acls | — | ACLs to remove from the role. |
options |
object |
— | — |
settings |
array of object |
— | — |
options¶
| Property | Type | Required | Description |
|---|---|---|---|
bypass_rls |
boolean |
— | These clauses determine whether a role bypasses every row-level security (RLS) policy. Default: false. |
connection_limit |
integer |
— | If role can log in, this specifies how many concurrent connections the role can make. -1 (the default) means no limit. Default: -1. |
create_db |
boolean |
— | Determines if the role is allowed to create databases. Default: false. |
create_role |
boolean |
— | These clauses determine whether a role will be permitted to create a new group, role or user. Default: false. |
inherit |
boolean |
— | These clauses determine whether a role "inherits" the privileges of roles it is a member of. Default: false. |
login |
boolean |
— | These clauses determine whether a role is allowed to log in; that is, whether the role can be given as the initial session authorization name during client connection. Default: false. |
replication |
boolean |
— | These clauses determine whether a role is allowed to initiate streaming replication or put the system in and out of backup mode. A role having the REPLICATION attribute is a very highly privileged role, and should only be used on roles actually used for replication. Default: false. |
superuser |
boolean |
— | These clauses determine whether the new role is a "superuser", who can override all access restrictions within the database. Superuser status is dangerous and should be used only when really needed. Default: false. |
No other properties are accepted.
Source: schemata/role.yml · Resolved JSON Schema: role.json