Repository navigation
refactor(amber): remove the unregistered GuestAuthFilter and its unreachable guest guard - #7926
Merged
aglinxinyuan merged 1 commit intoAug 25, 2026
Conversation
…achable guest guard Delete GuestAuthFilter (the filter class, its Builder, and the GUEST singleton) and its spec, remove the guest guard from WorkflowResource.persistWorkflow, and remove the guard's test case from WorkflowResourceSpec.
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🟢 | bs=10 sw=10 sl=64 | 492 | 0.3 | 19,952/23,780/23,780 us | 🟢 -62.9% / 🔴 +73.7% |
| 🔴 | bs=100 sw=10 sl=64 | 974 | 0.594 | 100,847/145,229/145,229 us | 🔴 +16.4% / 🔴 +50.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,169 | 0.714 | 853,215/896,394/896,394 us | ⚪ within ±5% / 🟢 -6.9% |
Baseline details
Latest main 6b8027e from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 492 tuples/sec | 358 tuples/sec | 863.81 tuples/sec | +37.4% | -43.0% |
| bs=10 sw=10 sl=64 | MB/s | 0.3 MB/s | 0.218 MB/s | 0.527 MB/s | +37.6% | -43.1% |
| bs=10 sw=10 sl=64 | p50 | 19,952 us | 26,883 us | 11,488 us | -25.8% | +73.7% |
| bs=10 sw=10 sl=64 | p95 | 23,780 us | 64,133 us | 14,067 us | -62.9% | +69.0% |
| bs=10 sw=10 sl=64 | p99 | 23,780 us | 64,133 us | 17,591 us | -62.9% | +35.2% |
| bs=100 sw=10 sl=64 | throughput | 974 tuples/sec | 1,040 tuples/sec | 1,127 tuples/sec | -6.3% | -13.6% |
| bs=100 sw=10 sl=64 | MB/s | 0.594 MB/s | 0.635 MB/s | 0.688 MB/s | -6.5% | -13.7% |
| bs=100 sw=10 sl=64 | p50 | 100,847 us | 91,695 us | 89,893 us | +10.0% | +12.2% |
| bs=100 sw=10 sl=64 | p95 | 145,229 us | 124,818 us | 96,506 us | +16.4% | +50.5% |
| bs=100 sw=10 sl=64 | p99 | 145,229 us | 124,818 us | 104,915 us | +16.4% | +38.4% |
| bs=1000 sw=10 sl=64 | throughput | 1,169 tuples/sec | 1,200 tuples/sec | 1,156 tuples/sec | -2.6% | +1.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.714 MB/s | 0.732 MB/s | 0.705 MB/s | -2.5% | +1.2% |
| bs=1000 sw=10 sl=64 | p50 | 853,215 us | 833,765 us | 886,448 us | +2.3% | -3.7% |
| bs=1000 sw=10 sl=64 | p95 | 896,394 us | 882,705 us | 930,093 us | +1.6% | -3.6% |
| bs=1000 sw=10 sl=64 | p99 | 896,394 us | 882,705 us | 963,104 us | +1.6% | -6.9% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,406.84,200,128000,492,0.300,19951.71,23780.01,23780.01
1,100,10,64,20,2053.52,2000,1280000,974,0.594,100846.61,145228.54,145228.54
2,1000,10,64,20,17102.92,20000,12800000,1169,0.714,853214.58,896393.98,896393.98
aglinxinyuan
approved these changes
Aug 25, 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.
What changes were proposed in this PR?
GuestAuthFilteris an authentication filter that is never registered: everyAuthDynamicFeatureregistration in the repo installsJwtAuthFilter(JwtAuth.scala,AuthFeatures.scala,NotebookMigrationService.scala), and nothing constructsGuestAuthFilteror itsBuilder. It was originally registered for the non-user-system mode behind theuser-sys.enabledflag, but that mode and its registration were removed in #3831, leaving the filter with no production path.With the filter gone, the guest guard in
WorkflowResource.persistWorkflowbecame unreachable: it compares the request user againstGuestAuthFilter.GUEST(whoseuidis null), but the only production path to that endpoint isJwtAuthFilter→JwtParser.claimsToSessionUser, which fails authentication with a 401 unless the token carries a non-nulluserIdclaim — so every user that reaches the guard has a non-nulluidand can never equalGUEST. The endpoint stays protected by@Auth+@RolesAllowed, so removing the guard changes no user-facing behavior.Changes:
GuestAuthFilter.scala(the filter class, itsBuilder, and theGUESTsingleton — the singleton's only production use was the unreachable guard).GuestAuthFilterSpec.scala, since the filter it covers has no production path.WorkflowResource.persistWorkflow.WorkflowResourceSpec(it hand-built aSessionUser(GUEST)principal that no production path can produce) along with the now-unusedGuestAuthFilterimport, and move the"WorkflowResource.persistWorkflow" shouldsubject prefix onto the following test so the laterit shouldcases keep their subject binding.Any related issues, documentation, discussions?
Fixes #7923.
The filter was introduced for the non-user-system mode in #1394, the guard was added in #2836 while that mode was still supported, and the mode along with the filter's registration was removed in #3831. This PR cleans up what #3831 left behind.
How was this PR tested?
No new tests: the two removed tests covered only the unreachable path (both had to construct the guest principal by hand). The remaining
WorkflowResourceSpeccases forpersistWorkflow(owner update with version recording, no-access and no-write-access rejections) continue to cover the endpoint. A repo-wide grep confirms no references toGuestAuthFilterorGUESTremain outside this PR's deletions.Was this PR authored or co-authored using generative AI tooling?
Co-authored by: Claude Fable 5 (Claude Code)