Skip to content

fix: user auth for datasets#1725

Merged
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
nikhilsinhaparseable:fix/all-readers
Jul 14, 2026
Merged

fix: user auth for datasets#1725
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
nikhilsinhaparseable:fix/all-readers

Conversation

@nikhilsinhaparseable

@nikhilsinhaparseable nikhilsinhaparseable commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

reader of all datasets get permission "*"
user_auth_for_datasets treat this as literal stream hence query/counts api fail with error stream not found

fix: use stream name of request dataset from the request

Summary by CodeRabbit

  • Bug Fixes
    • Improved authorization checks for stream-based queries so access is validated against the stream actually being queried.
    • Preserved existing permission behavior for explicitly authorized streams, wildcard access, and internal streams.
    • Strengthened handling and validation of list-based filter expressions, including quoted values, comma-separated elements, and invalid bracket-based input.

reader of all datasets get permission "*"
user_auth_for_datasets treat this as literal stream
hence query/counts api fail with error stream not found

fix: use stream name of request dataset from the request
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f87c0b4d-b288-46e3-88eb-0b67039df1db

📥 Commits

Reviewing files that changed from the base of the PR and between 9e96eb8 and 866f479.

📒 Files selected for processing (3)
  • src/alerts/alerts_utils.rs
  • src/users/filters.rs
  • src/utils/mod.rs

Walkthrough

The changes refine alert array parsing tests, reformat related code, and update query authorization to validate the requested dataset rather than the permission selector. Filter authorization call formatting is also adjusted without changing its behavior.

Changes

Alert parsing coverage

Layer / File(s) Summary
Array parsing and expression tests
src/alerts/alerts_utils.rs
The delimiter index calculation is simplified, while sanitization and list-condition tests add numeric, bare-string, quoted-comma, equality, exclusion, and injection-rejection coverage.

Query dataset authorization

Layer / File(s) Summary
Dataset validation and filter authorization wiring
src/utils/mod.rs, src/users/filters.rs
Stream query authorization validates table_name; the filter authorization call is reformatted without changing its arguments or inclusion behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: parmesant

Poem

I’m a rabbit reviewing code,
Hopping through tests in a tidy mode.
Streams now check the table they query,
While commas and brackets behave less spooky.
Thump, thump—the diff is clear!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is too sparse for the template and omits the issue reference, rationale, key changes, and checklist details. Add the Fixes #XXXX line or remove it, expand the goal/rationale/key changes, and complete the testing/comments/docs checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change: fixing dataset user authorization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@nikhilsinhaparseable
nikhilsinhaparseable merged commit 78755dd into parseablehq:main Jul 14, 2026
12 checks passed
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