kunci set-atribut - AWS CloudHSM

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

kunci set-atribut

Gunakan key set-attribute perintah untuk mengatur atribut kunci di AWS CloudHSM cluster Anda. Hanya CU yang membuat kunci dan akibatnya memilikinya yang dapat mengubah atribut kunci.

Untuk daftar atribut kunci yang dapat digunakan di CloudHSM CLI, lihat. Atribut kunci untuk CloudHSM CLI

Jenis pengguna

Jenis pengguna berikut dapat menjalankan perintah ini.

  • Pengguna Crypto (CU) dapat menjalankan perintah ini.

  • Admin dapat mengatur atribut tepercaya.

Persyaratan

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU. Untuk mengatur atribut tepercaya, Anda harus masuk sebagai pengguna admin.

Sintaks

aws-cloudhsm > help key set-attribute Set an attribute for a key in the HSM cluster Usage: cloudhsm-cli key set-attribute [OPTIONS] --filter [<FILTER>...] --name <KEY_ATTRIBUTE> --value <KEY_ATTRIBUTE_VALUE> 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 to modify --name <KEY_ATTRIBUTE> Name of attribute to be set --value <KEY_ATTRIBUTE_VALUE>... Attribute value to be set -h, --help Print help

Contoh: Mengatur atribut kunci

Contoh berikut menunjukkan bagaimana menggunakan key set-attribute perintah untuk mengatur label.

  1. Gunakan kunci dengan labelmy_key, seperti yang ditunjukkan di sini:

    aws-cloudhsm > key set-attribute --filter attr.label=my_key --name encrypt --value false { "error_code": 0, "data": { "message": "Attribute set successfully" } }
  2. Gunakan key list perintah untuk mengonfirmasi bahwa encrypt atribut telah berubah:

    aws-cloudhsm > key list --filter attr.label=my_key --verbose { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x00000000006400ec", "key-info": { "key-owners": [ { "username": "bob", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "my_key", "id": "", "check-value": "0x6bd9f7", "class": "secret-key", "encrypt": false, "decrypt": true, "token": true, "always-sensitive": true, "derive": true, "destroyable": true, "extractable": true, "local": true, "modifiable": true, "never-extractable": false, "private": true, "sensitive": true, "sign": true, "trusted": true, "unwrap": true, "verify": true, "wrap": true, "wrap-with-trusted": false, "key-length-bytes": 32 } } ], "total_key_count": 1, "returned_key_count": 1 } }

Pendapat

<CLUSTER_ID>

ID cluster untuk menjalankan operasi ini pada.

Wajib: Jika beberapa cluster telah dikonfigurasi.

<KEY_ATTRIBUTE>

Menentukan nama atribut kunci.

Wajib: Ya

<FILTER>

Referensi kunci (misalnya,key-reference=0xabc) atau daftar atribut kunci yang dipisahkan spasi dalam bentuk attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE untuk memilih kunci yang cocok untuk dihapus.

Untuk daftar atribut kunci CloudHSM CLI yang didukung, lihat Atribut kunci untuk CloudHSM CLI

Wajib: Tidak

<KEY_ATTRIBUTE_VALUE>

Menentukan nilai atribut kunci.

Wajib: Ya

<KEY_REFERENCE>

Representasi heksadesimal atau desimal dari kunci. (seperti pegangan kunci).

Wajib: Tidak

Topik terkait