Revoke
Specification
This operation requests the server to revoke a Managed Cryptographic Object or an Opaque Object.
The request contains a reason for the revocation (e.g., "key compromise", "cessation of operation", etc.).
The operation has one of two effects. If the revocation reason is "key compromise" or "CA compromise", then the object is placed into the "compromised" state; the Date is set to the current date and time; and the Compromise Occurrence Date is set to the value (if provided) in the Revoke request and if a value is not provided in the Revoke request then Compromise Occurrence Date SHOULD be set to the Initial Date for the object. If the revocation reason is neither "key compromise" nor "CA compromise", the object is placed into the "deactivated" state, and the Deactivation Date is set to the current date and time.
Implementation
Permission is checked before the object state. If nothing is revoked, the server returns Object_Not_Found.
- A compromise reason moves
Pre-Active,ActiveorDeactivatedobjects toCompromised, andDestroyedobjects toDestroyed Compromised. It sets the Compromise Date and the Compromise Occurrence Date (request value, default Initial Date) and leaves the Deactivation Date alone. - Any other reason moves
Activeobjects toDeactivatedand sets the Deactivation Date. On an object that is alreadyDeactivated,DestroyedorDestroyed Compromisedit succeeds without any change. - Every other case (for example a
Pre-Activeobject) returnsWrong_Key_Lifecycle_State. - A Compromise Occurrence Date with a non-compromise reason returns
Invalid_Field. - Certificate Requests return
Invalid_Object_Type.
The revocation reason is also persisted in the object's attributes (both internal and external), as required by
RFC 5280 ยง5.3.1 to populate the CRLReason extension in generated CRLs.
Example - Symmetric key
Revoking key f54f14a3-5639-4054-8c23-54af891669db with reason key was compromised.
Corresponding KMS CLI command:
ckms sym keys revoke -k f54f14a3-5639-4054-8c23-54af891669db --reason-code key-compromise "key was compromised"
{
"tag": "Revoke",
"type": "Structure",
"value": [
{
"tag": "UniqueIdentifier",
"type": "TextString",
"value": "f54f14a3-5639-4054-8c23-54af891669db"
},
{
"tag": "RevocationReason",
"type": "Structure",
"value": [
{
"tag": "RevocationReasonCode",
"type": "Enumeration",
"value": "KeyCompromise"
},
{
"tag": "RevocationMessage",
"type": "TextString",
"value": "key was compromised"
}
]
}
]
}