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

Add reconciliation of authorization services in KeycloakClients #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kereis
Copy link

@kereis kereis commented Mar 17, 2023

Related GH Issue

Closes #11

Additional Information

In KeycloakClients, you can specify settings for authorization services. In its current state, the operator is not able to handle them correctly. keycloak/keycloak#16998 also addresses an issue with the client REST API because if the exported client.json contains authorization settings with policies referring to roles, the import fails because Keycloak cannot find the relevant roles at import time.

This MR adds a reconciliation logic explicitly for authorization settings and tries to maintain its state, regardless of the former mentioned issue.

Verification Steps

  1. Prepare a KeycloakClient CR containing authorizationSettings. This can be easily obtained by configuring authorization in Keycloak, then exporting the realm either via Admin Console or CLI.
  2. Checkout and run this MR
  3. Check the logs for reconciliation of authorization settings
  4. Keycloak should no longer throw exceptions when importing clients containing authorization settings
  5. Open authorization settings of the imported client in the Admin Console and check if the custom policies, resources etc. are present
  6. Change some data and check if the operator overwrites them again
  7. Change policy names and update references in CR to check if the operator can handle these changes

Checklist:

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.

Reconcile authorization service settings after client roles reconciliation
1 participant