キーシェア - AWS CloudHSM

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

キーシェア

key share コマンドは、 AWS CloudHSM クラスター内の他の CUs とキーを共有します。

キーを共有できるのは、キーを作成し、その結果キーを所有する CU のみです。キーを共有しているユーザーは、暗号化オペレーションでキーを使用できますが、キーを削除、エクスポート、共有、または共有解除することはできません。さらに、これらのユーザーは キー属性 を変更できません。

ユーザーのタイプ

このコマンドは、次のタイプのユーザーが実行できます。

  • Crypto User (CU)

要件

このコマンドを実行するには、CU としてログインする必要があります。

Syntax

aws-cloudhsm > help key share Share a key in the HSM cluster with another user Usage: key share --filter [<FILTER>...] --username <USERNAME> --role <ROLE> Options: --cluster-id <CLUSTER_ID> Unique Id to choose which of the clusters in the config file to run the operation against. If not provided, will fall back to the value provided when interactive mode was started, or error --filter [<FILTER>...] Key reference (e.g. key-reference=0xabc) or space separated list of key attributes in the form of attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE to select a matching key for sharing --username <USERNAME> A username with which the key will be shared --role <ROLE> Role the user has in the cluster Possible values: - crypto-user: A CryptoUser has the ability to manage and use keys - admin: An Admin has the ability to manage user accounts -h, --help Print help (see a summary with '-h')

例: キーを別の CU と共有する

以下の例は、key share コマンドを使用して CU alice とキーを共有する方法を示します。

  1. key share コマンドを実行して alice とキーを共有します。

    aws-cloudhsm > key share --filter attr.label="rsa_key_to_share" attr.class=private-key --username alice --role crypto-user { "error_code": 0, "data": { "message": "Key shared successfully" } }
  2. key list コマンドを実行します。

    aws-cloudhsm > key list --filter attr.label="rsa_key_to_share" attr.class=private-key --verbose { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x00000000001c0686", "key-info": { "key-owners": [ { "username": "cu3", "key-coverage": "full" } ], "shared-users": [ { "username": "cu2", "key-coverage": "full" }, { "username": "cu1", "key-coverage": "full" }, { "username": "cu4", "key-coverage": "full" }, { "username": "cu5", "key-coverage": "full" }, { "username": "cu6", "key-coverage": "full" }, { "username": "cu7", "key-coverage": "full" }, { "username": "alice", "key-coverage": "full" } ], "cluster-coverage": "full" }, "attributes": { "key-type": "rsa", "label": "rsa_key_to_share", "id": "", "check-value": "0xae8ff0", "class": "private-key", "encrypt": false, "decrypt": true, "token": true, "always-sensitive": true, "derive": false, "destroyable": true, "extractable": true, "local": true, "modifiable": true, "never-extractable": false, "private": true, "sensitive": true, "sign": true, "trusted": false, "unwrap": true, "verify": false, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 1219, "public-exponent": "0x010001", "modulus": "0xa8855cba933cec0c21a4df0450ec31675c024f3e65b2b215a53d2bda6dcd191f75729150b59b4d86df58254c8f518f7d000cc04d8e958e7502c7c33098e28da4d94378ef34fb57d1cc7e042d9119bd79be0df728421a980a397095157da24cf3cc2b6dab12225d33fdca11f0c6ed1a5127f12488cda9a556814b39b06cd8373ff5d371db2212887853621b8510faa7b0779fbdec447e1f1d19f343acb02b22526487a31f6c704f8f003cb4f7013136f90cc17c2c20e414dc1fc7bcfb392d59c767900319679fc3307388633485657ce2e1a3deab0f985b0747ef4ed339de78147d1985d14fdd8634219321e49e3f5715e79c298f18658504bab04086bfbdcd3b", "modulus-size-bits": 2048 } } ], "total_key_count": 1, "returned_key_count": 1 } }
  3. 上記のリストで、aliceshared-users のリストに含まれている事を検証します

引数

<CLUSTER_ID>

このオペレーションを実行するクラスターの ID。

必須: 複数のクラスターが設定されている場合。

<フィルター>

キーリファレンス (例: key-reference=0xabc) または 形式のキー属性のスペース区切りリストattr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUEを使用して、一致するキーを選択して削除します。

サポートされているキー属性のリストについては、「CloudHSM CLI のキー属性」を参照してください。

必須: はい

<USERNAME>

ユーザーのわかりやすい名前を指定します。最大長は 31 文字です。許可されている唯一の特殊文字はアンダースコア (_) です。このコマンドではユーザー名の大文字と小文字は区別されません。ユーザー名は常に小文字で表示されます。

必須: はい

<ROLE>

このユーザーに割り当てられるロールを指定します。このパラメータは必須です。ユーザーのロールを取得するには、ユーザーリストコマンドを使用します。HSM のユーザータイプの詳細については、「HSM ユーザーを理解する」を参照してください。

必須: はい

関連トピック