Use setAttribute to change the label, encrypt, decrypt, wrap, unwrap, sign, verify, derive, trusted, destroyable, wrap-with-trusted, wrap-template, and unwrap-template attributes of a key in the HSM.
Prerequisites
Before you begin, ensure that you have:
Started
hsm_mgmt_toolLogged in to the HSM
A user type that is authorized to run this command (see User types)
User types
The following user type can run this command. For a description of each role, see HSM User Permissions Table.
Administrator (CO)
Syntax
Because this command does not have named parameters, you must enter the arguments in the order shown.
setAttribute <key handle> <attribute id>Example
This example disables the decrypt capability of key 6 (with the property constant 261) by setting it to 0.
cloudmgmt>setAttribute 6 261 0
*************************CAUTION********************************
This is a CRITICAL operation, should be done on all nodes in the
cluster. Cav server does NOT synchronize these changes with the
nodes on which this operation is not executed or failed, please
ensure this operation is executed on all nodes in the cluster.
****************************************************************
Do you want to continue(y/n)?y
setAttribute success on server 0(172.16.0.2)This is a critical operation. Run it on every node in the cluster. The server does not synchronize the change to nodes where the operation was not run or failed.
Parameters
| Parameter | Required | Description | Valid values |
|---|---|---|---|
<key handle> | Yes | The handle of the key to modify. To list available keys and their handles, use listAttributes. | No special requirements |
<attribute id> | Yes | The attribute constant of the key attribute to change. To view all attribute constants and their values, use listAttributes. For details on each attribute, see Key Attribute Constants. | See Valid attribute IDs |
Valid attribute IDs
| Constant | Attribute |
|---|---|
| 3 | OBJ_ATTR_LABEL |
| 134 | OBJ_ATTR_TRUSTED |
| 260 | OBJ_ATTR_ENCRYPT |
| 261 | OBJ_ATTR_DECRYPT |
| 262 | OBJ_ATTR_WRAP |
| 263 | OBJ_ATTR_UNWRAP |
| 264 | OBJ_ATTR_SIGN |
| 266 | OBJ_ATTR_VERIFY |
| 268 | OBJ_ATTR_DERIVE |
| 370 | OBJ_ATTR_DESTROYABLE |
| 528 | OBJ_ATTR_WRAP_WITH_TRUSTED |
| 1073742353 | OBJ_ATTR_WRAP_TEMPLATE |
| 1073742354 | OBJ_ATTR_UNWRAP_TEMPLATE |