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

should be able to set a displayName on the keycloak_oidc_google_identity_provider as well #639

Open
vilmosnagy opened this issue Jan 7, 2022 · 2 comments · May be fixed by #1033
Open

Comments

@vilmosnagy
Copy link

Hi,

There's an issue in newer keycloak's, that if an IDP Provider does not have a displayName, then the IDP Linking flow will fail with some StringIndexOutOfBoundsException, see: keycloak/keycloak#9217

I cannot set the displayName with keycloak_oidc_google_identity_provider, so that triggers this error. Instead of that currently we use the keycloak_oidc_identity_provider resource, like this:

resource "keycloak_oidc_identity_provider" "google_identity_provider" {
  realm         = keycloak_realm.public.id
  alias         = "google"
  client_id     = var.google_identity_provider_client_id
  client_secret = var.google_identity_provider_client_secret
  first_broker_login_flow_alias = local.flow_idp_first_broker_login
  post_broker_login_flow_alias = keycloak_authentication_flow.bkk-post-idp-flow.alias

  authorization_url = "https://not-used.realcity.io"
  token_url         = "https://not-used.realcity.io"

  provider_id = "google"
  sync_mode = "IMPORT"
  default_scopes = "openid profile email"
  display_name = "Google"
  backchannel_supported = false
}

Coudl you add the display_name attribute to the keycloak_oidc_google_identity_provider or set it to something by default?

Thanks,

@oysteinhauan
Copy link
Contributor

Have you tried setting extra_config { display_name = "Google" }?

@awoimbee
Copy link

@oysteinhauan I tried but it doesn't work.
extra_config pupulates IdentityProviderConfig while DisplayName is part of the IdentityProvider struct (check here).

When I create an IdP through the web console, displayName is not set; when I use this provider displayName is set to an empty string, thus triggering the keycloak bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants