Skip to main content

🧠 AWS Account IAM Password Policy Number of passwords to remember is not set to 24 - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS AccountCA10__CaAwsAccount__c1111

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-05-10T12:01:21.564825498Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒a01βœ”οΈ 199βœ”οΈ CA10__AWS_IAM_Password_Policies__r.has(COMPLIANT)βœ”οΈ null
🟒a02βœ”οΈ 299βœ”οΈ CA10__AWS_IAM_Password_Policies__r.has(INCOMPLIANT)βœ”οΈ null
🟒a03βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/policy.yaml4AFAF14C34C75D62352CCD4DEB2D2C93
Open/ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/prod.logic.yamlB303F7E7E5C72A0BC778CE28095A446B
Open/ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/test-data.json25BB5521D4542C8238D6A3CEDA81A189
Open/types/CA10__CaAwsPasswordPolicy__c/object.extracts.yaml2C1D97EF4F574F9BE1A9C1EB7CAE6A9C

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/account/password-policy-number-of-passwords-to-remember-24/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsAccount__c"
testData:
- file: test-data.json
conditions:
- status: "COMPLIANT"
currentStateMessage: "Number of passwords to remember is set to the max of 24."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_IAM_Password_Policies__r"
status: "COMPLIANT"
- status: "INCOMPLIANT"
currentStateMessage: "Number of passwords to remember should be set to the max of 24."
remediationMessage: "Consider setting the Number of passwords to remember to the max of 24."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_IAM_Password_Policies__r"
status: "INCOMPLIANT"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "AWS Account password policy does not exist."
relatedLists:
- relationshipName: "CA10__AWS_IAM_Password_Policies__r"
importExtracts:
- file: /types/CA10__CaAwsPasswordPolicy__c/object.extracts.yaml
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Password policy does not have 'Number of passwords to remember' set to the max of 24"
remediationMessage: "Set 'Number of passwords to remember' to the max of 24"
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__passwordReusePrevention__c"
right:
NUMBER: 24.0
- status: "COMPLIANT"
currentStateMessage: "Password policy have 'Number of passwords to remember' set to the max of 24"
check:
IS_EQUAL:
left:
EXTRACT: "CA10__passwordReusePrevention__c"
right:
NUMBER: 24.0
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."