diff --git a/api/v1alpha1/userconfig/service/opensearch/opensearch.go b/api/v1alpha1/userconfig/service/opensearch/opensearch.go index 474c0406..5700543f 100644 --- a/api/v1alpha1/userconfig/service/opensearch/opensearch.go +++ b/api/v1alpha1/userconfig/service/opensearch/opensearch.go @@ -65,7 +65,7 @@ type Openid struct { ConnectUrl string `groups:"create,update" json:"connect_url"` // Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider. - Enabled *bool `groups:"create,update" json:"enabled,omitempty"` + Enabled bool `groups:"create,update" json:"enabled"` // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=1024 diff --git a/api/v1alpha1/userconfig/service/opensearch/zz_generated.deepcopy.go b/api/v1alpha1/userconfig/service/opensearch/zz_generated.deepcopy.go index 171d00ad..953a8627 100644 --- a/api/v1alpha1/userconfig/service/opensearch/zz_generated.deepcopy.go +++ b/api/v1alpha1/userconfig/service/opensearch/zz_generated.deepcopy.go @@ -200,11 +200,6 @@ func (in *IpRateLimiting) DeepCopy() *IpRateLimiting { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Openid) DeepCopyInto(out *Openid) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } if in.Header != nil { in, out := &in.Header, &out.Header *out = new(string) diff --git a/charts/aiven-operator-crds/templates/aiven.io_opensearches.yaml b/charts/aiven-operator-crds/templates/aiven.io_opensearches.yaml index 84218dae..7fa9b0ac 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_opensearches.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_opensearches.yaml @@ -355,6 +355,7 @@ spec: - client_id - client_secret - connect_url + - enabled type: object opensearch: description: OpenSearch settings diff --git a/config/crd/bases/aiven.io_opensearches.yaml b/config/crd/bases/aiven.io_opensearches.yaml index 84218dae..7fa9b0ac 100644 --- a/config/crd/bases/aiven.io_opensearches.yaml +++ b/config/crd/bases/aiven.io_opensearches.yaml @@ -355,6 +355,7 @@ spec: - client_id - client_secret - connect_url + - enabled type: object opensearch: description: OpenSearch settings diff --git a/docs/docs/api-reference/opensearch.md b/docs/docs/api-reference/opensearch.md index eb4ee0a9..db5c6ee4 100644 --- a/docs/docs/api-reference/opensearch.md +++ b/docs/docs/api-reference/opensearch.md @@ -202,10 +202,10 @@ OpenSearch OpenID Connect Configuration. - [`client_id`](#spec.userConfig.openid.client_id-property){: name='spec.userConfig.openid.client_id-property'} (string, MinLength: 1, MaxLength: 1024). The ID of the OpenID Connect client configured in your IdP. Required. - [`client_secret`](#spec.userConfig.openid.client_secret-property){: name='spec.userConfig.openid.client_secret-property'} (string, MinLength: 1, MaxLength: 1024). The client secret of the OpenID Connect client configured in your IdP. Required. - [`connect_url`](#spec.userConfig.openid.connect_url-property){: name='spec.userConfig.openid.connect_url-property'} (string, MaxLength: 2048). The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings. +- [`enabled`](#spec.userConfig.openid.enabled-property){: name='spec.userConfig.openid.enabled-property'} (boolean). Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider. **Optional** -- [`enabled`](#spec.userConfig.openid.enabled-property){: name='spec.userConfig.openid.enabled-property'} (boolean). Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider. - [`header`](#spec.userConfig.openid.header-property){: name='spec.userConfig.openid.header-property'} (string, MinLength: 1, MaxLength: 1024). HTTP header name of the JWT token. Optional. Default is Authorization. - [`jwt_header`](#spec.userConfig.openid.jwt_header-property){: name='spec.userConfig.openid.jwt_header-property'} (string, MinLength: 1, MaxLength: 1024). The HTTP header that stores the token. Typically the Authorization header with the Bearer schema: Authorization: Bearer . Optional. Default is Authorization. - [`jwt_url_parameter`](#spec.userConfig.openid.jwt_url_parameter-property){: name='spec.userConfig.openid.jwt_url_parameter-property'} (string, MinLength: 1, MaxLength: 1024). If the token is not transmitted in the HTTP header, but as an URL parameter, define the name of the parameter here. Optional. diff --git a/go.mod b/go.mod index e7f8c396..57a303fa 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/aiven/aiven-go-client/v2 v2.4.0 - github.com/aiven/go-api-schemas v1.49.0 + github.com/aiven/go-api-schemas v1.50.0 github.com/dave/jennifer v1.7.0 github.com/docker/go-units v0.5.0 github.com/ghodss/yaml v1.0.0 diff --git a/go.sum b/go.sum index b312c23f..27684d47 100644 --- a/go.sum +++ b/go.sum @@ -65,8 +65,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/aiven/aiven-go-client/v2 v2.4.0 h1:vBBKgYEYyFZp/f+vcdxTkWnJ2b09Wlto3kwEzj5uvBQ= github.com/aiven/aiven-go-client/v2 v2.4.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= -github.com/aiven/go-api-schemas v1.49.0 h1:9ccN0ZzrxZSo7Fc/Ejprv6pw6oKJdp8n28UnOEAke+s= -github.com/aiven/go-api-schemas v1.49.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= +github.com/aiven/go-api-schemas v1.50.0 h1:EQDtMdsvT/X7yM0j+5oGSV+cdj35WpfMpKFyYwrTnho= +github.com/aiven/go-api-schemas v1.50.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= 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=