Closed ianwallen closed 2 years ago
Hi @ianwallen, your assumption is completely correct. I can reproduce the issue with the integration tests by enabling the features preview.
Unfortunatelly our tool relies on the representation types given by keycloak. In this case https://github.com/keycloak/keycloak/blob/18.0.0/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java The field "userprofileEnabled" is not present.
As long as the RealmRepresentations don't contain the required fields we are not able to provide a solution for this issue.
By reading https://github.com/keycloak/keycloak/blob/b17f0695ee47d94f5470420f8ad061d246ad73f2/services/src/main/java/org/keycloak/userprofile/DeclarativeUserProfileProvider.java#L499 the property userProfileEnabled
should be under attributes, not a top level property.
Thanks @jkroepke for your hint @ianwallen I have built a running solution provided in a branch: https://github.com/adorsys/keycloak-config-cli/tree/feature/userProfileEnabled (diff: https://github.com/adorsys/keycloak-config-cli/compare/feature/userProfileEnabled)
For me it worked starting keycloak in the docker compose file als mentioned in the readme an then using keycloak-config-cli-18.0.0.jar with the following commands.
Based on the checked out branch and its project root execute...
docker-compose down --remove-orphans && docker-compose up keycloak
java -jar ~/Downloads/keycloak-config-cli-18.0.0.jar \ --keycloak.url=http://localhost:8080 \ --keycloak.ssl-verify=true \ --keycloak.user=admin \ --keycloak.password=admin123 \ --import.files.locations=./contrib/example-config/moped.json
@st3v0rr, @jkroepke Yes I see that it is in the attributes sections.
I had performed an export from keycloak to get the locations of the userProfileEnabled
attribute and then searched for a key that was next to it. I happened to use the key "clientSessionIdleTimeout" which happens to be in both the attributes
and off the root
. I had not noticed that there was 2 occurrences and used the wrong one as the reference.
Thank you very much for pointing out my error.
We can close this issue.
Problem Statement
I enabled declarative_user_profile https://www.keycloak.org/docs/latest/server_admin/#enabling-the-user-profile
And then tried to import a realm with realm property
userProfileEnabled
set totrue
but I get an error indicating that the attribute is not supported.Unrecognized field "userProfileEnabled" (class de.adorsys.keycloak.config.model.RealmImport), not marked as ignorable
I'm assuming that this has failing because it is a keycloak feature that is still in preview?
Proposed Solution
add support for userProfileEnabled?
Environment
Additional information
No response
Acceptance Criteria
No response