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

OPERATOR (pg_catalog. =) #58

Closed
GreenBeanKILLER opened this issue Nov 7, 2018 · 8 comments
Closed

OPERATOR (pg_catalog. =) #58

GreenBeanKILLER opened this issue Nov 7, 2018 · 8 comments
Assignees
Labels

Comments

@GreenBeanKILLER
Copy link

Hello, how are you?
Could you explain how to avoid the next line in the audit log?
Every time I make an insert I generate many lines for the fk

OPERATOR (pg_catalog. =) $ 1 FOR KEY SHARE OF x

@dwsteele dwsteele self-assigned this Nov 16, 2018
@dwsteele
Copy link
Contributor

Are you auditing the postgres user? If so this is not recommended some filters won't work properly in this case.

@GreenBeanKILLER
Copy link
Author

We are auditing our personal users who have the following roles SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;
and they ask us to audit in this way!
ALTER ROLE xxx
SET pgaudit.log = 'all, -misc';
What do you recommmend me to do?
Thanks for your time

@dwsteele
Copy link
Contributor

We recommend that you don't have all your users be superuser. Beyond that there's not much pgaudit can do.

@GreenBeanKILLER
Copy link
Author

It is that we are the dbas, but the client is wanting to audit all the users !!!
For that, they ask us to audit the nominated users

@dwsteele
Copy link
Contributor

That is certainly your choice, but we have no way to reliably filter foreign key queries for the superuser. There are some logging tools (ELK, Splunk) etc. that can help with this if you want to create your own rules.

@GreenBeanKILLER
Copy link
Author

Perfect, we will communicate to those in charge of the subject that there is no possible solution, thank you very much !!!!

@dwsteele
Copy link
Contributor

You should consider using the set_user extension instead of making all the DBAs superuser. DML run via set_user will still create the extra entries but it might reduce your logging overall.

You can also use grants to allow these users to run DML on tables that they frequently have a reason to modify instead of granting superuser.

@GreenBeanKILLER
Copy link
Author

thanks a lot David!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants