Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made UserSignup.Spec.IdentityClaims property required #405

Merged
merged 5 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (r AuthConfig) AuthClientConfigRaw() string {
}

func (r AuthConfig) AuthClientPublicKeysURL() string {
return commonconfig.GetString(r.c.AuthClientPublicKeysURL, "https://sso.devsandbox.dev/auth/realms/sandbox-dev/protocol/openid-connect/certs")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a new keycloak thing? Or specific to our dev sso configuration?
We do rely on auth/realms path in a few places which is consistent with our production sso.redhat.com.
If we have a different path in dev sso then it won't work OOTB.
See https://github.com/search?q=repo%3Acodeready-toolchain%2Fregistration-service+%22auth%2Frealms%22&type=code

return commonconfig.GetString(r.c.AuthClientPublicKeysURL, "https://sso.devsandbox.dev/realms/sandbox-dev/protocol/openid-connect/certs")
}

func (r AuthConfig) SSOBaseURL() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/configuration/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestRegistrationService(t *testing.T) {
assert.Equal(t, "application/json; charset=utf-8", regServiceCfg.Auth().AuthClientConfigContentType())
assert.Equal(t, `{"realm": "sandbox-dev","auth-server-url": "https://sso.devsandbox.dev/auth","ssl-required": "none","resource": "sandbox-public","clientId": "sandbox-public","public-client": true, "confidential-port": 0}`,
regServiceCfg.Auth().AuthClientConfigRaw())
assert.Equal(t, "https://sso.devsandbox.dev/auth/realms/sandbox-dev/protocol/openid-connect/certs", regServiceCfg.Auth().AuthClientPublicKeysURL())
assert.Equal(t, "https://sso.devsandbox.dev/realms/sandbox-dev/protocol/openid-connect/certs", regServiceCfg.Auth().AuthClientPublicKeysURL())
assert.Equal(t, "https://sso.devsandbox.dev", regServiceCfg.Auth().SSOBaseURL())
assert.Equal(t, "sandbox-dev", regServiceCfg.Auth().SSORealm())
assert.False(t, regServiceCfg.Verification().Enabled())
Expand Down
2 changes: 1 addition & 1 deletion test/fake/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var certsContent = `{"keys":[{"kid":"E3DKGdZQ7xTiIvfdFgVXLNupVupFBlcxNUgVCFhDwEg

func MockKeycloakCertsCall(t *testing.T) {
gock.New("https://sso.devsandbox.dev").
Get("auth/realms/sandbox-dev/protocol/openid-connect/certs").
Get("realms/sandbox-dev/protocol/openid-connect/certs").
Persist().
Reply(200).
BodyString(certsContent)
Expand Down
Loading