您可以透過 API 和 CLI,檢視或自訂驗證原則設定。
有些詳細資料對於瞭解如何檢視或變更原則設定至關重要。
- 此功能僅允許使用一項密碼原則。
- 對密碼組態的變更會立即影響新使用者。管理員更新現有使用者密碼組態後,目前使用者必須遵循更新後的密碼組態變更。
- API 組態的變更約需 20 秒才會生效。
- 對於 NSX Edge,已變更的密碼不會在叢集之間同步。CLI 和 API 變更會同時顯示在一個節點中。
- 應用裝置傳輸節點支援包括 BCG、自發 Edge 或 Unified Appliance (UA)。在 ESX 中,不支援變更本機管理員或稽核員使用者的傳輸節點密碼組態。
- 特殊存取權管理 (PAM) 支援設定密碼長度下限或上限,但不支援同時設定兩者。
- 密碼項目使用負數來設定最小範圍,使用正數來設定最大範圍。若要保留現有預設值,請將回應保留空白。
- 如果在升級前有所修改,在升級之後,現有使用者的密碼原則組態會維持不變。在這此案例中,NSX Manager 不會強制執行預設密碼原則。
- 驗證原則
[API] /api/v1/node/aaa/auth-policy
[API] /api/v1/cluster/<Node-UUID>/node/aaa/auth-policy
[API] /api/v1/transport-nodes/<transport-node-id>/node/aaa/auth-policy
NSX Manager 支援以下 CLI 和 API 密碼複雜性和驗證命令。這些密碼原則選項現在可以在管理叢集節點間同步。檢視密碼詳細資料時,不需要任何權限。修改現有密碼預設值時,需要管理員權限。
如需預設範圍的相關資訊和其他詳細資料,請參閱《NSX 命令列介面參考》和《NSX API 指南》。
| 密碼選項 | CLI 命令 | |
|---|---|---|
| 檢視或設定密碼複雜性組態 | get password-complexity Wed Jun 08 2022 UTC 12:57:45.325 - minimum 12 characters in length - maximum 128 characters in length - minimum 1 lowercase characters - minimum 1 uppercase characters - minimum 1 numeric characters - minimum 1 special characters - default password complexity rules as enforced by the Linux PAM module set password-complexity 可以使用以下參數來變更特定參數: Minimum password length (leave empty to not change): Maximum password length (leave empty to not change): Lower characters (leave empty to not change): Upper characters (leave empty to not change): Numeric characters (leave empty to not change): Special characters (leave empty to not change): Minimum unique characters (leave empty to not change): Allowed similar consecutives (leave empty to not change): Allowed monotonic sequence (leave empty to not change): Hash algorithm (leave empty to not change): Password remembrance (leave empty to not change): |
|
| 檢視驗證原則 | get auth-policy cli lockout-period Lockout period max-auth-failures Maximum authentication failures before lockout |
|
| 設定驗證原則 | set auth-policy cli lockout-period Lockout period max-auth-failures Maximum authentication failures before lockout |
| 密碼選項 | API 命令 |
|---|---|
| 檢視密碼複雜性和授權原則 | get /api/v1/node/aaa/auth-policy {
"_retry_prompt": 3,
"_schema": "AuthenticationPolicyProperties",
"_self": {
"href": "/node/aaa/auth-policy",
"rel": "self"
},
"api_failed_auth_lockout_period": 5,
"api_failed_auth_reset_period": 900,
"api_max_auth_failures": 900,
"cli_failed_auth_lockout_period": 900,
"cli_max_auth_failures": 5,
"digits": -1,
"hash_algorithm": "sha512",
"lower_chars": -1,
"max_repeats": 0,
"max_sequence": 0,
"maximum_password_length": 128,
"minimum_password_length": 12,
"minimum_unique_chars": 0,
"password_remembrance": 0,
"special_chars": -1,
"upper_chars": -1
} |
| 檢視 VMware Identity Manager (vIDM) 授權原則 | get auth-policy vidm Wed Jun 08 2022 UTC 12:58:28.357 LB Enabled: False Enabled: False Hostname: Thumbprint: Client Id: Node Hostname: |
| 設定 vIDM 授權原則 | set auth-policy vidm enabled Enabled property hostname System’s network name lb-extern External Load Balancer Flag For vIDM Wiring |
設定密碼複雜性和授權原則
|
put /api/v1/node/aaa/auth-policy lockout_period <lockout-period-arg> |
|
lockout_reset_period |
|
max_auth_failures |
|
digits |
|
hash_algorithm |
|
lower_chars |
|
max_repeats |
|
max_sequence |
|
maximum_password_length |
|
minimum_password_length |
|
minimum_unique_chars |
|
password_remembrance
|
|
special_chars |
|
upper_chars |
| 重設密碼複雜性和/或驗證原則 | 對於節點、傳輸節點和叢集:reset-password-complexity reset-auth-policies reset-all |