Skip to main content

🧠 AWS IAM User MFA is not enabled for all users with console password - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS IAM UserCA10__CaAwsUser__c1328

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:44:54.724417312Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒a01βœ”οΈ 199βœ”οΈ extract('CA10__credReportPasswordEnabled__c') == falseβœ”οΈ null
🟒a02βœ”οΈ 299βœ”οΈ extract('CA10__credReportMfaActive__c') == trueβœ”οΈ null
🟒a03βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/iam/mfa-for-all-users-with-console-password/policy.yaml59CDC590307F7F6AE38F7EC92B6A3842
Open/ce/ca/aws/iam/mfa-for-all-users-with-console-password/prod.logic.yaml0473B03762E2E386DE1566135F63D54D
Open/ce/ca/aws/iam/mfa-for-all-users-with-console-password/test-data.jsonFE4732CF485128BFD19FB1E55F768E68
Open/types/CA10__CaAwsUser__c/credReport.extracts.yaml8152C61E7FBD5E63E054E986AF83B52F

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/iam/mfa-for-all-users-with-console-password/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/iam/mfa-for-all-users-with-console-password/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/iam/mfa-for-all-users-with-console-password/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/iam/mfa-for-all-users-with-console-password/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/iam/mfa-for-all-users-with-console-password/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsUser__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaAwsUser__c/credReport.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "Requirements of this policy are applicable only to users\
\ with enabled console password"
check:
IS_EQUAL:
left:
EXTRACT: CA10__credReportPasswordEnabled__c
right:
BOOLEAN: false
- status: "COMPLIANT"
currentStateMessage: "MFA Enabled for this user"
check:
IS_EQUAL:
left:
EXTRACT: CA10__credReportMfaActive__c
right:
BOOLEAN: true
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "MFA is not enabled for this user"
remediationMessage: "Enable MFA for this user or disable the console access"