mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
Review on #5404 surfaced three issues with the audit toggle: - audit.log was a free string, so a mistyped class (write, ddl, rol) rendered unchanged and pgaudit fell back to none at the next restart, silently disabling auditing. Add a schema pattern over the pgaudit class list so a bad class is rejected at admission. - The explicit-parameter-wins guard matched keys case-sensitively, so a user key like pgaudit.LoG landed beside the lowercase seed and PostgreSQL, which is case-insensitive, picked the seed. Match the user keys lowercased. - The connection-logging and empty-log guards were untested. Cover log_disconnections, an empty pgaudit.log, an empty audit.log and a case-variant key. Also note in the field docs that write/all record statement text, so the audit trail is readable by anyone with access to the log stack. Assisted-by: LLM Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>