Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: extend SQL audit logging to "operations run by admin users" #58334

Closed
knz opened this issue Dec 29, 2020 · 5 comments · Fixed by #60708
Closed

sql: extend SQL audit logging to "operations run by admin users" #58334

knz opened this issue Dec 29, 2020 · 5 comments · Fixed by #60708
Assignees
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)

Comments

@knz
Copy link
Contributor

knz commented Dec 29, 2020

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 and su, we should thus build logging of operations performed by users carrying the admin role.

The way we'd introduce this is likely in two phases:

  1. 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 all admin operations to be logged.

  2. 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.

@knz knz added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-security A-logging In and around the logging infrastructure. labels Dec 29, 2020
@knz knz added this to To do in DB Server & Security via automation Dec 29, 2020
@knz
Copy link
Contributor Author

knz commented Dec 29, 2020

cc @thtruo for prioritization - can you remind us if this was part of our preferred customer's asks and whether this should be included in v21.1?

@thtruo
Copy link
Contributor

thtruo commented Jan 4, 2021

Yeah this was a request from at least one of our customers. And FWIW the SRE team would find this useful as well. It sounds like your first phase proposal would go a long way in improving that experience. Getting this into v21.1 would be ideal

@vy-ton vy-ton added this to Triage in SQL Sessions - Deprecated via automation Jan 5, 2021
@vy-ton
Copy link
Contributor

vy-ton commented Jan 5, 2021

@solongordon Can we swap this for #57965 as @RichardJCai's starter project? @thtruo shared that this is needed for 21.1 over the other issue

@knz
Copy link
Contributor Author

knz commented Jan 5, 2021

Both are important. I would suggest to make Richard aware of both. I can chime in and support with an incidental effort to ensure both get completed.

@knz knz moved this from To do to 21.1 - better ops in DB Server & Security Jan 18, 2021
@knz knz moved this from 21.1 - better ops to Linked issues (from the roadmap columns on the right) in DB Server & Security Jan 18, 2021
@rafiss rafiss moved this from Triage to Shorter term backlog in SQL Sessions - Deprecated Jan 19, 2021
@vy-ton vy-ton moved this from Shorter term backlog to February 2021 in SQL Sessions - Deprecated Feb 2, 2021
@vy-ton vy-ton moved this from February 2021 to February 2021 Candidates in SQL Sessions - Deprecated Feb 2, 2021
@solongordon solongordon moved this from February 2021 Candidates to February 2021 in SQL Sessions - Deprecated Feb 8, 2021
@knz
Copy link
Contributor Author

knz commented Feb 9, 2021

NB: @ajwerner outlined a solution in my strawman approach at #59356. This presumably makes the implementation simple(r).

@craig craig bot closed this as completed in ab07ae1 Feb 22, 2021
DB Server & Security automation moved this from Linked issues (from the roadmap columns on the right) to Done 21.1 Feb 22, 2021
SQL Sessions - Deprecated automation moved this from February 2021 to Done Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
No open projects
4 participants