Skip to main content
ONTAP tools for VMware vSphere 10
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

設定 ONTAP 使用者角色和權限

貢獻者 netapp-jani dmp-netapp

您可以使用適用於 VMware vSphere 和 ONTAP System Manager 的 ONTAP 工具隨附的 JSON 檔案、設定新的使用者角色和權限來管理儲存後端。

開始之前
  • 您應該已使用下列方法從適用於 VMware vSphere 的 ONTAP 工具下載 ONTAP Privileges 檔案: https : <ONTAPtoolsIP> : 8443/virtualization / 使用者權限 /users_roles.zip 。

  • 您應該已使用從 ONTAP 工具下載 ONTAP Privileges 檔案 https://<ONTAPtoolsIP>:8443/virtualization/user-privileges/users_roles.zip

    註 您可以在叢集或直接在儲存虛擬機器( SVM )層級建立使用者。您也可以在不使用 user_roles.json 檔案的情況下建立使用者、如果是這樣做、您必須在 SVM 層級擁有一組最低權限。
  • 您應該已以儲存後端的系統管理員權限登入。

步驟
  1. 擷取下載的 \https : <ONTAPtoolsIP> : 8443/virtualization / 使用者權限 /users_roles.zip 檔案。

  2. 使用叢集的叢集管理 IP 位址存取 ONTAP 系統管理員。

  3. 使用 admin Privileges 登入叢集。若要設定使用者,請執行下列步驟:

    1. 若要設定叢集 ONTAP 工具使用者,請選取 * 叢集 * > * 設定 * > * 使用者與角色 * 窗格。

    2. 若要設定 SVM ONTAP 工具使用者,請選取 * 儲存 SVM* > * 設定 * > * 使用者與角色 * 窗格。

    3. 在「使用者」下選取 * 「新增 * 」。

    4. 在「新增使用者」對話方塊中、選取*虛擬化產品*。

    5. * 瀏覽 * 以選取並上傳 ONTAP Privileges JSON 檔案。

      產品欄位會自動填入。

    6. 從下拉式選單中選擇產品功能為*VSC、VASA Provider 和 SRA*。

      根據所選的產品功能、 * 角色 * 欄位會自動填入。

    7. 輸入所需的使用者名稱和密碼。

    8. 選取使用者所需的 Privileges (探索,建立儲存設備,修改儲存設備,銷毀儲存設備, NAS/SAN 角色),然後選取 * 新增 * 。

新角色和使用者即會新增、您可以在已設定的角色下看到詳細權限。

SVM Aggregate 對應需求

若要使用 SVM 使用者認證來配置資料存放區、 VMware vSphere 的內部 ONTAP 工具會在 API 後的資料存放區中指定的集合上建立磁碟區。ONTAP 不允許使用 SVM 使用者認證、在 SVM 上的未對應集合體上建立磁碟區。若要解決此問題、您需要使用 ONTAP REST API 或 CLI 將 SVM 對應至集合體、如此處所述。

REST API :

PATCH "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" '{"aggregates":{"name":["aggr1","aggr2","aggr3"]}}'

ONTAP CLI :

sti115_vsim_ucs630f_aggr1 vserver show-aggregates                                        AvailableVserver        Aggregate      State         Size Type    SnapLock Type-------------- -------------- ------- ---------- ------- --------------svm_test       sti115_vsim_ucs630f_aggr1                               online     10.11GB vmdisk  non-snaplock

手動建立 ONTAP 使用者和角色

