@@ -132,8 +132,8 @@ type KeystoneAPISpecCore struct {
132132 FernetMaxActiveKeys * int32 `json:"fernetMaxActiveKeys"`
133133
134134 // +kubebuilder:validation:Optional
135- // +kubebuilder:default={admin: AdminPassword}
136- // PasswordSelectors - Selectors to identify the AdminUser password from the Secret
135+ // +kubebuilder:default={admin: AdminPassword, keystoneOIDCClientSecret: KeystoneClientSecret, keystoneOIDCCryptoPassphrase: KeystoneCryptoPassphrase }
136+ // PasswordSelectors - Selectors to identify the AdminUser, KeystoneOIDCClient, and KeystoneOIDCCryptoPassphrase passwords from the Secret
137137 PasswordSelectors PasswordSelector `json:"passwordSelectors"`
138138
139139 // +kubebuilder:validation:Optional
@@ -180,6 +180,15 @@ type KeystoneAPISpecCore struct {
180180 // +operator-sdk:csv:customresourcedefinitions:type=spec
181181 // TLS - Parameters related to the TLS
182182 TLS tls.API `json:"tls,omitempty"`
183+
184+ // +kubebuilder:validation:Required
185+ // +kubebuilder:default=false
186+ // Enablement of Federation configuration
187+ EnableFederation bool `json:"enableFederation"`
188+
189+ // +kubebuilder:validation:Optional
190+ // +OIDCFederation - parameters to configure keystone for OIDC federation
191+ OIDCFederation KeystoneFederationSpec `json:"oidcFederation,omitempty"`
183192}
184193
185194// APIOverrideSpec to override the generated manifest of several child resources.
@@ -195,6 +204,83 @@ type PasswordSelector struct {
195204 // +kubebuilder:default="AdminPassword"
196205 // Admin - Selector to get the keystone Admin password from the Secret
197206 Admin string `json:"admin"`
207+
208+ // +kubebuilder:validation:Optional
209+ // +kubebuilder:default="KeystoneClientSecret"
210+ // OIDCClientSecret - Selector to get the IdP client secret from the Secret
211+ KeystoneOIDCClientSecret string `json:"keystoneOIDCClientSecret"`
212+
213+ // +kubebuilder:validation:Optional
214+ // +kubebuilder:default="KeystoneCryptoPassphrase"
215+ // OIDCCryptoPassphrase - Selector to get the OIDC crypto passphrase from the Secret
216+ KeystoneOIDCCryptoPassphrase string `json:"keystoneOIDCCryptoPassphrase"`
217+ }
218+
219+ // KeystoneFederationSpec to provide the configuration values for OIDC Federation
220+ type KeystoneFederationSpec struct {
221+ // +kubebuilder:validation:Required
222+ // +kubebuilder:default="OIDC-"
223+ // OIDCClaimPrefix
224+ OIDCClaimPrefix string `json:"oidcClaimPrefix"`
225+
226+ // +kubebuilder:validation:Required
227+ // +kubebuilder:default="id_token"
228+ // OIDCResponseType
229+ OIDCResponseType string `json:"oidcResponseType"`
230+
231+ // +kubebuilder:validation:Required
232+ // +kubebuilder:default="openid email profile"
233+ // OIDCScope
234+ OIDCScope string `json:"oidcScope"`
235+
236+ // +kubebuilder:validation:Required
237+ // +kubebuilder:default=""
238+ // OIDCProviderMetadataURL
239+ OIDCProviderMetadataURL string `json:"oidcProviderMetadataURL"`
240+
241+ // +kubebuilder:validation:Required
242+ // +kubebuilder:default=""
243+ // OIDCIntrospectionEndpoint
244+ OIDCIntrospectionEndpoint string `json:"oidcIntrospectionEndpoint"`
245+
246+ // +kubebuilder:validation:Required
247+ // +kubebuilder:default=""
248+ // OIDCClientID
249+ OIDCClientID string `json:"oidcClientID"`
250+
251+ // +kubebuilder:validation:Required
252+ // +kubebuilder:default=";"
253+ // OIDCClaimDelimiter
254+ OIDCClaimDelimiter string `json:"oidcClaimDelimiter"`
255+
256+ // +kubebuilder:validation:Required
257+ // +kubebuilder:default="claims"
258+ // OIDCPassUserInfoAs
259+ OIDCPassUserInfoAs string `json:"oidcPassUserInfoAs"`
260+
261+ // +kubebuilder:validation:Required
262+ // +kubebuilder:default="both"
263+ // OIDCPassClaimsAs
264+ OIDCPassClaimsAs string `json:"oidcPassClaimsAs"`
265+
266+ // +kubebuilder:validation:Required
267+ // +kubebuilder:default="memcache"
268+ // OIDCCacheType
269+ OIDCCacheType string `json:"oidcCacheType"`
270+
271+ // +kubebuilder:validaton:Required
272+ // OIDCMemCacheServers
273+ OIDCMemCacheServers string `json:"oidcMemCacheServers"`
274+
275+ // +kubebuilder:validation:Required
276+ // +kubebuilder:default="HTTP_OIDC_ISS"
277+ // RemoteIDAttribute
278+ RemoteIDAttribute string `json:"remoteIDAttribute"`
279+
280+ // +kubebuilder:validation:Required
281+ // +kubebuilder:default=""
282+ // KeystoneFederationIdentityProviderName
283+ KeystoneFederationIdentityProviderName string `json:"keystoneFederationIdentityProviderName"`
198284}
199285
200286// KeystoneAPIStatus defines the observed state of KeystoneAPI
@@ -220,7 +306,7 @@ type KeystoneAPIStatus struct {
220306 // TransportURLSecret - Secret containing RabbitMQ transportURL
221307 TransportURLSecret string `json:"transportURLSecret,omitempty"`
222308
223- //ObservedGeneration - the most recent generation observed for this service. If the observed generation is less than the spec generation, then the controller has not processed the latest changes.
309+ // ObservedGeneration - the most recent generation observed for this service. If the observed generation is less than the spec generation, then the controller has not processed the latest changes.
224310 ObservedGeneration int64 `json:"observedGeneration,omitempty"`
225311}
226312
0 commit comments