LDAP Authentication: Malformed LDAP Filter Syntax, Authorization Works Only for Root Admin
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- java
研究方向
首先,在 CloudStack 4.22.1.0 上重現 LDAP 使用者匯入和非 Root Admin 使用者登入,然後檢查 issue 中顯示的管理伺服器日誌和 LDAP 搜尋請求。當產生的 LDAP 篩選器在語法上有效、LDAP 匯入成功,且沒有 Root Admin 角色的使用者可以載入 UI 時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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)?
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 6 天 20 小時
- 30 天內合併 PR
- 27
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/cloudstack 的其他 Issue
-
bug
難度 1/5 1 小時以內 新手友好度 90/100
apache/cloudstack#14222 ·
-
bug component:kubernetes
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14070 · 5 則留言 ·
-
component:backup
難度 2/5 1-3 小時 新手友好度 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 未關閉bug component:ceph
難度 2/5 1-3 小時 新手友好度 78/100
apache/cloudstack#13989 · 3 則留言 ·
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
area/plugin
難度 2/5 1-3 小時 新手友好度 75/100
kestra-io/plugin-kestra#190 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
apache/rocketmq-dashboard#5064 ·