This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
KEYCLOAK-16488 Add AuthZ settings to client CRD Redux #333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA ID
Additional Information
authorizationSettings
field to theKeycloakClient
CRD.v1.JSON
to eliminate the cycles which occur within the ResourceServerRepresentation data type. See diagram below for the links removed. Also, here is the issue tracking support for recursion in CRD validation schemas. Inspired by a fix applied to a similar problem encountered in the Prometheus Operator project.authorizationSettings
in their CRs? Not much as the "type erased" fields can be specified as usual within the YAML, minus schema validation by k8s. It has more of an impact on any Go code needing to consume this data - which is unlikely within the Operator and will happily be serialized to JSON again when it is sent forward to the Keycloak Admin REST API.delete client role
event on the auto-generateduma_protection
role which is created behind the scenes by Keycloak whenauthorizationSettings
are present duringclient create
.authorizationSettings
in their CRs to explicitly adduma_protection
toSpec.Roles
. I feel this approach requires less hand holding and is less error prone but I'm open for ideas/suggestions!Verification Steps
Client CRD with authorizationSettings
client-with-authz.yaml
atdeploy/examples/client
with the expanded contents of the above CRDkubectl create -f deploy/examples/client/client-with-authz.yaml -n <namespace>
Checklist: