メインコンテンツへスキップ

REST API を使用してスナップショットをリストアするために、SVM レベルのアクセス権限なしでユーザーを作成できますか

Views:
3
Visibility:
Public
Votes:
0
Category:
not set
Specialty:
not set
Last Updated:

環境

  • ONTAP 9.x(REST APIをサポートするすべての9.xバージョン)
  • ONTAP REST APIロールベースアクセス制御(RBAC)
  • SnapRestore
  • AFF / FAS / ASA / MetroCluster

回答

  • いいえ — ONTAP RBAC はボリュームごとの制限をサポートしていません。カスタム REST ロールを所有できる最小のスコープはストレージ VM(SVM / Vserver)であり、個々のボリュームではありません。
  • SVM スコープで作成された REST ロール(POST /api/security/rolesowner.uuidを SVM UUID に設定するか、owner.nameを SVM 名に設定)は、自動的にその SVM のリソースに制限されます。ロールの保持者は、他の SVM を閲覧したり操作したりすることはできません。
  • その SVM スコープのロール内では、個々の API エンドポイントに対して HTTP メソッド(GET / POST / PATCH / DELETE)によってアクセスをさらに制限できます。たとえば、スナップショット復元エンドポイントのみを付与することで、ロールは復元を実行できますが、ボリュームの作成や削除はできません。ただし、「このロールはvolume_Aに対してのみ操作できるが、同じ SVM 内のvolume_Bに対しては操作できない」と指定する組み込みの方法はありません。ONTAP RBAC はパスとメソッドに基づいており、リソースインスタンスごとではありません。

パートナーノート

partnerNotes_text

追加情報

  • ONTAP REST API — はじめに(認証とRBACの概要)
  • 管理者認証とRBACの管理(ONTAP)
  • スナップショット復元RESTエンドポイント参照(POST /api/storage/volumes/{volume.uuid}/snapshots/{snapshot.uuid}/restore
  • CLIリファレンス:security login rest-role create

内部情報

回避策—保護境界ごとに1つのSVM。

ボリュームごとの分離が必須要件である場合は、独立した管理が必要なボリュームを別々のSVMに配置し、SVMスコープのRESTロールを1つ作成し、SVMごとにユーザーを1つ作成します。各ユーザーは、自身のSVMに属するボリュームのスナップショットのみを復元できます。

例:ボリューム上でスナップショットのリストアのみを許可するSVMスコープのRESTロール

  • クラスター上で以下のコマンドを実行します(CLI):

security login rest-role create -vserver [svm_name] -role snap_restore_only \
  -api /api/storage/volumes -access read \
  -api /api/storage/volumes/* -access read \
  -api /api/storage/volumes/*/snapshots -access read \
  -api /api/storage/volumes/*/snapshots/*/restore -access all

security login create -vserver [svm_name] -user-or-group-name svc_snap_restore \
  -application http -authentication-method password -role snap_restore_only

  • ロールを作成するための同等のREST API呼び出し:

POST /api/security/roles
{
  "name": "snap_restore_only",
  "owner": { "name": "[svm_name]" },
  "privileges": [
    { "path": "/api/storage/volumes", "access": "read" },
    { "path": "/api/storage/volumes/*/snapshots", "access": "read" },
    { "path": "/api/storage/volumes/*/snapshots/*/restore", "access": "all" }
  ]
}

  • スナップショットからボリュームを復元する(制限付きユーザーによる呼び出し):

POST /api/storage/volumes/{volume.uuid}/snapshots/{snapshot.uuid}/restore

  • サポートされている粒度の概要:
  • クラスタごとのロール—クラスタが所有し、任意のSVMに対して操作を実行できます。クラスタ全体の管理者のみが使用してください。
  • SVMごとのロール—単一のSVMによって所有されており、他のSVMを見ることはできません。これは、サポートされている最小の隔離境界です。
  • ロール内のAPIパスごとの制限—許可されています。SVMスコープと組み合わせて、ユーザーがそのSVM内で実行できる操作を絞り込むことができます。
  • ボリュームごとの制限—サポートされていません。

  • ソースケース:2010716930(Computacenter / Mercedes-Benz サポートチーム、P3、AFF-A900、ONTAP 9.16.1P7 MCC-FC)。お客様は、REST API経由でのSnapshotリストアにおいて、ボリュームごとのRBACが可能かどうかを質問しました。回答:いいえ — 粒度はSVMです。SVMスコープのロール内では、APIパス+メソッドによって制限できます。お客様がボリュームごとの真の分離を求める場合は、それらのボリュームを異なるSVMに分けることを推奨します。
  • バグ/PRは関係ありません — 純粋な機能に関する問い合わせです。
NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.
  • この記事は役に立ちましたか?