PowerFlex 4.X - 如何在 PFxM Keycloak 管理主控台中套用 LDAP 群組搜尋篩選器
Summary: 本文說明如何在 PFxM Keycloak 管理主控台中建立 LDAP 群組搜尋篩選器。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
使用者嘗試使用 LDAP 登入資料登入時,PFxM UI 登入逾時。
Cause
在具有大量群組 (20,000+) 的 AD 環境中,PFxM UI 的登入嘗試可能會逾時,因為 Keycloak 會列舉環境中的每個群組。搜尋篩選器會將 Keycloak 在使用者驗證和授權期間處理的群組限制為篩選器中列出的群組。
便條: 默認情況下,Keycloak 將驗證在 AD 域中具有活動帳戶的任何使用者。如果使用者不屬於篩選器中的群組,則他們將獲得授權,也無權存取 PFxM UI。
便條: 默認情況下,Keycloak 將驗證在 AD 域中具有活動帳戶的任何使用者。如果使用者不屬於篩選器中的群組,則他們將獲得授權,也無權存取 PFxM UI。
Resolution
- 從任何 PFxM MVM 節點執行下列命令,以取得 Keycloak 使用者的秘密/密碼。
kubectl get secret -n powerflex keycloak-admin-credentials -o jsonpath="{.data.password}" | base64 --decode; echo
2. 使用下列 URL 前往 Keycloak 管理 UI 主控台。
https://pfmp.company.org/auth
3. 按一下「管理主控台」,並使用使用者名稱 keycloak 和步驟 1
命令輸出中列出的金鑰登入: 4. 從下拉式清單中
的「主要」領域變更為「Powerflex」領域 5. 按一下「使用者同盟」,然後按一下設定的 LDAP 提供者。
6.按一下「Mappers」標籤,然後按一下「LdapGroupMapping」
7. 向下捲動並尋找「LDAP 篩選器」物件。使用以下語法添加您感興趣的特定組(這將創建“OR”篩選器)。語法中的 (etc) 值是用於根據需要添加其他組的佔位元。您添加的每個組都需要 () 圍繞“cn=”值。
(|(cn=group_name_1)(cn=group_name_2)(cn=group_name_3)(etc))
例如。
(|(cn=Monitoring_Group)(cn=Admin_Group)(cn=Deployment_Group))
8.按一下「儲存」。
9.從任何 PFxM MVM 節點執行下列命令,將 PFxM 與 LDAP 提供者同步。
設定 SSO IP、平台管理員權杖、入口 IP 及 LDAP ID
的系統變數便條:在 PM_TOKEN 變數命令中,請更換下列值 「Scaleio123!」 使用您用來登入 PFxM UI 的 管理員 密碼。
SSO_IP=`kubectl get svc -A | grep "sso " | awk '{print $4}'`
PM_TOKEN=`curl -k --location --request POST "https://${SSO_IP}:8080/rest/auth/login" --header 'Accept: application/json' --header 'Content-Type: application/json' --data '{"username": "admin","password": "Scaleio123!" }' | jq -r .access_token`
INGRESS_IP=$(kubectl get svc -A | grep -i rke2-ingress-nginx-controller | awk 'NR==1{print $5}')
LDAP_ID=$(curl -k https://${INGRESS_IP}/rest/v1/directory-services --header 'Accept: application/json' --header 'Content-Type: application/json' --header "Authorization: Bearer ${PM_TOKEN}" | jq -r '.[0].id')
10 執行下列命令,啟動從 PFxM 到 LDAP 提供者的同步。
curl -k -X POST https://${INGRESS_IP}/rest/v1/directory-services/${LDAP_ID}/sync --header "Authorization: Bearer ${PM_TOKEN}" --header 'Accept: application/json' --header 'Content-Type: application/json'
注意:如果成功,上述命令應該不會返回任何內容到螢幕。等待最多 15 分鐘,然後嘗試從 PFxM UI 新增使用者或群組。
Article Properties
Article Number: 000224858
Article Type: Solution
Last Modified: 26 Feb 2025
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.