π§ AWS Account Root User MFA is not enabled. - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/iam/root-user-mfa/prod.logic.yaml
- Located in: π AWS Account Root User MFA 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 IAM User | CA10__CaAwsUser__c | 13 | 2 | 8 |
Usesβ
- π AWS IAM User - object.extracts.yaml
- π AWS IAM User - credReport.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-04-24T23:44:58.336496355Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | a0 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | a01 | βοΈ 199 | βοΈ extract('CA10__userName__c') != 'root' | βοΈ null |
π’ | a02 | βοΈ 299 | βοΈ extract('CA10__credReportMfaActive__c') == true | βοΈ null |
π’ | a03 | βοΈ 399 | βοΈ extract('CA10__credReportPasswordEnabled__c') != true | βοΈ null |
π’ | a04 | βοΈ 399 | βοΈ extract('CA10__credReportPasswordEnabled__c') != true | βοΈ null |
π’ | a05 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/iam/root-user-mfa/policy.yaml | 633EF93BE55352C49752A27E82AC0770 |
Open | /ce/ca/aws/iam/root-user-mfa/prod.logic.yaml | D543092754223B4C6F6E7D5A9B76D344 |
Open | /ce/ca/aws/iam/root-user-mfa/test-data.json | FB9550FA93296F834FD234D624FF47E6 |
Open | /types/CA10__CaAwsUser__c/object.extracts.yaml | 2D04C00E6C59E96198CA5A6E62D0A180 |
Open | /types/CA10__CaAwsUser__c/credReport.extracts.yaml | 8152C61E7FBD5E63E054E986AF83B52F |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/aws/iam/root-user-mfa/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/iam/root-user-mfa/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/iam/root-user-mfa/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/iam/root-user-mfa/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/aws/iam/root-user-mfa/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsUser__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaAwsUser__c/credReport.extracts.yaml
- file: /types/CA10__CaAwsUser__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "Requirements of this policy are applicable only to root users."
check:
NOT_EQUAL:
left:
EXTRACT: CA10__userName__c
right:
TEXT: "root"
- status: "COMPLIANT"
currentStateMessage: "The root user has MFA enabled."
check:
IS_EQUAL:
left:
EXTRACT: CA10__credReportMfaActive__c
right:
BOOLEAN: true
- status: "COMPLIANT"
currentStateMessage: "The root user doesn't have credentials."
check:
NOT_EQUAL:
left:
EXTRACT: CA10__credReportPasswordEnabled__c
right:
BOOLEAN: true
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The root user does not have MFA enabled."
remediationMessage: "Consider enabling MFA for the root user."