-
Notifications
You must be signed in to change notification settings - Fork 330
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
keycloak_ldap_user_federation with master realm is not working #694
Comments
+1 |
Hi @spidersouleater, sorry that you're having this issue. I tried the example configuration you provided, and I wasn't able to reproduce the problem. Could you give me some more information so I could investigate this further? Specifically, if you could provide an error message, or provide the output logs after running terraform with the |
+1 |
Hi mrparkers, thanks for your help. When executing the example configuration no error message seems to appear and everything has been configured correctly. But when you take look in the Keycloak Admin Console you can see that "LDAP user federation provide" has not been created. keycloak-18.0.2-legacy
The problem still exists in the recent versions. You can see in the Keycloak Admin Console the missing provider after the Terrafrom execution. Here are the logs: keycloak-17.0.1-legacy
This seems to be the last Version where everything is fine. You can see in the Keycloak Admin Console the created Provider after Terraform install. Here are the logs: I could find out that Keycloak-18-legacy use a UUID for the Master-Realm and not anymore the String representation "master". That could maybe cause the problems we have. |
+1 |
I spent little time with the logs and the Keycloak Api. I could find out that the "parentId" of the following request body to the Endpoint "Component - POST - /{realm}/components" cause our problems. {
"name": "openldap",
"providerId": "ldap",
"providerType": "org.keycloak.storage.UserStorageProvider",
"parentId": "master",
"config": {
"allowKerberosAuthentication": [
"true"
],
"authType": [
"simple"
],
"batchSizeForSync": [
"1000"
],
"bindCredential": [
"admin"
],
"bindDn": [
"cn=admin,dc=example,dc=org"
],
"cachePolicy": [
""
],
"changedSyncPeriod": [
"-1"
],
"connectionTimeout": [
"5000"
],
"connectionUrl": [
"ldap://openldap"
],
"editMode": [
"READ_ONLY"
],
"enabled": [
"true"
],
"evictionDay": [],
"evictionHour": [],
"evictionMinute": [],
"fullSyncPeriod": [
"-1"
],
"importEnabled": [
"true"
],
"kerberosRealm": [
"FOO.LOCAL"
],
"keyTab": [
"/etc/host.keytab"
],
"maxLifespan": [],
"pagination": [
"true"
],
"priority": [
"0"
],
"rdnLDAPAttribute": [
"cn"
],
"readTimeout": [
"10000"
],
"searchScope": [
"1"
],
"serverPrincipal": [
"HTTP/host.foo.com@FOO.LOCAL"
],
"startTls": [
"false"
],
"syncRegistrations": [
"false"
],
"trustEmail": [
"false"
],
"useKerberosForPasswordAuthentication": [
"false"
],
"usePasswordModifyExtendedOp": [
"false"
],
"useTruststoreSpi": [
"ldapsOnly"
],
"userObjectClasses": [
"simpleSecurityObject, organizationalRole"
],
"usernameLDAPAttribute": [
"cn"
],
"usersDn": [
"dc=example,dc=org"
],
"uuidLDAPAttribute": [
"entryDN"
],
"validatePasswordPolicy": [
"false"
],
"vendor": [
"other"
]
} If we set the UUID for the Master Realm or remove the optional field "parentId" than the Keycloak Api creates the "User Federation" again. I hope the information can help to solve the problem faster. |
Sorry for taking so long on this. The root problem here is that Keycloak 18 changed the internal ID of the default I've opened #707 to fix this. |
This is fixed in |
Hi mrparkes, i have tested the bugfix version and everything seems fine, now. Thank you for your help. |
Of course, thank you for your help with the debugging effort! It saved me a lot of time since I didn't have to do much research to fix this. |
It's not possible to create a LDAP user federation provider within the Realm "master", anymore.
The problem occurs with the Image "quay.io/keycloak/keycloak:18.0.0-legacy". I'm using the Version 3.8.1 of the terraform-provider-keycloak.
Minimal example to reproduce the Problem:
The text was updated successfully, but these errors were encountered: