Skip to content

Commit 358eae8

Browse files
Add security event logging documentation (#1135)
* Add security event logging documentation Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com> * Ignore terraform URLs in link checker --------- Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com> Co-authored-by: Andreia <andreia.velasco@canonical.com>
1 parent 48d4eb4 commit 358eae8

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

docs/.custom_wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CSR
3131
CSRs
3232
databag
3333
databags
34+
DDL
3435
dev
3536
dvipng
3637
eks
@@ -81,6 +82,7 @@ otf
8182
Parca
8283
Patroni
8384
Patroni*
85+
pgAudit
8486
pgbackrest
8587
pgBackRest
8688
pgbouncer

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@
208208
linkcheck_ignore = [
209209
"http://127.0.0.1:8000",
210210
"https://github.com/canonical/*",
211-
"https://matrix.to/*"
211+
"https://matrix.to/*",
212+
"https://developer.hashicorp.com/*",
213+
"https://www.terraform.io/*"
212214
]
213215

214216
# A regex list of URLs where anchors are ignored by 'make linkcheck'

docs/explanation/legacy-charm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
There are [two types of charms](https://documentation.ubuntu.com/juju/3.6/reference/charm/#by-generation) stored under the same charm name `postgresql-k8s`:
44

5-
1. [Reactive](https://documentation.ubuntu.com/juju/3.6/reference/charm/#reactive) charm in the channel `latest/stable` (called `legacy`)
6-
2. [Ops-based](https://documentation.ubuntu.com/juju/3.6/reference/charm/#ops) charm in the channel `14/stable` (called `modern`)
5+
1. [Reactive](https://documentation.ubuntu.com/juju/3.6/reference/charm/#reactive-charm) charm in the channel `latest/stable` (called `legacy`)
6+
2. [Ops-based](https://documentation.ubuntu.com/juju/3.6/reference/charm/#ops-charm) charm in the channel `14/stable` (called `modern`)
77

88
The legacy charm provided endpoints `db` and `db-admin` (for the interface `pgsql`). The modern charm provides old endpoints as well + new endpoint `database` (for the interface `postgresql_client`). Read more details about the available [endpoints/interfaces](/explanation/interfaces-and-endpoints).
99

docs/explanation/security/index.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Charmed PostgreSQL K8s can be deployed on top of several Kubernetes distribution
2323

2424
### Juju
2525

26-
Juju is the component responsible for orchestrating the entire lifecycle, from deployment to Day 2 operations. For more information on Juju security hardening, see the [Juju security page](https://canonical-juju.readthedocs-hosted.com/en/latest/user/explanation/juju-security/) and the [How to harden your deployment](https://documentation.ubuntu.com/juju/3.6/howto/manage-your-deployment/#harden-your-deployment) guide.
26+
Juju is the component responsible for orchestrating the entire lifecycle, from deployment to Day 2 operations. For more information on Juju security hardening, see the [Juju security page](https://canonical-juju.readthedocs-hosted.com/en/latest/user/explanation/juju-security/) and the [How to harden your deployment](https://documentation.ubuntu.com/juju/3.6/howto/manage-your-juju-deployment/harden-your-juju-deployment/#harden-your-deployment) guide.
2727

2828
#### Cloud credentials
2929

@@ -91,6 +91,21 @@ Charmed PostgreSQL K8s provides native integration with the [Canonical Observabi
9191

9292
PostgreSQL logs are stored in `/var/log/postgresql` within the postgresql container of each unit. It’s recommended to integrate the charm with [COS](https://canonical.com/data/docs/postgresql/k8s/h-enable-monitoring), from where the logs can be easily persisted and queried using [Loki](https://charmhub.io/loki-k8s)/[Grafana](https://charmhub.io/grafana).
9393

94+
### Security event logging
95+
96+
Charmed PostgreSQL K8s provides [PostgreSQL Audit Extension (or pgAudit)](https://www.pgaudit.org/) enabled by default. These logs are stored in the `/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.
97+
98+
The following information is configured to be logged:
99+
100+
* Statements related to roles and privileges, such as GRANT, REVOKE, CREATE, ALTER, and DROP ROLE.
101+
* Data Definition Language (DDL) statements.
102+
* Miscellaneous commands like DISCARD, FETCH, CHECKPOINT, VACUUM, SET.
103+
* Miscellaneous SET commands.
104+
105+
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-k8s/configurations#logging_log_connections).
106+
107+
No secrets are logged.
108+
94109
## Additional Resources
95110

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

0 commit comments

Comments
 (0)