KEYCLOAK-12395 - Include client scopes when importing realm through admin endpoints

403 views
Skip to first unread message

Miquel Adrover

unread,
Mar 16, 2021, 7:44:56 AM3/16/21
to Keycloak Dev
Hi
While implementing Keycloak in our organization we have stumbled upon https://issues.redhat.com/browse/KEYCLOAK-12395 which is preventing us to have a fully automated deployment mechanism which includes the storage of Keycloak configuration within version control and its promotion among different environments.

We evaluating if we can contribute this functionality to Keycloak ourselves but we'd need some high level guidance on how/where should we contribute it within the Keycloak codebase.

Extending the partialImport API seems a good place to start with, and we've found https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/partialimport/PartialImportManager.java#L54-L58  which looks like a good location to implement the import code for the clientScopeMappings and scopeMappings fields on a https://www.keycloak.org/docs-api/12.0/rest-api/index.html#_partialimportrepresentation.

On the other hand, I think it would be cleaner to implement the creation and update of these fields as part of the https://www.keycloak.org/docs-api/12.0/rest-api/index.html#_importrealm and https://www.keycloak.org/docs-api/12.0/rest-api/index.html#_updaterealm API end points.

Could anyone provide some high level guidance on how should we deliver this functionality? Is there any similar example that we could have a look?

Thanks!


Reply all
Reply to author
Forward
0 new messages