All Products
Search
Document Center

Key Management Service:getAttribute

Last Updated:Apr 25, 2025

This topic explains the process of retrieving key attribute values from HSM using the getAttribute function.

Feature description

The getAttribute function is designed to retrieve a key's attributes from HSM, including its type, class, tag, and ID, along with permissible operations such as encryption, decryption, wrapping, signing, and authentication. This command is exclusively available to administrators (CO).

Important

Prior to executing this command, you must initiate the hsm_mgmt_tool, log on to HSM, and verify that the user type is authorized to use the command.

User types

The command can be executed by the following user types. For detailed user descriptions, see HSM user permission table.

  • Administrator (CO)

Syntax

Enter the command following the syntax provided below. For an explanation of the parameters, refer to Parameters.

getAttribute <key handle> <attribute id> [<filename>]
Important

Parameters must be entered in the sequence outlined in the syntax.

Example

The example below demonstrates how to obtain the OBJ_ATTR_EXTRACTABLE attribute value (indicating exportability) of a key with handle 6. For a description of attribute constants, see Key attribute constants.

cloudmgmt>getAttribute 6 354
Attribute Value on server 0(172.16.0.2):
OBJ_ATTR_EXTRACTABLE
0x00000001

Parameters

Parameter name

Description

Required

Valid values

<key handle>

Key handle

Yes

No Special Requirements

<attribute id>

Constant of the key attribute

  • For more attribute descriptions, see Key attribute constants.

  • To view all attribute constants, use the listAttributes command.

Yes

No Special Requirements

[<output file>]

File name to save the output data

Optional

No Special Requirements