| Description |
|---|---|
kmipsrv_obj fetch | Retrieves a list of objects stored on the KMIP server. You can specify the following properties:
|
kmipsrv_obj action uuid | Performs one or more of the following actions on the KMIP server object whose UUID is specified in the command.
|
Getting a List of KMIP Objects
The following command gets the total number of KMIP objects stored on the server:
$ hicli kmipsrv_obj fetch --total_countTotal number of KMIP objects: 10The following command retrieves the details for the first 4 objects:
$ hicli kmipsrv_obj fetch --count=4 --offset=0Object UUID Type State Initial Date Last Change Identification Description----------- ---- ----- ------------ ----------- -------------- -----------bec40e89-e2c9-11e8-9997-000c299ae5eb PublicKey PreActive 2018-11-07T20:14:35+00:00 2018-11-07T20:14:35+00:00 [] Nonebec39ac3-e2c9-11e8-9997-000c299ae5eb PrivateKey PreActive 2018-11-07T20:14:35+00:00 2018-11-07T20:14:35+00:00 [] None997dd60b-e2c9-11e8-9997-000c299ae5eb PublicKey PreActive 2018-11-07T20:13:32+00:00 2018-11-07T20:13:32+00:00 [] None996b5f4c-e2c9-11e8-9997-000c299ae5eb PrivateKey PreActive 2018-11-07T20:13:32+00:00 2018-11-07T20:13:32+00:00 [] NoneThe following command gets only the UUIDs for the first four KMIP objects:
$ hicli kmipsrv_obj fetch --count=4 --offset=0 --noattrbec40e89-e2c9-11e8-9997-000c299ae5ebbec39ac3-e2c9-11e8-9997-000c299ae5eb997dd60b-e2c9-11e8-9997-000c299ae5eb996b5f4c-e2c9-11e8-9997-000c299ae5ebThe following command gets a specific KMIP object. Note that even though the --noattr option is specified, it is ignored by hicli.
$ hicli kmipsrv_obj fetch --uuid=997dd60b-e2c9-11e8-9997-000c299ae5eb --noattrCryptographicUsageMask : Encrypt VerifyInitialDate : 2018-11-07T20:13:32+00:00State : PreActiveCryptographicAlgorithm : RSALastChangeDate : 2018-11-07T20:13:32+00:00CryptographicLength : 4096ObjectType : PublicKeyManaging KMIP Objects
You can use the following command to manage any KMIP object on the server using that object's UUID:
hicli kmipsrv_obj action <uuid> [--operation=<activate|archive|destroy|recover|revoke>] [--revcode=<revoke_code>] [--revmsg=<revoke_message>] [--desc=<description>]You can perform the following operations on a KMIP server object:
activate—By default, objects are created in PreActive state. Specifyactivateto enable more transitions for the object. Note: Many KMIP clients change objects to Active state as part of the creation process.archive—Objects will no longer return keys but they remain in the system. You can use therecoveroperation to return an archived object to active state and retrieve its keys.destroy—This operation permanently removes the object. Destroyed objects cannot be retrieved.recover—Restores an Archived object to the active state so that its keys can be retrieved.revoke—Revocation is permanent. Objects that are revoked cannot be moved back to Active, but the client can still retrieve any key material. You can also specify a revocation reason, which can be any string, and a numeric Reason Code, which is one of the following KMIP standard codes. If you omit the reason code or use a non-standard code, it will be considered the same as "1—Unspecified."1—Unspecified
2—Key Compromise
3—CA Compromise
4—Affiliation Changed
5—Superseded
6—Cessation of Operation
7—Privilege Withdrawn
The following command activates a KMIP object:
$ hicli kmipsrv_obj action cd9e4370-e2cb-11e8-bdab-00505685b461 --operation=activatesuccessThe following commands archive and then restore a KMIP object, fetching the details after each action to make sure the state was correctly changed. After you restore an object, the ArchiveDate is retained, but the Archived flag is no longer set.
$ hicli kmipsrv_obj action cd9e4370-e2cb-11e8-bdab-00505685b461 --operation=archivesuccess$ hicli kmipsrv_obj fetch uuid=cd9e4370-e2cb-11e8-bdab-00505685b461Archived : 1CryptographicUsageMask : Decrypt SignInitialDate : 2018-11-07T20:29:19+00:00State : ActiveActivationDate : 2018-11-09T20:22:18+00:00ArchiveDate : 2018-11-09T20:27:05+00:00CryptographicAlgorithm : RSALastChangeDate : 2018-11-09T20:27:05+00:00CryptographicLength : 4096ObjectType : PrivateKey$ hicli kmipsrv_obj action cd9e4370-e2cb-11e8-bdab-00505685b461 --operation=restoresuccess$ hicli kmipsrv_obj fetch uuid=cd9e4370-e2cb-11e8-bdab-00505685b461CryptographicUsageMask : Decrypt SignInitialDate : 2018-11-07T20:29:19+00:00State : ActiveActivationDate : 2018-11-09T20:22:18+00:00ArchiveDate : 2018-11-09T20:27:05+00:00CryptographicAlgorithm : RSALastChangeDate : 2018-11-09T20:27:05+00:00CryptographicLength : 4096ObjectType : PrivateKeyThe following command revokes a KMIP object for the revocation reason "This key has been replaced with a new key":
$ hicli kmipsrv_obj action cd9e4370-e2cb-11e8-bdab-00505685b461 --operation=revoke --revcode=5 --revmsg='This key has been replaced with a new key'success$ hicli kmipsrv_obj fetch uuid=cd9e4370-e2cb-11e8-bdab-00505685b461ActivationDate : 2018-11-09T20:22:18+00:00RevocationReasonCode : SupercededCryptographicUsageMask : Decrypt SignInitialDate : 2018-11-07T20:29:19+00:00DeactivationDate : 2018-11-09T20:31:24+00:00RevocationMessage : This key has been replaced with a new keyState : DeactivatedCryptographicAlgorithm : RSALastChangeDate : 2018-11-09T20:31:24+00:00CryptographicLength : 4096ObjectType : PrivateKey