Use findAllKeys to list all exclusive and shared keys associated with a cryptographic user (CU) on an HSM. Only administrators (CO) and audit users (AU) can run this command.
Start hsm_mgmt_tool and log in to the HSM with an authorized user type before running this command.
Prerequisites
Before you begin, ensure that you have:
Started
hsm_mgmt_tooland logged in as an administrator (CO) or audit user (AU)The user ID of the CU whose keys you want to list (run listUsers if you don't have it)
User types
The following user types can run this command. For details, see HSM user permissions table.
Administrator (CO)
Audit user (AU)
Cryptographic users (CU) cannot runfindAllKeys. Note thatfindAllKeysreturns only the public keys owned by the current CU, whereas findKey inkey_mgmt_toolretrieves all public keys, including those not owned by the current CU. A CU can get equivalent information by:
Running listUsers to identify all users
Running findKey in hsm_mgmt_tool to locate usable keysRunning getKeyInfo in hsm_mgmt_tool to determine key ownership and sharingSyntax
findAllKeys <user id> <key hash (0/1)> [<output file>]Enter parameters in the order shown in the syntax.
In the output, exclusive keys are marked with (o) and shared keys with (s).
Parameters
| Parameter | Description | Required | Valid values |
|---|---|---|---|
<user id> | The user ID for finding keys. | Yes | No special requirements |
<key hash (0/1)> | Whether to hide the key hash value. | Yes | 0: Hide; 1: Show |
[<output file>] | The name of the file to save the output to. | Optional | Any valid file name |
Examples
List keys for a user (hash hidden)
This example lists exclusive and shared keys for user 3, with the key hash hidden.
cloudmgmt>findAllKeys 3 0
Keys on server 0(172.16.0.2):
Number of keys found 1
number of keys matched from start index 0::1
6(o)
findAllKeys success on server 0(172.16.0.2)Output explanation:
Number of keys found 1— one key is associated with user 3number of keys matched from start index 0::1— one key matched, starting from index 06(o)— key with handle 6, marked (o) to indicate it is exclusively owned by user 3
What's next
findKey — search for keys by attribute in
key_mgmt_toollistUsers — list all users on the HSM
getKeyInfo — get ownership and sharing details for a specific key