kiwigrid/keycloak-controller

make sure that client scope is created before client

Opened this issue · 0 comments

If both a KeycloakClient and a KeycloakClientScope are created at the same time, the client scope is not assigned to the client. It only works if the KeycloakClientScope is created first while the client doesn't exist.

For example, this will not work:

apiVersion: k8s.kiwigrid.com/v1beta1
kind: KeycloakClientScope
metadata:
  name: some-scope
spec:
  keycloak: keycloak
  realm: realm
  name: some-scope
---
apiVersion: k8s.kiwigrid.com/v1beta1
kind: KeycloakClient
metadata:
  name: some-client
spec:
  keycloak: keycloak
  realm: realm
  clientId: some-client
  clientType: public
  defaultClientScopes:
    - some-scope