You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
148532: sql: update SHOW users/roles to support provisioned users r=rafiss a=souravcrl
The SHOW users/roles view currently does not have a mechanism to filter users
via the role options that are assigned to them. This support is needed as we
will be adding `PROVISIONSRC` role option in #148200 and this needs to have
filters support. Additionally, we will be populating the last login
time(estimated) for the `system.users` table and this value will be piped here
as well. Since this value is computed on a best effort basis; it is not
guaranteed to capture every login event, and we will be adding a notice
mentioning the same.
informs #147602fixes#147599
Epic CRDB-21590
Release note (enterprise change): The SHOW ROLES command now includes a column
that shows the estimated time that the user last logged in. Additionally,
the `options` column is now returned as an array of strings, rather than as
a single comma-separated string.
The data can be queried with a query such as:
```
root@localhost:26257/defaultdb> select * from [show roles] as r WHERE EXISTS (SELECT 1 FROM unnest(r.options) AS m(option) where option like 'SUBJECT=cn%');
username | options | member_of | estimated_last_login_time
------------+--------------------------------+-----------+----------------------------
testuser | {NOLOGIN,SUBJECT=cn=testuser} | {admin} | NULL
(1 row)
```
Co-authored-by: souravcrl <[email protected]>
0 commit comments