請依照本節的指示手動建立使用者和角色、而不使用 JSON 檔案。

  1. 使用叢集的叢集管理 IP 位址存取 ONTAP 系統管理員。

  2. 使用 admin Privileges 登入叢集。

    1. 若要設定叢集 ONTAP 工具角色,請選取 * 叢集 * > * 設定 * > * 使用者與角色 * 窗格。

    2. 若要設定叢集 SVM ONTAP 工具角色,請選取 * 儲存 SVM* > * 設定 * > * 使用者與角色 * 窗格

  3. 建立角色:

    1. 在 * 角色 * 表下選擇 * 新增 * 。

    2. 輸入 * 角色名稱 * 和 * 角色屬性 * 詳細資料。

      從下拉式清單中新增 REST API Path 及其各自的存取權限。

    3. 新增所有必要的 API 並儲存變更。

  4. 建立使用者:

    1. 在 * 使用者 * 表格下選取 * 新增 * 。

    2. 在 * 新增使用者 * 對話方塊中、選取 * 系統管理員 * 。

    3. 輸入 * 使用者名稱 * 。

    4. 從上述 * 建立角色 * 步驟中建立的選項中選取 * 角色 * 。

    5. 輸入要授予存取權的應用程式、以及驗證方法。ONTAPI 和 HTTP 是必要的應用程式、驗證類型為 * 密碼 * 。

    6. 設定「使用者 * 」的 * 密碼和「 * 儲存 * 」使用者。

非管理員全域範圍叢集使用者所需的最低權限清單

本節列出了未使用使用者 JSON 檔案建立的非管理員全域範圍叢集使用者所需的最低權限。如果在本機範圍內新增了集群,建議使用 JSON 檔案建立用戶,因為適用ONTAP tools for VMware vSphere需要的不僅僅是在ONTAP上進行配置的讀取權限。

使用 API :

API

存取層級

用於

/API/cluster

唯讀

叢集組態探索

/api/cluster / 授權 / 授權

唯讀

授權檢查特定傳輸協定的授權

/api/cluster / 節點

唯讀

平台類型探索

/API/SECSecurity /帳戶

唯讀

權限探索

/API/SECSecurity /角色

唯讀

權限探索

/api/storage / Aggregate

唯讀

資料存放區 / Volume 資源配置期間的集合空間檢查

/api/storage / 叢集

唯讀

取得叢集層級空間與效率資料

/api/storage / 磁碟

唯讀

取得集合體中的相關磁碟

/API/儲存 設備 /QoS/ 原則

讀取 / 建立 / 修改

QoS 和 VM 原則管理

/API/SVM/svms

唯讀

在本機新增叢集的情況下取得 SVM 組態。

/api/network/IP/ 介面

唯讀

Add Storage Backend (新增儲存後端):識別管理 LIF 範圍為叢集 / SVM

/API/儲存 設備 / 可用性區域

唯讀

Saz 探索。適用於 ONTAP 9.16.1 版及 ASA R2 系統。

為 VMware vSphere ONTAP API 型叢集範圍使用者建立 ONTAP 工具

註 您需要探索,建立,修改及銷毀 Privileges ,才能在資料存放區發生故障時執行修補作業及自動復原。如果這些 Privileges 全都缺乏,就會導致工作流程中斷和清理問題。

建立 ONTAP 工具,讓以 VMware vSphere ONTAP API 為基礎的使用者能夠探索,建立儲存設備,修改儲存設備,銷毀儲存 Privileges ,以啟動探索並管理 ONTAP 工具工作流程。

若要建立具有上述所有 Privileges 的叢集範圍使用者,請執行下列命令:

security login rest-role create -role <role-name> -api /api/application/consistency-groups -access all

security login rest-role create -role <role-name> -api /api/private/cli/snapmirror -access all

security login rest-role create -role <role-name> -api /api/protocols/nfs/export-policies -access all

security login rest-role create -role <role-name> -api /api/protocols/nvme/subsystem-maps -access all

security login rest-role create -role <role-name> -api /api/protocols/nvme/subsystems -access all

security login rest-role create -role <role-name> -api /api/protocols/san/igroups -access all

security login rest-role create -role <role-name> -api /api/protocols/san/lun-maps -access all

security login rest-role create -role <role-name> -api /api/protocols/san/vvol-bindings -access all

security login rest-role create -role <role-name> -api /api/snapmirror/relationships -access all

security login rest-role create -role <role-name> -api /api/storage/volumes -access all

