設定 Active Directory 使用者的認證與授權
設定 Oracle Cloud Infrastructure 身分識別與存取管理、設定 Active Directory (AD) 認證與授權、設定 NFS 匯出及設定 Unix 權限。
設定 Oracle Cloud Infrastructure Identity and Access Management 原則
在 Oracle Cloud Infrastructure (OCI) 身分識別與存取管理中建立動態群組,並新增原則以允許掛載目標存取 LDAP 和 Kerberos 加密密碼。Kerberos 和 LDAP 配置都必須要有此項目。
使用 Kerberos 設定 Active Directory 認證
設定 Oracle Cloud Infrastructure Identity and Access Management 之後,您就會設定 Active Directory。設定 Kerberos 包含兩個步驟:將掛載目標結合為 Microsoft 的 Active Directory ,然後使用 Kerberos 組態更新掛載目標設定值。
將掛載目標加入 Active Directory
如果 Active Directory 使用者需要認證,請完成此作業。這是 Oracle Cloud Infrastructure File Storage 服務以外的手動執行處理作業。將掛載目標加入 Microsoft 的 Active Directory 中涉及新增電腦帳戶至 Active Directory 、設定正確的加密、擷取金鑰頁籤,以及將掛載目標新增至 DNS。
設定 Kerberos 的掛載目標
建立 keytab 的加密密碼。加密密碼內容是您在使用 Active Directory 加入掛載目標時複製的 base64 編碼金鑰頁籤。
以下為配置 Kerberos 掛載目標所需的基本步驟:
- 將掛載目標加入 Active Directory (上一步)。
- 設定 keytab 保存庫加密密碼。
- 在掛載目標上設定 Kerberos。
使用 Kerberos 掛載 NFS 匯出
Kerberos NFS 支援下列三種安全機制。
- krb5:Kerberos 僅用於認證。
- krb5i:經過認證並使用每個交易的加密雜湊來確保完整性。流量仍然可以攔截與檢查,但無法修改流量。
- krb5p:已認證並加密用戶端與伺服器之間的所有流量。無法檢查流量,因此無法修改。
C:\Users\fss-user-1>mount -o sec=krb5 fss-mt-ad-1.fss-ad.com:/krb-fs-1 T:
T: is now successfully connected to fss-mt-ad-1.fss-ad.com:/krb-fs-1
The command completed successfully.
sys
、krb5
、krb5i
和 krb5p
),Windows 將選擇匯出時設定的進階安全功能。請使用 mount
指令來確認掛載磁碟機時選取的 Windows 標籤。
C:\Users\fss-user-1>mount
Local Remote Properties
-------------------------------------------------------------------------------
T: \\fss-mt-ad-1.fss-ad.com\krb-fs-1 UID=0, GID=0
rsize=1048576, wsize=1048576
mount=soft, timeout=0.8
retry=1, locking=yes
fileaccess=755, lang=ANSI
casesensitive=no
sec=krb5
C:\Users\fss-user-1>whoami
fss-ad\fss-user-1
您現在可以從 Windows 檔案總管存取磁碟機。請注意,每個使用者都有執行磁碟機對應,而存取 OCI File Storage 共用的每位使用者,都應該將共用對應至個別的磁碟機代號。
設定 LDAP 的 Active Directory 授權
若 Active Directory 使用者需要 LDAP 授權,請完成此工作。收集 Active Directory 所需的資訊、設定存取檔案儲存體之所有使用者和群組的 RFC2307 屬性,然後在掛載目標上設定 LDAP。
以下是設定 LDAP Active Directory 授權所需的基本步驟:
- 從 Active Directory 取得 LDAP 組態詳細資訊。
- 設定 LDAP 連結使用者加密密碼。
- 建立輸出連接器。
- 在掛載目標設定 LDAP。
附註:
掛載目標無法使用自行簽署的 LDAP 憑證。Windows 中的 Unix 權限
Oracle Cloud Infrastructure File Storage 使用 NFSv3 協定存取。授權使用 Unix 權限執行。
ldp.exe
工具查詢使用者和群組的 RFC2307 屬性,查看 uid、gid 和 group 成員身分。Unix 權限會根據儲存在 LDAP 中的 uid、gid 及群組成員來檢查。Tool: ldp.exe
Search Base: CN=Users,DC=fss-ad,DC=com
Filter: (&(objectClass=posixAccount)(uid=fss-user-1))
Attributes: uidNumber;gidNumber
使用 Windows 檔案總管來查看哪些擁有者和群組擁有檔案或資料夾,以及檔案或資料夾上設定的權限。您可以從檔案或資料夾的屬性存取 NFS 屬性 (Unix 屬性)。
fss-user-1
使用者的主要群組是 500,但是 OCI 檔案儲存會考量使用者作為權限檢查成員的所有群組。使用下列查詢來尋找 fss-user-1
使用者的群組成員。
Tool: ldp.exe
Search Base: CN=Users,DC=fss-ad,DC=com
Filter: (&(objectClass=posixGroup)(memberUid=fss-user-1))' gidNumber
Attributes: gidNumber
建立初始資料夾權限
實作時,請考量資料夾權限。
OCI 檔案儲存根目錄由 uid 0 和 755 (root 的 rwx、root 的 r-x 以及其他的 r-x) 權限所擁有。需要 Root 存取,才能為使用者建立其他資料夾或變更權限。這是管理員工作,可建立和設定符合需求的初始權限。
您可以使用下列其中一種方法來取得對檔案系統的管理存取權:
- 除非對應至 uidNumber 0 和 root 沒有平方,否則所有使用者都是一般使用者。將管理員使用者對應至使用者之 LDAP 屬性中的 uidNumber 0。
- 將具有
SYS
認證的檔案系統匯出至安全的 Linux 工作站。請使用root
使用者來建立及管理權限。