]> begriffs open source - ai-pg/blob - full-docs/txt/catalog-pg-authid.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / catalog-pg-authid.txt
1
2 52.8. pg_authid #
3
4    The catalog pg_authid contains information about database authorization
5    identifiers (roles). A role subsumes the concepts of “users” and
6    “groups”. A user is essentially just a role with the rolcanlogin flag
7    set. Any role (with or without rolcanlogin) can have other roles as
8    members; see pg_auth_members.
9
10    Since this catalog contains passwords, it must not be publicly
11    readable. pg_roles is a publicly readable view on pg_authid that blanks
12    out the password field.
13
14    Chapter 21 contains detailed information about user and privilege
15    management.
16
17    Because user identities are cluster-wide, pg_authid is shared across
18    all databases of a cluster: there is only one copy of pg_authid per
19    cluster, not one per database.
20
21    Table 52.8. pg_authid Columns
22
23    Column Type
24
25    Description
26
27    oid oid
28
29    Row identifier
30
31    rolname name
32
33    Role name
34
35    rolsuper bool
36
37    Role has superuser privileges
38
39    rolinherit bool
40
41    Role automatically inherits privileges of roles it is a member of
42
43    rolcreaterole bool
44
45    Role can create more roles
46
47    rolcreatedb bool
48
49    Role can create databases
50
51    rolcanlogin bool
52
53    Role can log in. That is, this role can be given as the initial session
54    authorization identifier.
55
56    rolreplication bool
57
58    Role is a replication role. A replication role can initiate replication
59    connections and create and drop replication slots.
60
61    rolbypassrls bool
62
63    Role bypasses every row-level security policy, see Section 5.9 for more
64    information.
65
66    rolconnlimit int4
67
68    For roles that can log in, this sets maximum number of concurrent
69    connections this role can make. -1 means no limit.
70
71    rolpassword text
72
73    Encrypted password; null if none. The format depends on the form of
74    encryption used.
75
76    rolvaliduntil timestamptz
77
78    Password expiry time (only used for password authentication); null if
79    no expiration
80
81    For an MD5 encrypted password, rolpassword column will begin with the
82    string md5 followed by a 32-character hexadecimal MD5 hash. The MD5
83    hash will be of the user's password concatenated to their user name.
84    For example, if user joe has password xyzzy, PostgreSQL will store the
85    md5 hash of xyzzyjoe.
86
87 Warning
88
89    Support for MD5-encrypted passwords is deprecated and will be removed
90    in a future release of PostgreSQL. Refer to Section 20.5 for details
91    about migrating to another password type.
92
93    If the password is encrypted with SCRAM-SHA-256, it has the format:
94 SCRAM-SHA-256$<iteration count>:<salt>$<StoredKey>:<ServerKey>
95
96    where salt, StoredKey and ServerKey are in Base64 encoded format. This
97    format is the same as that specified by RFC 5803.