From 1bed021dbbe84352be0d04b89a92a2331a1aea1d Mon Sep 17 00:00:00 2001 From: Alexey Kazakov Date: Thu, 21 Dec 2023 15:56:37 -0800 Subject: [PATCH] SSO Configuration for web login to SSO --- api/v1alpha1/toolchainconfig_types.go | 12 ++++++++++-- api/v1alpha1/zz_generated.deepcopy.go | 10 ++++++++++ api/v1alpha1/zz_generated.openapi.go | 18 ++++++++++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/api/v1alpha1/toolchainconfig_types.go b/api/v1alpha1/toolchainconfig_types.go index c7843da7..c032871f 100644 --- a/api/v1alpha1/toolchainconfig_types.go +++ b/api/v1alpha1/toolchainconfig_types.go @@ -291,17 +291,25 @@ type RegistrationServiceAuthConfig struct { // +optional AuthClientLibraryURL *string `json:"authClientLibraryURL,omitempty"` - // AuthClientConfigContentType specifies the auth config config content type + // AuthClientConfigContentType specifies the auth config content type // +optional AuthClientConfigContentType *string `json:"authClientConfigContentType,omitempty"` - // AuthClientConfigRaw specifies the URL used to a access the registration service + // AuthClientConfigRaw specifies the URL used to access the registration service // +optional AuthClientConfigRaw *string `json:"authClientConfigRaw,omitempty"` // AuthClientPublicKeysURL specifies the public keys URL // +optional AuthClientPublicKeysURL *string `json:"authClientPublicKeysURL,omitempty"` + + // SsoBaseURL specifies the SSO base URL such as https://sso.redhat.com + // +optional + SsoBaseURL *string `json:"ssoBaseURL,omitempty"` + + // SsoRealm specifies the SSO realm name + // +optional + SsoRealm *string `json:"ssoRealm,omitempty"` } // RegistrationServiceVerificationConfig contains the subset of registration service configuration parameters related to verification diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 1c8f2ccf..03c7c7ef 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1945,6 +1945,16 @@ func (in *RegistrationServiceAuthConfig) DeepCopyInto(out *RegistrationServiceAu *out = new(string) **out = **in } + if in.SsoBaseURL != nil { + in, out := &in.SsoBaseURL, &out.SsoBaseURL + *out = new(string) + **out = **in + } + if in.SsoRealm != nil { + in, out := &in.SsoRealm, &out.SsoRealm + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrationServiceAuthConfig. diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index c0c71071..3eb9f825 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -2569,14 +2569,14 @@ func schema_codeready_toolchain_api_api_v1alpha1_RegistrationServiceAuthConfig(r }, "authClientConfigContentType": { SchemaProps: spec.SchemaProps{ - Description: "AuthClientConfigContentType specifies the auth config config content type", + Description: "AuthClientConfigContentType specifies the auth config content type", Type: []string{"string"}, Format: "", }, }, "authClientConfigRaw": { SchemaProps: spec.SchemaProps{ - Description: "AuthClientConfigRaw specifies the URL used to a access the registration service", + Description: "AuthClientConfigRaw specifies the URL used to access the registration service", Type: []string{"string"}, Format: "", }, @@ -2588,6 +2588,20 @@ func schema_codeready_toolchain_api_api_v1alpha1_RegistrationServiceAuthConfig(r Format: "", }, }, + "ssoBaseURL": { + SchemaProps: spec.SchemaProps{ + Description: "SsoBaseURL specifies the SSO base URL such as https://sso.redhat.com", + Type: []string{"string"}, + Format: "", + }, + }, + "ssoRealm": { + SchemaProps: spec.SchemaProps{ + Description: "SsoRealm specifies the SSO realm name", + Type: []string{"string"}, + Format: "", + }, + }, }, }, },