kiwigrid / keycloak-controller

This controller manages Keycloak clients and realms over Kubernetes resources.
https://hub.docker.com/r/kiwigrid/keycloak-controller
MIT License
35 stars 13 forks source link

Client Scope CRD does not match Java implementation #19

Closed zhennTil closed 4 years ago

zhennTil commented 4 years ago

The ClientScopeResource Java class uses a Map<String,String> for the attributes field, but the CRD defines it as an array of key/value pairs. Thus, defining the attributes field in a client scope resource causes keycloak-controller to fail.

This changes the CRD to define attributes as an object rather than an array.

zhennTil commented 4 years ago

Nevermind -- it seems like there's deeper issues... looking further into it...

zhennTil commented 4 years ago

It seems like not setting the name field on the ClientScopeRepresentation made Keycloak bug out -- at least on Keycloak 7.0.0, maybe not 4.8.3.

Furthermore, it seems like the controller was intended to set the name rather than the UUID of the client scope. This change lets Keycloak assign the UUID instead.