security login rest-role create -role <role-name> -api "/api/storage/volumes/*/snapshots" -access all

security login rest-role create -role <role-name> -api /api/storage/luns -access all

security login rest-role create -role <role-name> -api /api/storage/namespaces -access all

security login rest-role create -role <role-name> -api /api/storage/qos/policies -access all

security login rest-role create -role <role-name> -api /api/cluster/schedules -access read_create

security login rest-role create -role <role-name> -api /api/snapmirror/policies -access read_create

security login rest-role create -role <role-name> -api /api/storage/file/clone -access read_create

security login rest-role create -role <role-name> -api /api/storage/file/copy -access read_create

security login rest-role create -role <role-name> -api /api/support/ems/application-logs -access read_create

security login rest-role create -role <role-name> -api /api/protocols/nfs/services -access read_modify

security login rest-role create -role <role-name> -api /api/cluster -access readonly

security login rest-role create -role <role-name> -api /api/cluster/jobs -access readonly

security login rest-role create -role <role-name> -api /api/cluster/licensing/licenses -access readonly

security login rest-role create -role <role-name> -api /api/cluster/nodes -access readonly

security login rest-role create -role <role-name> -api /api/cluster/peers -access readonly

security login rest-role create -role <role-name> -api /api/name-services/name-mappings -access readonly

security login rest-role create -role <role-name> -api /api/network/ethernet/ports -access readonly

security login rest-role create -role <role-name> -api /api/network/fc/interfaces -access readonly

security login rest-role create -role <role-name> -api /api/network/fc/logins -access readonly

security login rest-role create -role <role-name> -api /api/network/fc/ports -access readonly

security login rest-role create -role <role-name> -api /api/network/ip/interfaces -access readonly

security login rest-role create -role <role-name> -api /api/protocols/nfs/kerberos/interfaces -access readonly

security login rest-role create -role <role-name> -api /api/protocols/nvme/interfaces -access readonly

security login rest-role create -role <role-name> -api /api/protocols/san/fcp/services -access readonly

security login rest-role create -role <role-name> -api /api/protocols/san/iscsi/services -access readonly

security login rest-role create -role <role-name> -api /api/security/accounts -access readonly

security login rest-role create -role <role-name> -api /api/security/roles -access readonly

security login rest-role create -role <role-name> -api /api/storage/aggregates -access readonly

security login rest-role create -role <role-name> -api /api/storage/cluster -access readonly

security login rest-role create -role <role-name> -api /api/storage/disks -access readonly

security login rest-role create -role <role-name> -api /api/storage/qtrees -access readonly

security login rest-role create -role <role-name> -api /api/storage/quota/reports -access readonly

security login rest-role create -role <role-name> -api /api/storage/snapshot-policies -access readonly

security login rest-role create -role <role-name> -api /api/svm/peers -access readonly

security login rest-role create -role <role-name> -api /api/svm/svms -access readonly

此外,對於 ONTAP 9.16.0 版及更新版本,請執行下列命令:

security login rest-role create -role <role-name> -api /api/storage/storage-units -access all

對於 ONTAP 9.16.1 版及更新版本上的 ASA R2 系統,請執行下列命令:

security login rest-role create -role <role-name> -api /api/storage/availability-zones -access readonly

為以 VMware vSphere ONTAP API 為基礎的 SVM 範圍使用者建立 ONTAP 工具

若要使用所有 Privileges 建立 SVM 範圍的使用者,請執行下列命令:

