From 7b47616b86c7a413a62d1dc660fc4bea4eee6be2 Mon Sep 17 00:00:00 2001 From: Muni10 Date: Wed, 19 Aug 2026 13:35:46 +0200 Subject: [PATCH 1/2] feat(audit): add pgaudit.log_relation to list of required settings --- internal/postgres/audit.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/postgres/audit.go b/internal/postgres/audit.go index d6b30462..6495e10f 100644 --- a/internal/postgres/audit.go +++ b/internal/postgres/audit.go @@ -134,6 +134,7 @@ func validateAuditFlags(ctx context.Context, info *CloudSQLDBInfo) error { "cloudsql.enable_pgaudit", "pgaudit.log", "pgaudit.log_parameter", + "pgaudit.log_relation", } err = validateRequiredFlags(dbFlags, requiredFlags) @@ -255,6 +256,17 @@ func verifyAuditAsAppUser(ctx context.Context, appName, team, environment string } out.Printf(" ✅ Flag pgaudit.log_parameter = %s\n", logParameter) + logRelation, relationExists := dbFlags["pgaudit.log_relation"] + if !relationExists { + out.Println(" ❌ Flag pgaudit.log_relation is missing") + return false, fmt.Errorf("pgaudit.log_relation flag is not set") + } + if logRelation != "on" && logRelation != "true" { + out.Printf(" ❌ Flag pgaudit.log_relation: expected on, got %s\n", logRelation) + return false, fmt.Errorf("pgaudit.log_relation must be set to 'on'") + } + out.Printf(" ✅ Flag pgaudit.log_relation = %s\n", logRelation) + db, err := sql.Open("cloudsqlpostgres", connectionInfo.ProxyConnectionString()) if err != nil { return false, fmt.Errorf("error connecting to database: %w", err) From 4c4149b0748800c71b81590d0abd7269581885b2 Mon Sep 17 00:00:00 2001 From: Muni10 Date: Wed, 19 Aug 2026 13:38:10 +0200 Subject: [PATCH 2/2] build: bump go 1.26.6 --- go.mod | 2 +- mise/config.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index fe6065a6..757d7eed 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/nais/cli -go 1.26.5 +go 1.26.6 tool ( github.com/Khan/genqlient diff --git a/mise/config.toml b/mise/config.toml index 6c2a77fa..ca87e885 100644 --- a/mise/config.toml +++ b/mise/config.toml @@ -1,6 +1,6 @@ [tools] git-cliff = "2.10.1" -go = "1.26.5" +go = "1.26.6" golangci-lint = "2.12.2" yamlfmt = "0.17.2"