daftar kunci - AWS CloudHSM

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

daftar kunci

key listPerintah menemukan semua kunci untuk pengguna saat ini yang ada di AWS CloudHSM cluster Anda. Outputnya mencakup kunci yang dimiliki dan dibagikan pengguna, serta semua kunci publik di klaster CloudHSM.

Jenis pengguna

Jenis pengguna berikut dapat menjalankan perintah ini.

  • Pengguna Crypto (CU)

Sintaks

aws-cloudhsm > help key list List the keys the current user owns, shares, and all public keys in the HSM cluster Usage: key list [OPTIONS] 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 matching key(s) to list --max-items <MAX_ITEMS> The total number of items to return in the command's output. If the total number of items available is more than the value specified, a next-token is provided in the command's output. To resume pagination, provide the next-token value in the starting-token argument of a subsequent command [default: 10] --starting-token <STARTING_TOKEN> A token to specify where to start paginating. This is the next-token from a previously truncated response -v, --verbose If included, prints all attributes and key information for each matched key. By default each matched key only displays its key-reference and label attribute -h, --help Print help

Contoh

Contoh berikut menunjukkan berbagai cara Anda menjalankan key list perintah.

contoh Contoh: Temukan semua kunci - default

Perintah ini mencantumkan kunci pengguna yang masuk yang ada di AWS CloudHSM cluster.

catatan

Secara default, hanya 10 kunci dari pengguna yang saat ini masuk yang ditampilkan, dan hanya key-reference dan label ditampilkan sebagai output. Gunakan opsi pagination yang sesuai untuk menampilkan lebih banyak atau lebih sedikit tombol sebagai output.

aws-cloudhsm > key list { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x00000000000003d5", "attributes": { "label": "test_label_1" } }, { "key-reference": "0x0000000000000626", "attributes": { "label": "test_label_2" } },. ...8 keys later... ], "total_key_count": 56, "returned_key_count": 10, "next_token": "10" } }
contoh Contoh: Temukan semua kunci - bertele-tele

Outputnya mencakup kunci yang dimiliki dan dibagikan pengguna, serta semua kunci publik int HSM.

catatan

Catatan: Secara default, hanya 10 kunci dari pengguna yang sedang masuk yang ditampilkan. Gunakan opsi pagination yang sesuai untuk menampilkan lebih banyak atau lebih sedikit tombol sebagai output.

aws-cloudhsm > key list --verbose { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x000000000012000c", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "session" }, "attributes": { "key-type": "ec", "label": "ec-test-private-key", "id": "", "check-value": "0x2a737d", "class": "private-key", "encrypt": false, "decrypt": false, "token": false, "always-sensitive": true, "derive": false, "destroyable": true, "extractable": true, "local": true, "modifiable": true, "never-extractable": false, "private": true, "sensitive": true, "sign": false, "trusted": false, "unwrap": false, "verify": false, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 122, "ec-point": "0x0442d53274a6c0ec1a23c165dcb9ccdd72c64e98ae1a9594bb5284e752c746280667e11f1e983493c1c605e0a8071ede47ca280f94c6b2aa33", "curve": "secp224r1" } }, { "key-reference": "0x000000000012000d", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "session" }, "attributes": { "key-type": "ec", "label": "ec-test-public-key", "id": "", "check-value": "0x2a737d", "class": "public-key", "encrypt": false, "decrypt": false, "token": false, "always-sensitive": false, "derive": false, "destroyable": true, "extractable": true, "local": true, "modifiable": true, "never-extractable": false, "private": true, "sensitive": false, "sign": false, "trusted": false, "unwrap": false, "verify": false, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 57, "ec-point": "0x0442d53274a6c0ec1a23c165dcb9ccdd72c64e98ae1a9594bb5284e752c746280667e11f1e983493c1c605e0a8071ede47ca280f94c6b2aa33", "curve": "secp224r1" } } ], ...8 keys later... "total_key_count": 1580, "returned_key_count": 10 } }
contoh Contoh: Pengembalian paginasi

Contoh berikut menampilkan subset paginasi tombol yang hanya menampilkan dua tombol. Contoh kemudian memberikan panggilan berikutnya untuk menampilkan dua tombol berikutnya.

aws-cloudhsm > key list --verbose --max-items 2 { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x0000000000000030", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "98a6688d1d964ed7b45b9cec5c4b1909", "id": "", "check-value": "0xb28a46", "class": "secret-key", "encrypt": false, "decrypt": false, "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": false, "verify": true, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 32 } }, { "key-reference": "0x0000000000000042", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "4ad6cdcbc02044e09fa954143efde233", "id": "", "check-value": "0xc98104", "class": "secret-key", "encrypt": true, "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": true, "wrap": true, "wrap-with-trusted": false, "key-length-bytes": 16 } } ], "total_key_count": 1580, "returned_key_count": 2, "next_token": "2" } }

Untuk menampilkan 2 tombol berikutnya, panggilan berikutnya dapat dilakukan:

aws-cloudhsm > key list --verbose --max-items 2 --starting-token 2 { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x0000000000000081", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "6793b8439d044046982e5b895791e47f", "id": "", "check-value": "0x3f986f", "class": "secret-key", "encrypt": false, "decrypt": false, "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": false, "verify": true, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 32 } }, { "key-reference": "0x0000000000000089", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "56b30fa05c6741faab8f606d3b7fe105", "id": "", "check-value": "0xe9201a", "class": "secret-key", "encrypt": false, "decrypt": false, "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": false, "verify": true, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 32 } } ], "total_key_count": 1580, "returned_key_count": 2, "next_token": "4" } }

Untuk contoh lebih lanjut yang menunjukkan cara kerja mekanisme filtrasi kunci di CloudHSM CLI, lihat. Menggunakan CloudHSM CLI untuk memfilter kunci

Pendapat

<CLUSTER_ID>

ID cluster untuk menjalankan operasi ini pada.

Wajib: Jika beberapa cluster telah dikonfigurasi.

<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 daftar.

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

Wajib: Tidak

<MAX_ITEMS>

Jumlah total item yang akan dikembalikan dalam output perintah. Jika jumlah total item yang tersedia lebih dari nilai yang ditentukan, token berikutnya disediakan dalam output perintah. Untuk melanjutkan pagination, berikan nilai next-token dalam argumen starting-token dari perintah berikutnya.

Wajib: Tidak

<STARTING_TOKEN>

Token untuk menentukan di mana harus memulai paginating. Ini adalah token berikutnya dari respons yang sebelumnya terpotong.

Wajib: Tidak

<VERBOSE>

Jika disertakan, mencetak semua atribut dan informasi kunci untuk setiap kunci yang cocok. Secara default setiap kunci yang cocok hanya menampilkan atribut kunci-referensi dan label.

Wajib: Tidak

Topik terkait