Skip to content

Commit 9d7d637

Browse files
marceloneppela-velascodragomirp
authored
Add security event logging documentation (#1236)
* Add security event logging documentation Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com> * Ignore terraform URLs in link checker * Fix charm substrate. Co-authored-by: Dragomir Penev <6687393+dragomirp@users.noreply.github.com> --------- Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com> Co-authored-by: Andreia <andreia.velasco@canonical.com> Co-authored-by: Dragomir Penev <6687393+dragomirp@users.noreply.github.com>
1 parent 9118f7f commit 9d7d637

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/.custom_wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ CSR
3232
CSRs
3333
databag
3434
databags
35+
DDL
3536
dev
3637
dvipng
3738
eks
@@ -86,6 +87,7 @@ Parca
8687
Parca's
8788
Patroni
8889
patronictl
90+
pgAudit
8991
pgbackrest
9092
pgBackRest
9193
pgbouncer

docs/explanation/security/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ Charmed PostgreSQL provides native integration with the [Canonical Observability
8787

8888
PostgreSQL logs are stored in `/var/snap/charmed-postgresql/common/var/log/postgresql` within the PostgreSQL container of each unit. It’s recommended to integrate the charm with [COS](/how-to/monitoring-cos/enable-monitoring), from where the logs can be easily persisted and queried using [Loki](https://charmhub.io/loki-k8s)/[Grafana](https://charmhub.io/grafana).
8989

90+
### Security event logging
91+
92+
Charmed PostgreSQL VM provides [PostgreSQL Audit Extension (or pgAudit)](https://www.pgaudit.org/) enabled by default. These logs are stored in the `/var/snap/charmed-postgresql/common/var/log/postgresql` directory of each unit along with the regular workload logs, and rotated minutely. If COS is enabled, audit logs are also persisted there.
93+
94+
The following information is configured to be logged:
95+
96+
* Statements related to roles and privileges, such as GRANT, REVOKE, CREATE, ALTER, and DROP ROLE.
97+
* Data Definition Language (DDL) statements.
98+
* Miscellaneous commands like DISCARD, FETCH, CHECKPOINT, VACUUM, SET.
99+
* Miscellaneous SET commands.
100+
101+
Other events, like connections and disconnections, are logged depending on the value of the charm configuration options related to them. For more information, check the configuration options with the `logging` prefix in the [configuration reference](https://charmhub.io/postgresql/configurations#logging_log_connections).
102+
103+
No secrets are logged.
104+
90105
## Additional resources
91106

92107
For details on the cryptography used by Charmed PostgreSQL, see the [Cryptography](/explanation/security/cryptography) explanation page.

0 commit comments

Comments
 (0)