-
Notifications
You must be signed in to change notification settings - Fork 18
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
Adding a mapper to an existing client scope #187
Comments
Greetings, You should be able to create the Ressource you want to reference in "Observe Only" Mode, for that lookup Management policies. If you have more questions or Problems let me know https://docs.crossplane.io/latest/guides/import-existing-resources/ |
Hey @Breee, thanks for the swift response! Unfortunately, I still cannot make it work. I have this object now: apiVersion: openidclient.keycloak.crossplane.io/v1alpha1
kind: ClientScope
metadata:
name: my-scope
spec:
managementPolicies: ["Observe"]
forProvider:
realmId: "existing-realm"
name: "profile"
providerConfigRef:
name: "dev" and I get:
The realm exists and there is a client scope called "profile", created by default (not by me, this is a built-in scope) when the realm is created. |
Any development/news/comment here? |
Sorry for the late reply,
should we add importing of existing scopes to https://gitlab.com/corewire/images/crossplane/function-keycloak-builtin-objects @b509 ? |
Hey @Breee, unfortunately adding this annotation does not work either. I tried both: apiVersion: openidclient.keycloak.crossplane.io/v1alpha1
kind: ClientScope
metadata:
name: my-scope
annotations:
crossplane.io/external-name: profile
spec:
managementPolicies: ["Observe"]
forProvider:
realmId: "existing-realm"
name: "profile"
providerConfigRef:
name: "dev" and (without the apiVersion: openidclient.keycloak.crossplane.io/v1alpha1
kind: ClientScope
metadata:
name: my-scope
annotations:
crossplane.io/external-name: profile
spec:
managementPolicies: ["Observe"]
forProvider:
realmId: "existing-realm"
providerConfigRef:
name: "dev" Both result in However, when I use the scope ID in the annotation, like: apiVersion: openidclient.keycloak.crossplane.io/v1alpha1
kind: ClientScope
metadata:
name: my-scope
annotations:
crossplane.io/external-name: "20bb8d4a-e8e6-4e6e-8688-b2eb48c208bc"
spec:
managementPolicies: ["Observe"]
forProvider:
realmId: "existing-realm"
providerConfigRef:
name: "dev" the ClientScope is found. Furthermore, its I vote "YES" on your question to @b509 :) |
That's a keycloak thing to resolve objects with these UUIDs. |
Hey guys, great work so far!
I have the following problem:
I want to add a mapper to an existing client scope, namely the "profile" client scope.
This works fine if I use the clientScopeId, but this is not really a solution since the scope id is random uuid.
Furthermore, I cannot match by label (using clientScopeIdSelector) since I am not creating the client scope, and there is no kuberentes/crossplane resource that corresponds to the scope.
I expected to be able to use clientScopeIdRef.name but this also seems to refer to the name of a kubernetes object and not the name of the client scope in keycloak.
I tried to create a ClientScope resource, that will not create the scope but will just reference it. This is, however, not possible - te provider tries to always create objects and if they already exist, it gives 409.
So... how should I do that?
Cheers!
The text was updated successfully, but these errors were encountered: