๐ง Google IAM Policy Binding Member (User) is assigned a basic role - prod.logic.yaml๐ข
- Contextual name: ๐ง prod.logic.yaml๐ข
- ID:
/ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml - Tags:
- ๐ข Logic test success
- ๐ข Logic with extracts
- ๐ข Logic with test data
Usesโ
- ๐ Google IAM Policy Binding Member (User)
- ๐ Google IAM Role - object.extracts.yaml
- ๐ Google IAM Policy Binding - object.extracts.yaml
- ๐งช test-data.json
Test Results ๐ขโ
Generated at: 2025-10-25T12:02:47.596353497Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| ๐ข | 001 | โ๏ธ 199 | โ๏ธ CA10G1__Google_IAM_Policy_Bindings__r.has(INCOMPLIANT) | โ๏ธ null |
| ๐ข | 002 | โ๏ธ 200 | โ๏ธ otherwise | โ๏ธ null |
Generation Bundleโ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/google/iam/user-assigned-basic-role/policy.yaml | CBC11C917BB0EF24B65F996876008D48 |
| Open | /ce/ca/google/iam/user-assigned-basic-role/prod.logic.yaml | AC4BC57C4823E4FA1D01C55A803BDAE9 |
| Open | /ce/ca/google/iam/user-assigned-basic-role/test-data.json | 1C108ACF0B5A87E99894045B2E3F01E6 |
| Open | /types/CA10__CaGoogleIamRole__c/object.extracts.yaml | 545CD4D347F041DCDD9980D122D63882 |
| Open | /types/CA10__CaGoogleIamPolicyBinding__c/object.extracts.yaml | DA65DB880E2440923287921FF4E70B30 |
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โ
---
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."