Skip to content

Enforce EXECUTE permission on data-running endpoints#2231

Closed
philipfweiss wants to merge 1 commit into
DataJunction:mainfrom
philipfweiss:rbac-execute-enforcement
Closed

Enforce EXECUTE permission on data-running endpoints#2231
philipfweiss wants to merge 1 commit into
DataJunction:mainfrom
philipfweiss:rbac-execute-enforcement

Conversation

@philipfweiss

@philipfweiss philipfweiss commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Tracking: #2234 (step 10, optional, of the RBAC enablement sequence).

EXECUTE is part of the RBAC permission hierarchy but was never checked anywhere, so running queries was gated only by build-time READ checks (and not at all on cache hits). This adds explicit EXECUTE enforcement on the query-running endpoints.

  • Node data: GET /data/{node}/ and GET /stream/{node} require EXECUTE on the node.
  • Metrics data: GET /data/ and GET /stream/ require EXECUTE on each requested metric.
  • Because EXECUTE implies READ in the hierarchy, this also closes the cache-hit gap where SQL isn't rebuilt and the build-time READ check would be skipped.

Note: this is an independent, optional gate. In deployments where the underlying query engine already enforces data access, a DJ-level EXECUTE gate is a redundant second plane and can be left permissive. Semantics: a read-only user can view metadata/SQL but cannot run queries. No-op under the default permissive policy, so nothing breaks today.

Require the EXECUTE action on every node a query is run against, for the
node and metrics data/stream endpoints. EXECUTE was modeled in the
permission hierarchy but never checked, so running queries was gated only
by build-time READ checks (and not at all on cache hits). Because EXECUTE
implies READ, this also closes the cache-hit gap.

No-op under the default permissive policy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jun 5, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit bfa9ad2
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a23584369c6ab00085e5ce9

@philipfweiss

Copy link
Copy Markdown
Contributor Author

Closing as not strictly necessary for the RBAC enablement MVP. EXECUTE enforcement is an independent, optional gate on query execution; where the underlying query engine already enforces data access it is redundant. The plan now focuses on metadata/write governance (see #2234). Can revive this branch later if a DJ-level execute gate is wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant