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

keycloak_openid_client_scope is not setting Assigned Type field #776

Open
tp20165 opened this issue Nov 29, 2022 · 5 comments
Open

keycloak_openid_client_scope is not setting Assigned Type field #776

tp20165 opened this issue Nov 29, 2022 · 5 comments

Comments

@tp20165
Copy link

tp20165 commented Nov 29, 2022

In the Master realm, I am generating client scope using keycloak_openid_client_scope resource. It created scope with Assigned Type as None. I need to set it as Default. I don't see any option to set the assigned type. Am I missing anything?

@mrohlof-protofy
Copy link

I need this, too. Seems like in https://github.com/mrparkers/terraform-provider-keycloak/blob/10e59625b45741464ca3c34a3fba07011981e6a5/provider/resource_keycloak_openid_client_scope.go, the type field is missing.

This way, we can not create scopes that are default for every new client - which is a pain.

@klauserber
Copy link

It would be fine to have that.

I use keycloak_openid_client_default_scopes to set default client scopes für single clients like this:

resource "keycloak_openid_client_default_scopes" "client_default_scopes" {
  realm_id  = keycloak_realm.isium.id
  client_id = keycloak_openid_client.weave.id

  default_scopes = [
    "acr",
    "profile",
    "email",
    "roles",
    "web-origins",
    keycloak_openid_client_scope.groups_scope.name,
  ]
}

@lesaux
Copy link

lesaux commented Jun 28, 2023

keycloak_openid_client_default_scopes seems to have no effect for me.

The Assigned type for a custom keycloak_openid_client_scope remains to "None" in the GUI, despite the terraform apply running fine.

@francoisauclair911
Copy link

Just checking if there was some progress on this ?

Thanks!

@hameno
Copy link

hameno commented Feb 26, 2024

We also need this...

EDIT1: Looked at the APIs, it looks like you need to use /admin/realms/[realm]/default-optional-client-scopes / /admin/realms/[realm]/default-optional-client-scopes / /admin/realms/[realm]/default-default-client-scopes API, so we could change keycloak_openid_client_optional_scopes and keycloak_openid_client_default_scopes resources to make client_id optional to manage the realm defaults/optionals

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

No branches or pull requests

6 participants