-
Notifications
You must be signed in to change notification settings - Fork 150
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
Error when RoleRepresentation.getDescription() returns no description #970
Comments
I went through the same bug with those versions:
note: Adding the description in the config file (yaml in my case) did not fix the problem, I had to manually add a description for my default role in the database
|
Thanks for reporting the issue. We have tried with to reproduce your issue but everything seems to work fine. {
"realm": "tests-realm",
"enabled": true,
"roles": {
"realm": [
{
"name": "role-with-description"
},
{
"name": "another-role"
},
{
"name": "default-roles-test-realm"
}
],
"client": {
"account": [
{
"name": "view-profile",
"description": "View the user's profile"
},
{
"name": "manage-account",
"description": "Manage the user's account"
}
]
}
},
"clients": [
{
"clientId": "test-client",
"enabled": true,
"clientAuthenticatorType": "client-secret",
"secret": "test-secret",
"redirectUris": ["http://localhost:8080/*"],
"webOrigins": ["+"]
}
],
"users": [
{
"username": "testuser",
"enabled": true,
"email": "testuser@example.com",
"firstName": "Test",
"lastName": "User",
"credentials": [
{
"type": "password",
"value": "password",
"temporary": false
}
],
"realmRoles": [
"role-with-description"
]
}
]
} The above result is archieved with the environment that was provided by @toussa same thing for @schuerg. i used his same environment and everything worked just fine. Please what i would propose to you is that, you should provided steps to reproduce or a json or yaml import that we can use, since we might have wrongly understood the issue, or wrongly tried to reproduce it. You can also try to use the latest version of KC-CLI and keycloak console since most issues have been solves there. |
Hi @Motouom , thanks for your response. Unfortunately, I don't have the time yet to create a mini configuration that shows the bug. I hope I'll have time later to help you reproduce the bug. I came across the same bug recently, with the same stacktrace.
=> |
Hello @toussa. Thank you for the reply. I will look further into it then. Nice time. |
I can add the following regarding my big configuration.yaml: every roles have a description. When I look at the keycloak_role table, I see that my default role does not have a description (it wasn't a problem in my last keycloack version(13)) but it looks like to be the issue now. when I set some random description directly in database, it works (after restarting the keycloak container). What's "funny" is that I also have a NULL description for another role but It seems not an issue (uma_protection) |
Current Behavior
An error is thrown when
org.keycloak.representations.idm.RoleRepresentation.getDescription()
returns null.It happens, when roles have no description.
This happens here https://github.com/adorsys/keycloak-config-cli/blob/main/src/main/java/de/adorsys/keycloak/config/util/KeycloakUtil.java#L50
Here is the complete error log with stacktrace:
Expected Behavior
Should execute without error.
Environment
21.1.2
docker.io/adorsys/keycloak-config-cli:5.10.0-21.1.1
The text was updated successfully, but these errors were encountered: