π§ AWS EFS File System is not encrypted with KMS CMK - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π AWS EFS File System
- π AWS KMS Key - object.extracts.yaml
- π AWS EFS File System - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-12-27T12:01:55.820499456Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | 001 | βοΈ 199 | βοΈ not(extract('CA10__encrypted__c')) | βοΈ null |
| π’ | 002 | βοΈ 299 | βοΈ isEmptyLookup('CA10__kmsKey__r') | βοΈ null |
| π’ | 003 | βοΈ 399 | βοΈ extract('CA10__kmsKey__r.CA10__manager__c') != 'CUSTOMER' | βοΈ null |
| π’ | 004 | βοΈ 499 | βοΈ extract('CA10__encrypted__c') == true && extract('CA10__kmsKey__r.CA10__manager__c') == 'CUSTOMER' | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/efs/file-system-cmk-encryption/policy.yaml | 9BFD36FB13AFBEDDE37FBE84ECC18E5F |
| Open | /ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml | 2DC6CEC428A05AE9D6E8C769829F2E92 |
| Open | /ce/ca/aws/efs/file-system-cmk-encryption/test-data.json | C2628736D35D3F86B64BA5A93840ADDF |
| Open | /types/CA10__CaAwsKmsKey__c/object.extracts.yaml | EC6D0EFD0BFEAB3447A84529724D4AFE |
| Open | /types/CA10__CaAwsEfsFileSystem__c/object.extracts.yaml | 3C7626729E41425BAD13D04E544D0213 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/efs/file-system-cmk-encryption/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsEfsFileSystem__c"
testData:
- file: test-data.json
importExtracts:
- file: "/types/CA10__CaAwsEfsFileSystem__c/object.extracts.yaml"
- file: "/types/CA10__CaAwsKmsKey__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The EFS File System is not encrypted with any key. This is addressed in the file-system-encryption policy."
check:
NOT:
arg:
EXTRACT: "CA10__encrypted__c"
- status: "INCOMPLIANT"
currentStateMessage: "The EFS File System is not encrypted using KMS key."
remediationMessage: "Enable KMS customer-managed keys encryption for the EFS File System."
check:
IS_EMPTY_LOOKUP: CA10__kmsKey__r
- status: "INCOMPLIANT"
currentStateMessage: "The EFS File System is not encrypted using KMS customer-managed keys."
remediationMessage: "Enable KMS CMK customer-managed keys encryption for the EFS File System."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__kmsKey__r.CA10__manager__c"
right:
TEXT: 'CUSTOMER'
- status: "COMPLIANT"
currentStateMessage: "The EFS File System is encrypted using KMS CMK customer-managed keys."
check:
AND:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10__encrypted__c"
right:
BOOLEAN: true
- IS_EQUAL:
left:
EXTRACT: "CA10__kmsKey__r.CA10__manager__c"
right:
TEXT: 'CUSTOMER'
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the field."