This rule ensures KMS keys are not left in a pending deletion state to maintain security.
Rule | KMS keys should not be pending deletion |
Framework | RBI Cyber Security Framework |
Severity | ✔ High |
Rule Description
According to the RBI (Reserve Bank of India) Cyber Security Framework, it is specified that KMS (Key Management Service) keys should not be in a "pending deletion" state. This rule ensures the security and integrity of cryptographic keys used for data protection and confidentiality.
When a KMS key is in the "pending deletion" state, it means that it has been scheduled for permanent deletion but hasn't been completely removed yet. This can pose a security risk as it leaves the key susceptible to unauthorized access or misuse during this transitional phase.
Troubleshooting Steps
If you find that a KMS key is in the "pending deletion" state, follow the troubleshooting steps below to resolve the issue:
Identify the affected KMS key: Use the KMS management console or command-line interface to locate the specific key that is in the "pending deletion" state.
Verify if the key is still needed: Check if the key is still required for any ongoing operations or systems. If the key is no longer necessary, it is recommended to proceed with the deletion process. Otherwise, ensure proper migration or rekeying is performed before proceeding.
Check for pending actions: Review the key's history and any pending actions related to the key. Resolve any outstanding tasks before attempting to resolve the "pending deletion" status.
Cancel deletion request: If the key is still required and the deletion process was initiated by mistake, cancel the deletion request to retain the key. This can be done through the KMS management console or by using appropriate API/CLI commands.
Monitor key state: After canceling the deletion request, monitor the key's state to ensure it transitions out of the "pending deletion" status and returns to an active state.
Necessary Codes
Cancel Deletion Request (AWS CLI)
aws kms cancel-key-deletion --key-id <key-id>
Replace
<key-id>
with the actual identifier of the pending deletion key.Remediation Steps
Follow the step-by-step guide below to remediate the issue and ensure compliance with the RBI Cyber Security Framework:
Log in to the AWS Management Console or use the AWS CLI with appropriate credentials.
Open the KMS management console.
Select "Customer managed keys" from the left-hand menu.
Identify the KMS key(s) that are in the "pending deletion" state.
Determine if the key is still required:
Cancel the deletion request:
aws kms cancel-key-deletion --key-id <key-id>
, replacing <key-id>
with the identifier of the pending deletion key.Monitor the key's state:
Follow any additional organization-specific procedures or best practices related to KMS key management and secure key handling.
By following these step-by-step remediation guidelines, you can ensure that KMS keys are not in a "pending deletion" state, thereby complying with the RBI Cyber Security Framework.