Skip to content

User

A user is a role that is permitted to login to the database.

Properties

Property Type Required Description
name string — User name.
comment string — An optional comment about the user.
security_labels security_labels — Security Labels.
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.
password string — The password that is used to authenticate the user upon login.
valid_until string — Sets a date and time after which the user's password is no longer valid.
grants acls — ACLs to add to the role.
revocations acls — ACLs to remove from the role.
options object — —
settings array of object — Configuration parameters to be set to the specified value when the user starts a session, one object for each parameter. A value is a string, a number or a boolean. A setting that PostgreSQL keeps as a list of names, such as search_path, is a list of strings, one name for each item. For such a setting, one string with a comma is an error, because PostgreSQL reads it as one name. A list has at least one item.

options

Property Type Required Description
bypass_rls boolean — These clauses determine whether the user may bypasses every row-level security (RLS) policy. Default: false.
connection_limit integer — How many concurrent connections the user can make. -1 (the default) means no limit. Default: -1.
create_db boolean — Determines if the user is allowed to create databases. Default: false.
create_role boolean — These clauses determine whether the user will be permitted to create a new group, role or user. Default: false.
inherit boolean — These clauses determine whether the user "inherits" the privileges of groups it is a member of and roles it is granted. Default: false.
replication boolean — These clauses determine whether a user 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 user 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/user.yml · Resolved JSON Schema: user.json