Skip to content

Require ReadInstance permission in ConnectorService handlers#9700

Merged
nishantmonu51 merged 1 commit into
mainfrom
connectors_auth
Jul 20, 2026
Merged

Require ReadInstance permission in ConnectorService handlers#9700
nishantmonu51 merged 1 commit into
mainfrom
connectors_auth

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

The ConnectorService handlers (ListBuckets, ListObjects, OLAPListTables, OLAPGetTable, ListDatabaseSchemas, ListTables, GetTable) performed no permission checks, so any caller with a valid JWT for the runtime (or none at all) could enumerate OLAP tables, connector schemas, and object storage contents. All seven now require ReadInstance on the requested instance.

  • ReadInstance matches AnalyzeConnectors, the sibling endpoint powering the same connector explorer UI, and is held by every legitimate caller: Rill Developer (auth disabled), the Cloud status page (gated on manageProject), cloud editing, and the admin service account.
  • ReadOLAP was not used for the OLAP endpoints because it is only granted on editable deployments, which would break the status page's tables tab on prod. ReadObjects was not used for the object store endpoints because it is part of every viewer's base grant and would not restrict access.
  • Because permissions are resolved for the requested instance_id, the check also prevents using a JWT issued for one instance against another instance on the same runtime.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@nishantmonu51
nishantmonu51 requested a review from k-anshul July 19, 2026 05:53
@nishantmonu51

Copy link
Copy Markdown
Collaborator Author

@codex: review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 840c115bfa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nishantmonu51
nishantmonu51 merged commit d4553f3 into main Jul 20, 2026
16 checks passed
@nishantmonu51
nishantmonu51 deleted the connectors_auth branch July 20, 2026 05:42
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.

2 participants