Skip to main content

๐Ÿง  Google IAM Policy Binding Member (User) is assigned a basic role - prod.logic.yaml๐ŸŸข

Usesโ€‹

Test Results ๐ŸŸขโ€‹

Generated at: 2025-10-25T12:02:47.596353497Z Open

ResultIdCondition IndexCondition TextRuntime Error
๐ŸŸข001โœ”๏ธ 199โœ”๏ธ CA10G1__Google_IAM_Policy_Bindings__r.has(INCOMPLIANT)โœ”๏ธ null
๐ŸŸข002โœ”๏ธ 200โœ”๏ธ otherwiseโœ”๏ธ null

Generation Bundleโ€‹

FileMD5
Open/ce/ca/google/iam/user-assigned-basic-role/policy.yamlCBC11C917BB0EF24B65F996876008D48
Open/ce/ca/google/iam/user-assigned-basic-role/prod.logic.yamlAC4BC57C4823E4FA1D01C55A803BDAE9
Open/ce/ca/google/iam/user-assigned-basic-role/test-data.json1C108ACF0B5A87E99894045B2E3F01E6
Open/types/CA10__CaGoogleIamRole__c/object.extracts.yaml545CD4D347F041DCDD9980D122D63882
Open/types/CA10__CaGoogleIamPolicyBinding__c/object.extracts.yamlDA65DB880E2440923287921FF4E70B30

Available Commandsโ€‹

repo-manager policies generate FULL /ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml

Contentโ€‹

Open File

---
inputType: "CA10G1__CaGoogleUser__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "The User is assigned one of the basic roles: Owner, Editor, or Viewer."
remediationMessage: "Replace the basic role with a more restrictive role."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10G1__Google_IAM_Policy_Bindings__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The User doesn't have a basic role assigned."
relatedLists:
- relationshipName: "CA10G1__Google_IAM_Policy_Bindings__r"
importExtracts:
- file: "/types/CA10__CaGoogleIamPolicyBinding__c/object.extracts.yaml"
- file: "/types/CA10__CaGoogleIamRole__c/object.extracts.yaml"
recordTypes:
- "caGoogleIamPolicyBindingOrganization"
- "caGoogleIamPolicyBindingFolder"
- "caGoogleIamPolicyBindingProject"
conditions:
- status: "COMPLIANT"
currentStateMessage: "Empty policy binding."
check:
IS_EMPTY_LOOKUP: "CA10__iamRole__r"
- status: "INCOMPLIANT"
currentStateMessage: "User has a basic role assigned."
check:
CONTAINS:
arg:
SET:
itemType: "TEXT"
items:
- "roles/owner"
- "roles/editor"
- "roles/viewer"
search:
EXTRACT: "CA10__iamRole__r.CA10__roleName__c"
otherwise:
status: "COMPLIANT"
currentStateMessage: "User doesn't have a basic role assigned."