cisagov / manage.get.gov

A Django-based domain name registrar to communicate with an EPP registry
https://get.gov
Other
60 stars 18 forks source link

Turn on Postgres database logging #744

Open abroddrick opened 1 year ago

abroddrick commented 1 year ago

Ticket Description

While evaluating our program, we found that manually editing the database (outside of the django app) doesn't get recorded in the django audit logs. Meanwhile, for security reasons we need to know everything that is done to the database.

Thus logging needs to be turned on inside of the Postgres database using postgres built in logging feature

NOTE FOR PLANNING: this may require discussing with Trevor to make sure nothing is missing that should also be logged, and may take a while to investigate the various logging possibilities and how to test/ retrieve logs.

AC:

Additional notes:

Below is the settings that should change in the database Screenshot 2023-06-21 at 4 22 15 PM to see this config

Quickly googling, one way to set it is to make a new postgres.conf file to override these default values and in the docker-compose.yml add a volume to set the custom .conf file to be stored in the containers internal storage. Note here the postrgres.conf is expected to be in the same directory as the docker-compose file. There may be a more elegant approach that should be investigated.

volumes:

Issue Type

discovery (Default)

Link dependent issues

No response

PaulKuykendall commented 11 months ago

@abroddrick - Hey, this is a "long" one, if you want to re-read and think about it before Refinement. Thanks