CXH-1588: fix role-grant expandable to reference principal, not parent role#135
Merged
Conversation
…t role
The svv_role_grants expandable in examples/redshift-test.yml referenced
.granted_role_name (the parent role / grant resource) instead of
.role_name (the member role / grant principal). After CXH-1583 swapped
the grant direction so the principal is role_name, the expandable's
source entitlement no longer belonged to the grant's principal, so
baton-sdk rejected the grant ("source entitlement resource id did not
match grant principal id") and the runner aborted the entire sync on any
role-to-role grant -- which every Redshift cluster has via built-in
system roles (sys:dba <- sys:operator).
Reference the principal's member entitlement instead. Verified against a
live Redshift Serverless cluster: sync now completes and role-hierarchy
expansion fans grants down to member users (read_only inherits
daily_metrics SELECT via reporting).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Connector PR Review: CXH-1588: fix role-grant expandable to reference principal, not parent roleBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe PR fixes a single field reference in Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
JavierCarnelli-ConductorOne
approved these changes
Jun 4, 2026
al-conductorone
approved these changes
Jun 4, 2026
johnallers
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes CXH-1588. The
svv_role_grantsexpandable inexamples/redshift-test.ymlreferenced.granted_role_name(the parent role = the grant resource) instead of.role_name(the member role = the grant principal). After CXH-1583 swapped the grant direction so the principal isrole_name, the expandable's source entitlement no longer matched the grant's principal, so baton-sdk rejected the grant (source entitlement resource id did not match grant principal id) and the runner aborted the entire full sync.Because Redshift ships built-in system role grants (
sys:dba <- sys:operator) insvv_role_grants, this aborted the sync on every real cluster out of the box.Change
examples/redshift-test.yml— thesvv_role_grantsexpandable now references'role:' + .role_name + ':member'(the principal) instead of.granted_role_name(the resource), with a comment explaining the principal requirement.Verification
Against a live Redshift Serverless cluster (2026-06-04):
.c1z.Sync complete., and role-hierarchy expansion materializes —read_onlyinheritsanalytics.reporting_data.daily_metrics SELECTviareporting.go build+go test ./pkg/bsql/... ./pkg/connector/...(116 tests) pass.🤖 Generated with Claude Code