Files
probo/pkg/accessreview/drivers/testdata/google_analytics.yaml
Aurélien Sibiril fa581159be List Google Analytics subproperties in access reviews
listProperties filtered properties with parent:accounts/{id}, which returns
only properties whose direct parent is the account and silently drops
subproperties and roll-up properties (parented to another property). A member
holding a binding only on such a subproperty was omitted from the review.
Switch to the ancestor:accounts/{id} filter, which walks the whole account
hierarchy and is a strict superset, so no property is lost.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-07-26 09:22:04 +02:00

97 lines
3.3 KiB
YAML

---
# Hand-authored cassette for the GA4 Admin API v1alpha (Bearer token stripped by
# the recorder). The driver lists account-level accessBindings, then the
# properties beneath the account, then each property's accessBindings, merging a
# user's roles across levels by email. alice appears at both levels (admin +
# viewer) to exercise the merge; carol appears only at the property level. The
# AccessBinding shape (name, user, roles[]) and property list shape mirror the
# live API.
version: 2
interactions:
- id: 0
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
host: analyticsadmin.googleapis.com
form:
pageSize:
- "200"
headers:
Accept:
- application/json
url: https://analyticsadmin.googleapis.com/v1alpha/accounts/123456/accessBindings?pageSize=200
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
content_length: -1
uncompressed: true
body: '{"accessBindings":[{"name":"accounts/123456/accessBindings/abc123","user":"alice@example.com","roles":["predefinedRoles/admin"]},{"name":"accounts/123456/accessBindings/def456","user":"bob@example.com","roles":["predefinedRoles/analyst"]}]}'
headers:
Content-Type:
- application/json
status: 200 OK
code: 200
duration: 100ms
- id: 1
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
host: analyticsadmin.googleapis.com
form:
filter:
- ancestor:accounts/123456
pageSize:
- "200"
headers:
Accept:
- application/json
url: https://analyticsadmin.googleapis.com/v1alpha/properties?filter=ancestor%3Aaccounts%2F123456&pageSize=200
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
content_length: -1
uncompressed: true
body: '{"properties":[{"name":"properties/67890","displayName":"Acme Website","parent":"accounts/123456"}]}'
headers:
Content-Type:
- application/json
status: 200 OK
code: 200
duration: 100ms
- id: 2
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
host: analyticsadmin.googleapis.com
form:
pageSize:
- "200"
headers:
Accept:
- application/json
url: https://analyticsadmin.googleapis.com/v1alpha/properties/67890/accessBindings?pageSize=200
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
content_length: -1
uncompressed: true
body: '{"accessBindings":[{"name":"properties/67890/accessBindings/ghi789","user":"alice@example.com","roles":["predefinedRoles/viewer"]},{"name":"properties/67890/accessBindings/jkl012","user":"carol@example.com","roles":["predefinedRoles/analyst"]}]}'
headers:
Content-Type:
- application/json
status: 200 OK
code: 200
duration: 100ms