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

Service account realm roles support #202

Merged

Conversation

waldemarschmalz
Copy link
Contributor

This PR adds support to add a realm-role to a service account.

With resource_keycloak_openid_client_service_account_role it was not possible to add realm-roles. Maybe this is not the best solution, but it works.

I added resource_keycloak_openid_client_service_account_realm_role.
Currently it is only possible to add a single role per resource. There are no docs yet.

Maybe resource_keycloak_openid_client_service_account_role and resource_keycloak_openid_client_service_account_realm_role could be merged.

@mrparkers
Copy link
Owner

Yeah, I agree that these two resources should eventually be merged, but there really isn't a clean way to do that right now. Unfortunately, the way I decided to handle resource IDs when I first started writing this provider makes it difficult to use them them practically. In this case, they could have be used to determine the difference between a realm role and a client role, so another resource wouldn't be needed.

At some point this year I plan to release a 2.0 version that completely reworks how resource IDs are treated which should simplify the code a lot, and allow for this to be condensed into a single resource.

For now I'll merge this for you so you can get the value you need. Thanks for the PR!

@mrparkers mrparkers merged commit 57d19b8 into mrparkers:master Jan 27, 2020
@waldemarschmalz
Copy link
Contributor Author

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants