LDAP Authentication: Malformed LDAP Filter Syntax, Authorization Works Only for Root Admin
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- java
- Domaine
- authentication, backend
Piste de recherche
Commencez par reproduire l’importation d’utilisateurs LDAP et la connexion d’un utilisateur qui n’est pas Root Admin sur CloudStack 4.22.1.0, puis examinez les journaux du serveur de gestion et la requête de recherche LDAP affichée dans l’issue. Le travail est considéré comme terminé lorsque le filtre LDAP généré est syntaxiquement valide, que l’importation LDAP réussit et que les utilisateurs ne disposant pas du rôle Root Admin peuvent charger l’UI.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
problem
Issue Description
After upgrading CloudStack from version 4.21.0.0 to 4.22.1.0, LDAP user authentication stopped working for all roles except Root Admin.
Symptoms
- Root Admin — authentication succeeds, UI works correctly
- Non-Root Admin users — authentication appears to succeed, but after login:
- System cannot load any components in the zone
- UI shows "infinite page loading" that ends in timeout
Behavior on Fresh Installation
When testing on a new CloudStack 4.22.1.0 instance with LDAP user import, logs show an error — malformed LDAP filter syntax (extra opening parenthesis ( at the end):
{"attributes":["uid","mail","givenname","sn","cn","userAccountControl","memberof"],"baseDN":"DC=ldap,DC=goauthentik,DC=io","bindDN":"cn=ldapservice,ou=users,dc=ldap,dc=goauthentik,dc=io","client":"X.X.X.X.","event":"Search request","filter":"(&(&(objectCategory=person)(objectClass=inetOrgPerson))(uid=*)(
Comparison with Working Version (Root Admin)
On the version where Root Admin works correctly, the filter looks correct:
{"attributes":["cn","mail","givenname","sn","cn","userAccountControl","memberof"],"baseDN":"DC=ldap,DC=goauthentik,DC=io","bindDN":"cn=ldapservice,ou=users,dc=ldap,dc=goauthentik,dc=io","client":"X.X.X.X.","event":"Search request","filter":"(&(&(objectCategory=person)(objectClass=inetOrgPerson))(cn=*))","level":"info","requestId":"c411e2c7-0468-46af-9120-b7d1fc652f36","scope":"Whole Subtree","timestamp":"2026-08-26T11:13:44Z","took-ms":15}
versions
Environment
| Parameter | Value |
|---|---|
| Product | Apache CloudStack |
| Version (before upgrade) | 4.21.0.0 |
| Version (after upgrade) | 4.22.1.0 |
| Hypervision | KVM |
The steps to reproduce the bug
Steps to Reproduce
Scenario 1: Upgrade from 4.21.0.0 → 4.22.1.0
- Install CloudStack 4.21.0.0 with LDAP authentication configured
- Upgrade to version 4.22.1.0
- Attempt to login as a user without Root Admin role
- Observed result:
- Login appears successful
- UI does not load components (infinite loading → timeout)
Scenario 2: Fresh Installation 4.22.1.0
- Deploy new CloudStack 4.22.1.0 instance
- Configure LDAP authentication (goauthentik or similar server)
- Import users from LDAP
- Check CloudStack Management Server logs
- Observed result:
- LDAP query with malformed filter (extra
(at the end)
- LDAP query with malformed filter (extra
{"attributes":["uid","mail","givenname","sn","cn","userAccountControl","memberof"],"baseDN":"DC=ldap,DC=goauthentik,DC=io","bindDN":"cn=ldapservice,ou=users,dc=ldap,dc=goauthentik,dc=io","client":"X.X.X.X.","event":"Search request","filter":"(&(&(objectCategory=person)(objectClass=inetOrgPerson))(uid=*)(
Comparison with Working Version (Root Admin)
On the version where Root Admin works correctly, the filter looks correct:
{"attributes":["cn","mail","givenname","sn","cn","userAccountControl","memberof"],"baseDN":"DC=ldap,DC=goauthentik,DC=io","bindDN":"cn=ldapservice,ou=users,dc=ldap,dc=goauthentik,dc=io","client":"X.X.X.X.","event":"Search request","filter":"(&(&(objectCategory=person)(objectClass=inetOrgPerson))(cn=*))","level":"info","requestId":"c411e2c7-0468-46af-9120-b7d1fc652f36","scope":"Whole Subtree","timestamp":"2026-08-26T11:13:44Z","took-ms":15}
What to do about it?
Expected Behavior
- LDAP filter should be syntactically correct
- Users of all roles (not only Root Admin) should successfully authenticate and access the UI
- Filter should match the format:
(&(&(objectCategory=person)(objectClass=inetOrgPerson))(uid=*))
Actual Behavior
- LDAP filter contains syntax error:
(&(&(objectCategory=person)(objectClass=inetOrgPerson))(uid=*)( - Non-Root Admin users cannot work in UI after authentication
- On fresh installation, LDAP user import fails due to invalid filter
Questions
- How to fix permissions in the "upgraded" CloudStack version where only Root Admin can authenticate without issues?
- How to fix the issue in fresh installation with the LDAP query error (malformed filter syntax)?
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 5 j 19 h
- PR mergées (30 j)
- 17
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/cloudstack
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
apache/cloudstack#14248 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
apache/cloudstack#14244 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
apache/cloudstack#14222 ·
Les mainteneurs répondent en général sous 1 jour
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os'sOuvertebug component:kubernetes
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
apache/cloudstack#14180 ·
Les mainteneurs répondent en général sous 1 jour
-
bug component:projects component:UI
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
apache/cloudstack#14070 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/cloudstack
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
grimmory-tools/grimmory#2850 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
aoqia194/leaf-loader#19 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
apache/streampark#4521 ·
-
Update license yearOuverte0 - Backlog 1 - Ready documentation good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100