Skip to content

feat: 5/7 route role membership through frontend#25525

Open
tabVersion wants to merge 2 commits intoralph/rbac-split-04-meta-revoke-drop-authorityfrom
ralph/rbac-split-05-frontend-role-dispatch-cache
Open

feat: 5/7 route role membership through frontend#25525
tabVersion wants to merge 2 commits intoralph/rbac-split-04-meta-revoke-drop-authorityfrom
ralph/rbac-split-05-frontend-role-dispatch-cache

Conversation

@tabVersion
Copy link
Copy Markdown
Contributor

@tabVersion tabVersion commented Apr 28, 2026

Stack: 5/7 for splitting ralph/rbac-postgres-final-alignment onto origin/main.

Base: ralph/rbac-split-04-meta-revoke-drop-authority
Next: ralph/rbac-split-06-set-role-session-semantics

Scope

  • Route role membership behavior through frontend handlers, privilege checks, membership cache refresh, and session role state.
  • Add role dispatch coverage and effective privilege helpers.

Out of scope

  • pg_catalog/system function compatibility.
  • Runtime SLT catalog validation.

Tests

  • cargo fmt --check
  • git diff --check
  • cargo check -p risingwave_frontend
  • cargo test -p risingwave_frontend --test role_dispatch
  • ./risedev slt-clean './e2e_test/ddl/role_inherited_privilege.slt'
  • ./risedev slt './e2e_test/ddl/role_inherited_privilege.slt'

This stack layer connects role grant and revoke behavior through frontend handlers, privilege checks, membership cache refresh, and the session surfaces needed by role dispatch. It also carries the SET ROLE/session plumbing required to keep the restored dispatch code compile-safe.\n\nConstraint: Frontend GRANTED BY and role dispatch depend on membership snapshots and session user accessors.\nRejected: Keep handler dispatch as parser-only stubs | would prevent testing the meta authority added by the previous PRs.\nConfidence: medium\nScope-risk: moderate\nDirective: Catalog compatibility and system function snapshots still belong to the final stack layer.\nTested: cargo fmt --check; cargo check -p risingwave_frontend\nNot-tested: Full role_dispatch integration test suite
@tabVersion tabVersion changed the title rbac: route role membership through frontend feat: 5/7 route role membership through frontend Apr 28, 2026
@github-actions github-actions Bot added type/feature Type: New feature. and removed Invalid PR Title labels Apr 28, 2026
Actual SELECT/UPDATE binding now uses the same role-membership inheritance helper as session privilege checks instead of checking only direct ACLs on the current role. This keeps runtime table access aligned with the effective privilege model introduced in the frontend role-dispatch layer.

Constraint: The fix belongs in PR #25525 because that stack layer owns frontend privilege checks, effective privilege helpers, and membership cache plumbing.

Rejected: Put this in #25527 catalog compatibility | that would leave actual query execution broken until the final catalog-only layer.

Confidence: high

Scope-risk: narrow

Directive: Keep pg_catalog/system-function compatibility in #25527; this commit only wires actual binder checks to effective privileges.

Tested: cargo fmt --check; git diff --check; cargo check -p risingwave_frontend; cargo test -p risingwave_frontend --test role_dispatch; ./risedev slt-clean './e2e_test/ddl/role_inherited_privilege.slt'; ./risedev slt './e2e_test/ddl/role_inherited_privilege.slt'

Not-tested: Full workspace CI

Co-authored-by: OmX <omx@oh-my-codex.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Type: New feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant