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

[YSQL] Support Audit Logging #6199

Closed
m-iancu opened this issue Oct 29, 2020 · 1 comment
Closed

[YSQL] Support Audit Logging #6199

m-iancu opened this issue Oct 29, 2020 · 1 comment
Assignees
Labels
area/ysql Yugabyte SQL (YSQL)
Milestone

Comments

@m-iancu
Copy link
Contributor

m-iancu commented Oct 29, 2020

Support Postgres-compatible audit logging in YSQL based on pgAudit.

For instance, to enable auditing on a database run:

CREATE EXTENSION IF NOT EXISTS pgaudit;

Then the same configuration options as in regular pgAudit should work.
In YSQL the options are configurable either per cluster using the ysql_pg_conf_csv flag, or per-session using the relevant session variables.

For instance, to enable auditing of DDLs and raising the log level to notice:

  • Cluster-level config

    ysql_pg_conf_csv='"pgaudit.log='DDL'",pgaudit.log_level=notice'
    
  • Session-level config

    SET pgaudit.log='DDL';
    SET pgaudit.log_level="notice";
    
@m-iancu m-iancu added the area/ysql Yugabyte SQL (YSQL) label Oct 29, 2020
@m-iancu m-iancu added this to the v2.3 milestone Oct 29, 2020
@m-iancu
Copy link
Contributor Author

m-iancu commented Oct 29, 2020

Fixed by fb7ce2b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL)
Projects
None yet
Development

No branches or pull requests

2 participants