diff --git a/CHANGELOG.md b/CHANGELOG.md index 7884bf94..63077e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - Change `OpenSearch` field `userConfig.opensearch_dashboards.max_old_space_size`: maximum ~~`2048`~~ → `4096` - Change `PostgreSQL` field `userConfig.pg_version`: enum add `17` +- Add `PostgreSQL` field `userConfig.pg.password_encryption`, type `string`: Chooses the algorithm for + encrypting passwords ## v0.26.0 - 2024-11-21 diff --git a/api/v1alpha1/userconfig/service/pg/pg.go b/api/v1alpha1/userconfig/service/pg/pg.go index c743ba58..6d0b86ec 100644 --- a/api/v1alpha1/userconfig/service/pg/pg.go +++ b/api/v1alpha1/userconfig/service/pg/pg.go @@ -230,6 +230,10 @@ type Pg struct { // Sets the maximum number of background processes that the system can support MaxWorkerProcesses *int `groups:"create,update" json:"max_worker_processes,omitempty"` + // +kubebuilder:validation:Enum="md5";"scram-sha-256" + // Chooses the algorithm for encrypting passwords. + PasswordEncryption *string `groups:"create,update" json:"password_encryption,omitempty"` + // +kubebuilder:validation:Minimum=3600 // +kubebuilder:validation:Maximum=604800 // Sets the time interval to run pg_partman's scheduled tasks diff --git a/api/v1alpha1/userconfig/service/pg/zz_generated.deepcopy.go b/api/v1alpha1/userconfig/service/pg/zz_generated.deepcopy.go index d0712bff..e270fa4e 100644 --- a/api/v1alpha1/userconfig/service/pg/zz_generated.deepcopy.go +++ b/api/v1alpha1/userconfig/service/pg/zz_generated.deepcopy.go @@ -259,6 +259,11 @@ func (in *Pg) DeepCopyInto(out *Pg) { *out = new(int) **out = **in } + if in.PasswordEncryption != nil { + in, out := &in.PasswordEncryption, &out.PasswordEncryption + *out = new(string) + **out = **in + } if in.PgPartmanBgwInterval != nil { in, out := &in.PgPartmanBgwInterval, &out.PgPartmanBgwInterval *out = new(int) diff --git a/charts/aiven-operator-crds/templates/aiven.io_postgresqls.yaml b/charts/aiven-operator-crds/templates/aiven.io_postgresqls.yaml index bd6959ed..c32a4ea5 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_postgresqls.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_postgresqls.yaml @@ -629,6 +629,12 @@ spec: maximum: 96 minimum: 8 type: integer + password_encryption: + description: Chooses the algorithm for encrypting passwords. + enum: + - md5 + - scram-sha-256 + type: string pg_partman_bgw.interval: description: Sets the time interval to run pg_partman's scheduled diff --git a/config/crd/bases/aiven.io_postgresqls.yaml b/config/crd/bases/aiven.io_postgresqls.yaml index bd6959ed..c32a4ea5 100644 --- a/config/crd/bases/aiven.io_postgresqls.yaml +++ b/config/crd/bases/aiven.io_postgresqls.yaml @@ -629,6 +629,12 @@ spec: maximum: 96 minimum: 8 type: integer + password_encryption: + description: Chooses the algorithm for encrypting passwords. + enum: + - md5 + - scram-sha-256 + type: string pg_partman_bgw.interval: description: Sets the time interval to run pg_partman's scheduled diff --git a/docs/docs/api-reference/postgresql.md b/docs/docs/api-reference/postgresql.md index 18b075db..61c9e0e9 100644 --- a/docs/docs/api-reference/postgresql.md +++ b/docs/docs/api-reference/postgresql.md @@ -308,6 +308,7 @@ postgresql.conf configuration values. - [`max_standby_streaming_delay`](#spec.userConfig.pg.max_standby_streaming_delay-property){: name='spec.userConfig.pg.max_standby_streaming_delay-property'} (integer, Minimum: 1, Maximum: 43200000). Max standby streaming delay in milliseconds. - [`max_wal_senders`](#spec.userConfig.pg.max_wal_senders-property){: name='spec.userConfig.pg.max_wal_senders-property'} (integer, Minimum: 20, Maximum: 64). PostgreSQL maximum WAL senders. - [`max_worker_processes`](#spec.userConfig.pg.max_worker_processes-property){: name='spec.userConfig.pg.max_worker_processes-property'} (integer, Minimum: 8, Maximum: 96). Sets the maximum number of background processes that the system can support. +- [`password_encryption`](#spec.userConfig.pg.password_encryption-property){: name='spec.userConfig.pg.password_encryption-property'} (string, Enum: `md5`, `scram-sha-256`). Chooses the algorithm for encrypting passwords. - [`pg_partman_bgw.interval`](#spec.userConfig.pg.pg_partman_bgw.interval-property){: name='spec.userConfig.pg.pg_partman_bgw.interval-property'} (integer, Minimum: 3600, Maximum: 604800). Sets the time interval to run pg_partman's scheduled tasks. - [`pg_partman_bgw.role`](#spec.userConfig.pg.pg_partman_bgw.role-property){: name='spec.userConfig.pg.pg_partman_bgw.role-property'} (string, Pattern: `^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$`, MaxLength: 64). Controls which role to use for pg_partman's scheduled background tasks. - [`pg_stat_monitor.pgsm_enable_query_plan`](#spec.userConfig.pg.pg_stat_monitor.pgsm_enable_query_plan-property){: name='spec.userConfig.pg.pg_stat_monitor.pgsm_enable_query_plan-property'} (boolean). Enables or disables query plan monitoring. diff --git a/go.mod b/go.mod index 6ade9519..22e9df2b 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ toolchain go1.23.0 require ( github.com/ClickHouse/clickhouse-go/v2 v2.30.0 github.com/aiven/aiven-go-client/v2 v2.33.0 - github.com/aiven/go-api-schemas v1.105.0 - github.com/aiven/go-client-codegen v0.68.0 + github.com/aiven/go-api-schemas v1.106.0 + github.com/aiven/go-client-codegen v0.73.0 github.com/avast/retry-go v3.0.0+incompatible github.com/dave/jennifer v1.7.1 github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index 92be2829..a55bdf65 100644 --- a/go.sum +++ b/go.sum @@ -39,10 +39,10 @@ github.com/ClickHouse/clickhouse-go/v2 v2.30.0 h1:AG4D/hW39qa58+JHQIFOSnxyL46H6h github.com/ClickHouse/clickhouse-go/v2 v2.30.0/go.mod h1:i9ZQAojcayW3RsdCb3YR+n+wC2h65eJsZCscZ1Z1wyo= github.com/aiven/aiven-go-client/v2 v2.33.0 h1:7hsM3/2lVog/P9ls/gLeba5feNVQjK8rIL+lbxD2GB4= github.com/aiven/aiven-go-client/v2 v2.33.0/go.mod h1:qXBgER0dtjJa1V3l7kzpizuAGjFCkgahhHL5OpoM2ZM= -github.com/aiven/go-api-schemas v1.105.0 h1:AEG3GMDuu/9kJIGpAQlNNmw6IG18tnIfZ/hyqHlx27c= -github.com/aiven/go-api-schemas v1.105.0/go.mod h1:z7dGvufm6If4gOdVr7dWTuFZmll9FOZr5Z5CSxGpebA= -github.com/aiven/go-client-codegen v0.68.0 h1:LeQC5MpbTqNxnMqtjKf0vB70VaUews+cub6gSGO2JUw= -github.com/aiven/go-client-codegen v0.68.0/go.mod h1:QKN/GgLMGWd6+gPEucXlZPi5vC3C6RpD3UeBRQOLI1Y= +github.com/aiven/go-api-schemas v1.106.0 h1:qncRsbiaGnU9JE9fmTFHclTCBem+t+6EPMXGXM35w2c= +github.com/aiven/go-api-schemas v1.106.0/go.mod h1:z7dGvufm6If4gOdVr7dWTuFZmll9FOZr5Z5CSxGpebA= +github.com/aiven/go-client-codegen v0.73.0 h1:1xk7zmAqKxQYHWE4ARWFlKHZg8FB4VTDGxVua7iruRg= +github.com/aiven/go-client-codegen v0.73.0/go.mod h1:QKN/GgLMGWd6+gPEucXlZPi5vC3C6RpD3UeBRQOLI1Y= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=