security login rest-role create -role <role-name> -api /api/application/consistency-groups -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/private/cli/snapmirror -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/nfs/export-policies -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/nvme/subsystem-maps -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/nvme/subsystems -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/san/igroups -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/san/lun-maps -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/san/vvol-bindings -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/snapmirror/relationships -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/volumes -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api "/api/storage/volumes/*/snapshots" -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/luns -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/namespaces -access all -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/cluster/schedules -access read_create -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/snapmirror/policies -access read_create -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/file/clone -access read_create -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/file/copy -access read_create -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/support/ems/application-logs -access read_create -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/nfs/services -access read_modify -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/cluster -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/cluster/jobs -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/cluster/peers -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/name-services/name-mappings -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/network/ethernet/ports -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/network/fc/interfaces -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/network/fc/logins -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/network/ip/interfaces -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/nfs/kerberos/interfaces -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/nvme/interfaces -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/san/fcp/services -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/protocols/san/iscsi/services -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/security/accounts -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/security/roles -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/qtrees -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/quota/reports -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/storage/snapshot-policies -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/svm/peers -access readonly -vserver <vserver-name>

security login rest-role create -role <role-name> -api /api/svm/svms -access readonly -vserver <vserver-name>

此外,對於 ONTAP 9.16.0 版及更新版本,請執行下列命令:

security login rest-role create -role <role-name> -api /api/storage/storage-units -access all -vserver <vserver-name>

若要使用上述建立的 API 型角色建立新的 API 型使用者,請執行下列命令:

security login create -user-or-group-name <user-name> -application http -authentication-method password -role <role-name> -vserver <cluster-or-vserver-name>

範例:

security login create -user-or-group-name testvpsraall -application http -authentication-method password -role OTV_10_VP_SRA_Discovery_Create_Modify_Destroy -vserver C1_sti160-cluster_

若要解除鎖定帳戶,若要啟用對管理介面的存取,請執行下列命令:

security login unlock -user <user-name> -vserver <cluster-or-vserver-name>

範例:

security login unlock -username testvpsraall -vserver C1_sti160-cluster

將適用於 VMware vSphere 10.1 使用者的 ONTAP 工具升級為 10.3 使用者

對於使用 JSON 檔案建立叢集範圍使用者的 VMware vSphere 10.1 使用者適用的 ONTAP 工具,請搭配使用者管理 Privileges 使用下列 ONTAP CLI 命令,以升級至 10.3 版本。

如需產品功能:

  • VSC

  • VSC 和 VASA Provider

  • VSC 和 SRA

  • VSC 、 VASA Provider 和 SRA 。

叢集 Privileges :

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe namespace show" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem show" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem host show" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem map show" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe show-interface" -access read

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem host add " -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem map add" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe 命名空間刪除 " -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem delete" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem host remove" -access all

security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem map remove" -access all

對於使用 json 檔案建立 SVM 範圍使用者的 VMware vSphere 10.1 ONTAP 工具,請使用 ONTAP CLI 命令搭配管理使用者 Privileges ,以升級至 10.3 版本。

SVM Privileges :

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe namespace show" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem show" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem host show" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem map show" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe show-interface" -access read -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem host add " -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem map add" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe 命名空間刪除 " -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem delete" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem host remove" -access all -vserver <vserver-name> _

_security 登入角色 create -role <existing-role-name> -cmddirname "vserver NVMe subsystem map remove" -access all -vserver <vserver-name> _

將命令 vserver NVMe 命名空間 showvserver NVMe 子系統 show 新增至現有角色、會新增下列命令。

vserver nvme namespace create

vserver nvme namespace modify

vserver nvme subsystem create

vserver nvme subsystem modify

將適用於 VMware vSphere 10.3 使用者的 ONTAP 工具升級為 10.4 使用者

從 ONTAP 9.16.1 開始,將適用於 VMware vSphere 10.3 使用者的 ONTAP 工具升級至 10.4 使用者。

對於使用 JSON 檔案和 ONTAP 9.16.1 版或更新版本建立叢集範圍使用者的 VMware vSphere 10.3 使用者適用的 ONTAP 工具,請使用 ONTAP CLI 命令搭配管理使用者 Privileges 升級至 10.4 版。

如需產品功能:

  • VSC

  • VSC 和 VASA Provider

  • VSC 和 SRA

  • VSC 、 VASA Provider 和 SRA 。

叢集 Privileges :

security login role create -role <existing-role-name> -cmddirname "storage availability-zone show" -access all