Thank you Pedro.
I had experimented with "--file" to no avail, however I read your OpenShift
examples and they are most helpful.
For anyone who reads this thread in the future, here is my updated process
for using the Admin CLI to add a builtin protocol mapper to a client:
- use the Admin GUI to create a dummy client and add the builtin protocol
mapper to it
- use the Admin CLI to get a JSON version of that dummy client, then delete
the dummy client
- edit the JSON to suit requirements
- use "kdadm.sh create clients --target-realm your-realm --file
your-edited-JSON" in your scripts to add the actual client(s)
Regards
Bruce
On Mon, 9 Sep 2019 at 23:25, Pedro Igor Silva <psilva(a)redhat.com> wrote:
Hi,
Some time ago we did some work for integrating Keycloak with Openshift so
that we had to use Admin CLI a lot in order to create/configure things more
dynamically.
You may want to have a look here
https://github.com/keycloak/openshift-integration/blob/master/configure-k....
Note that the CLI allows you to pass a full JSON with your client settings.
In that example, we are creating a client and setting an
user-property-mapper
https://github.com/keycloak/openshift-integration/blob/master/kc-client-o...
.
Regards.
Pedro Igor
On Mon, Sep 9, 2019 at 10:07 AM Bruce Smith <bruceesmith(a)gmail.com> wrote:
> Hi
>
> I am trying to add the built-in protocol mapper "realm roles" to a client
> using the Admin CLI. I must have tried 500 syntactic combinations for the
> "--set" parameter; they all result in either no error (but no mapper added
> to the client), or a Java exception
> (com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot
> deserialize instance of `java.util.ArrayList` out of VALUE_STRING token).
>
> Does anyone have an example that can be shared of successfully using the
> Admin CLI for this operation, please?
>
> Keycloak version is 6.0.1
>
> Regards
> Bruce
> _______________________________________________
> keycloak-user mailing list
> keycloak-user(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
>