[keycloak-user] enable/disable permissions via the Java API

Graser Leon (INST-CSS/BSV-OS) Leon.Graser at bosch-si.com
Mon Jul 23 02:32:23 EDT 2018


Hi all,

for a project we currently try to automate out Keycloak setup programmatically using the Java API. So far I figured out most of the requirements except for one feature. How can I enable/disable the permissions of an object such as a group or a role? In the web UI they have a tab called "Permissions" with a boolean switch to enable/disable them and if I have a look at the HTTP calls I find a PUT call to my group similar to <url>/auth/admin/realms/<realm-name>/groups/<id>/management/permission with a payload of { enabled: true }. As of now I extended the org.keycloak.admin.client.resource.GroupResource interface to make it happen using RESTeasy. Is there an already existing way in the Java API to accomplish that?

Thanks in advance for any ideas.

Regards,
Leon


More information about the keycloak-user mailing list