---
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."