sql: extend SQL audit logging to "operations run by admin users" #58334
Labels
A-logging
In and around the logging infrastructure.
A-security
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Discussed with @aaron-crl and the CC SIAM team:
Once we start pushing users to define custom roles with restricted privileges to do various DBA tasks (principle of least privilege), we expect + want usage of the
admin
special (superuser) role to diminish.In a state-of-the-art deployment, this should be so true that any uses of SQL by the
admin
role should become extremely rare and should be treated as suspicious by security-minded administrator.Therefore, SQL usage by
admin
users should become more noticeable.In the same way that unix system heavily log usage of
sudo
andsu
, we should thus build logging of operations performed by users carrying theadmin
role.The way we'd introduce this is likely in two phases:
in a first phase, we'd start de-emphasizng direct use of the
admin
role in docs, and add a new cluster setting e.g.security.admin_log.enable
which, when enabled, causes alladmin
operations to be logged.in a second phase, create non-
admin
special users/roles in new clusters, encourage users to use that instead, and make the logging setting default to true in new clusters.The text was updated successfully, but these errors were encountered: