Panther high experimental python
AWS Password Policy Complexity Guidelines
This policy validates that the account password policy enforces the recommended password complexity requirements.
Detection Logic
# if you want to enforce any of the password policies below, leave them commented.
IGNORED = {
# "RequireUppercaseCharacters",
# "RequireLowercaseCharacters",
# "RequireSymbols",
# "RequireNumbers",
}
def policy(resource):
if (
not resource.get("RequireUppercaseCharacters")
and "RequireUppercaseCharacters" not in IGNORED
):
return False
if (
not resource.get("RequireLowercaseCharacters")
and "RequireLowercaseCharacters" not in IGNORED
):
return False
if not resource.get("RequireSymbols") and "RequireSymbols" not in IGNORED:
return False
if not resource.get("RequireNumbers") and "RequireNumbers" not in IGNORED:
return False
if (
not (
resource.get("MinimumPasswordLength") and resource.get("MinimumPasswordLength", 0) >= 14
)
and "MinimumPasswordLength" not in IGNORED
):
return False
return True Field Validations
Loading…
Comments (0)
Loading comments...