Active Directory 同步 - 研究與工程 Studio

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Active Directory 同步

執行期組態

安裝期間,與 Active Directory (AD) 相關的所有 CFN 參數都是選用的。

Form for optional Active Directory configuration details with multiple input fields.

對於執行時間提供的任何秘密 ARN (例如 ServiceAccountCredentialsSecretArnDomainTLSCertificateSecretArn),請務必將下列標籤新增至 RES 的秘密,以取得讀取秘密值的許可:

  • 金鑰:res:EnvironmentName,值: <your RES environment name>

  • 金鑰:res:ModuleName,值: directoryservice

Web 入口網站中的任何 AD 組態更新都會在下一次排定的 AD 同步期間自動取得 (每小時)。使用者可能需要在變更 AD 組態後重新設定 SSO (例如,如果切換到不同的 AD)。

初次安裝後,管理員可以在身分管理頁面下的 RES Web 入口網站中檢視或編輯 AD 組態:

Active Directory domain configuration settings with fields for domain details and synchronization options.
Active Directory Synchronization form with fields for configuration settings.

其他設定

篩選條件

管理員可以使用使用者篩選和群組篩選選項篩選要同步的使用者群組。篩選條件必須遵循 LDAP 篩選條件語法。範例篩選條件為:

(sAMAccountname=<user>)

自訂 SSSD 參數

管理員可以提供索引鍵/值對的字典,其中包含要寫入叢集執行個體上 SSSD 組態檔案 [domain_type/DOMAIN_NAME] 區段的 SSSD 參數和值。RES 會自動套用 SSSD 更新 – 它會重新啟動叢集執行個體上的 SSSD 服務,並觸發 AD 同步程序。如需 SSSD 組態檔案的完整說明,請參閱 的 Linux 手冊頁面SSSD

SSSD configuration interface with options for ldap_id_mapping and join_active_directory.

SSSD 參數和值必須與 RES SSSD 組態相容,如下所述:

  • id_provider 由 RES 內部設定,不得修改。

  • AD 相關組態,包括 ldap_urildap_search_baseldap_default_bind_dnldap_default_authtok 是根據其他提供的 AD 組態設定,不得修改。

下列範例會啟用 SSSD 日誌的偵錯層級:

SSSD configuration form with ldap_id_mapping and join_active_directory set to true.

如何手動啟動或停止同步 (2025.03 及更新版本)

導覽至身分管理頁面,然後選擇 Active Directory 網域容器中的啟動 AD 同步按鈕,以隨需觸發 AD 同步。

Active Directory Domain configuration settings with domain details and synchronization options.

若要停止持續的 AD 同步,請選取 Active Directory 網域容器中的停止 AD 同步按鈕。

Active Directory Domain configuration interface with synchronization in progress and domain details.

您也可以在 Active Directory 網域容器中檢查 AD 同步狀態和最新的同步時間。

Active Directory Domain configuration settings with domain details and synchronization options.

如何手動執行同步 (2024.12 和 2024.12.01 版)

Active Directory 同步程序已從 Cluster Manager 內部主機移至幕後的一次性 Amazon Elastic Container Service (ECS) 任務。程序排程為每小時執行一次,您可以在<res-environment-name>-ad-sync-cluster叢集下的 Amazon ECS 主控台中找到執行中的 ECS 任務。

若要手動啟動它:
  1. 導覽至 Lambda 主控台並搜尋稱為 的 lambda<res-environment>-scheduled-ad-sync

  2. 開啟 Lambda 函數並前往測試

  3. 事件 JSON 中輸入下列項目:

    { "detail-type": "Scheduled Event" }
  4. 選擇測試

  5. CloudWatch 下觀察執行中 AD Sync 任務的日誌 → 日誌群組<environment-name>/ad-sync。您將看到每個執行中 ECS 任務的日誌。選取最新的 以檢視日誌。

注意
  • 如果您變更 AD 參數或新增 AD 篩選條件,RES 會將新使用者新增至新指定的參數,並移除先前已同步且不再包含在 LDAP 搜尋空間中的使用者。

  • RES 無法移除主動指派給專案的使用者/群組。您必須從專案中移除使用者,讓 RES 從環境中移除他們。

SSO 組態

提供 AD 組態後,使用者必須設定單一登入 (SSO),才能以 AD 使用者身分登入 RES Web 入口網站。SSO 組態已從一般設定頁面移至新的身分管理頁面。如需設定 SSO 的詳細資訊,請參閱 身分管理