-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initializing with kc-config-cli not working #114
Comments
@francis-pouatcha From the output, it looks like the Keycloak Config CLI failed to authenticate with Keycloak, resulting in the 401 error. I checked out the branch and noticed that the import was being attempted on the wrong Keycloak instance. To resolve this, you need to update the KEYCLOAK_URL environment variable from https://keycloak.eudi-adorsys.com to your local instance at https://localhost:8443. This should allow authentication to succeed using the credentials defined in the .env file. Since this isn't an issue with the tool itself but rather a misconfiguration, I suggest we close this ticket. Let me know if you need any further assistance! |
KEYCLOAK_URL shall be set to KEYCLOAK_EXTERNAL_ADDR or the KEYCLOAK_ADMIN_ADDR? |
Here is the new log:
Some sort of incompatibility. Shall i restart the database? |
There is an incompatibility issue between the Keycloak Config CLI version and the Keycloak version, causing the import to fail due to unrecognized properties. KEYCLOAK_URL can be set to KEYCLOAK_ADMIN_ADDR |
Which version should I use when testing on your branch? The TAG property for the KC config is currently configured as v6.2.1? |
You can use the main branch. i added some changes to ease your work |
linux:~/dev/keycloak-ssi-deployment$ export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-amd64" && ./config/import_kc_config.sh
Config cli jar file exists...
Running the JAR file...
2025-03-09T16:58:12.713+01:00 INFO 1061309 --- [ main] d.a.k.config.KeycloakConfigApplication : Starting KeycloakConfigApplication v6.2.1 using Java 21.0.6 with PID 1061309 (/home/francis/dev/keycloak-ssi-deployment/target/keycloak-config-cli/target/keycloak-config-cli.jar started by francis in /home/francis/dev/keycloak-ssi-deployment)
2025-03-09T16:58:12.722+01:00 INFO 1061309 --- [ main] d.a.k.config.KeycloakConfigApplication : No active profile set, falling back to 1 default profile: "default"
2025-03-09T16:58:13.964+01:00 INFO 1061309 --- [ main] d.a.k.config.KeycloakConfigApplication : Started KeycloakConfigApplication in 2.205 seconds (process running for 3.273)
2025-03-09T16:58:15.605+01:00 INFO 1061309 --- [ main] d.a.k.config.KeycloakConfigRunner : Importing file 'file:/home/francis/dev/keycloak-ssi-deployment/config/realm.json'
2025-03-09T16:58:17.259+01:00 ERROR 1061309 --- [ main] d.a.k.config.KeycloakConfigRunner : HTTP 401 Unauthorized
2025-03-09T16:58:17.260+01:00 INFO 1061309 --- [ main] d.a.k.config.KeycloakConfigRunner : keycloak-config-cli ran in 00:02.290.
The text was updated successfully, but these errors were encountered: