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 klaster Anda. Hanya CU yang menciptakan kunci dan akibatnya memilikinya 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 terpercaya.

Persyaratan

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

Sintaksis

aws-cloudhsm > help key set-attribute Set an attribute for a key in the HSM cluster Usage: cloudhsm-cli key set-attribute [OPTIONS] --filter <KEY_ATTRIBUTES> --name <KEY_ATTRIBUTE> --value <KEY_ATTRIBUTE_VALUE> Options: --filter [<KEY_ATTRIBUTES>...] Space separated list of key attributes in the form of attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE to select a matching key to modify --key-reference <KEY_REFERENCE> A hexadecimal or decimal representation of the key, such as a key handle --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 mengkonfirmasi 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

<KEY_ATTRIBUTE>

Menentukan nama atribut key.

Wajib: Ya

<KEY_ATTRIBUTES>

Menentukan daftar spasi dipisahkan dari atribut kunci dalam bentuk attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE (misalnya,attr.token=true) untuk memilih kunci yang cocok untuk pembuatan file. Satu atau lebih atribut dapat diberikan untuk menyempurnakan kriteria seleksi.

Untuk daftar atribut kunci yang didukung, lihatAtribut kunci untuk CloudHSM CLI.

Wajib: Ya

<KEY_ATTRIBUTE_VALUE>

Menentukan nilai atribut key.

Wajib: Ya

<KEY_REFERENCE>

Sebuah representasi heksadesimal atau desimal kunci. (seperti pegangan kunci).

Wajib: Tidak

Topik terkait