--- #This policy is based on ce:ca:aws:s3:bucket-versioning. #We're checking values of the CA10__versioningStatus__c field on the bucket. #Bucket versioning can be in one of three statuses: off, enabled, suspended. #If the status is enabled the object is compliant, if the status is off or suspended # the object is incompliant. If the field is empty, most likely, don't have permissions. inputType: "CA10__CaAwsBucket__c" importExtracts: - file: /types/CA10__CaAwsBucket__c/object.extracts.yaml testData: - file: "test-data.json" conditions: - status: "INCOMPLIANT" currentStateMessage: "Bucket versioning has never been enabled." remediationMessage: "Enable S3 versioning on the bucket." check: IS_EQUAL: left: EXTRACT: "CA10__versioningStatus__c" right: TEXT: "off" - status: "INCOMPLIANT" currentStateMessage: "Bucket versioning has been suspended." remediationMessage: "Reactivate S3 versioning on the bucket." check: IS_EQUAL: left: EXTRACT: "CA10__versioningStatus__c" right: TEXT: "suspended" - status: "COMPLIANT" currentStateMessage: "Bucket versioning is enabled." check: IS_EQUAL: left: EXTRACT: "CA10__versioningStatus__c" right: TEXT: "enabled" otherwise: status: "UNDETERMINED" currentStateMessage: "Unexpected value in the field."