mayope / keycloakmigration

Manage your Keycloak configuration with code.
https://mayope.net
MIT License
108 stars 22 forks source link

Support client authorization settings #64

Open zambrovski opened 1 year ago

zambrovski commented 1 year ago

Hi,

I wonder if the client authorization can be supported by the client. As far as I understand, it is accessible as soon as the client "fine grained authorization" is active.

Then the entire configuration can be imported as JSON. In Keycloak JSON Structure it is described by the ResourceServerRepresentation object being an optional attribute authorizationSettings of the client. (see for example: https://www.keycloak.org/docs-api/19.0.1/rest-api/#_clientrepresentation)

Is there are quick workaround to pass this using the library?

Cheers,

Simon

klg71 commented 1 year ago

Hey @zambrovski thanks for opening this issue and cleaning up the stale ones :) Currently this setting is not supported. It could take me a couple of weeks to implement it. It would probably be a new action because it would use another endpoint then updateClientAction. As far as I understand it you have to enable authorization on the client and then supply your json to: https://keycloak/auth/admin/realms/raids/clients/{clientId}/authz/resource-server/import. If you are comfortable with the code base you could just implement it :) If any problems occur I would be sure to assist you.

zambrovski commented 1 year ago

I'm already on it... give me some hours.. 😎