π§ AWS KMS Symmetric CMK Rotation is not enabled - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml
- Located in: π AWS KMS Symmetric CMK Rotation is not enabled π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS KMS Key | CA10__CaAwsKmsKey__c | 3 | 1 | 1 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:45:00.737561193Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 101 | βοΈ CA10__keySpec__c.delegatedTo(CA10__keySpec__c).isEmpty() | βοΈ null |
π’ | test3 | βοΈ 199 | βοΈ extract('CA10__keySpec__c') != 'SYMMETRIC_DEFAULT' | βοΈ null |
π’ | test4 | βοΈ 299 | βοΈ extract('CA10__rotationEnabled__c') == false | βοΈ null |
π’ | test5 | βοΈ 399 | βοΈ extract('CA10__rotationEnabled__c') == true | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/kms/symmetric-cmk-rotation/policy.yaml | 6F2242A039FA7087F1FCDAF1665BCAB1 |
Open | /ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml | 4EC2BF63083300DF9F5A7101D5C20FA0 |
Open | /ce/ca/aws/kms/symmetric-cmk-rotation/test-data.json | 9050D3738F3334C60BFAA8A9FFCD46E9 |
Open | /types/CA10__CaAwsKmsKey__c/object.extracts.yaml | 0B059DB01E1D6F7518BF61709BB65A29 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/aws/kms/symmetric-cmk-rotation/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsKmsKey__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsKmsKey__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "KMS Key rotation can not be enabled for any asymmetric CMK."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__keySpec__c"
right:
TEXT: "SYMMETRIC_DEFAULT"
- status: "INCOMPLIANT"
currentStateMessage: "AWS KMS Key rotation is disabled."
remediationMessage: "Consider enabling KMS Key rotation."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__rotationEnabled__c"
right:
BOOLEAN: false
- status: "COMPLIANT"
currentStateMessage: "AWS KMS Key rotation is enabled."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__rotationEnabled__c"
right:
BOOLEAN: true
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."