Repository navigation
fix: mgmt API — authorization, delete_permissions, body limits, CORS - #34
Merged
Merged
Conversation
Benchmark Results
🟢 PASSED: No significant regression. Median of 3 runs. Threshold: -10%. |
…#15) The delete_permissions route handler was a no-op because it modified a cloned User without writing it back. This adds the missing remove_permissions method to UserStore so the handler can persist the change through the store's write lock.
…mprovements (#14, #15, #22) Authorization (#14): - Add require_tag helper checking user tags against required roles - Admin-only: user CRUD, permissions CRUD, definitions import - Management+Admin: exchange/queue/binding mutations - Monitoring+Management+Admin: read-only endpoints (overview, list, export) delete_permissions (#15): - Wire handler to UserStore::remove_permissions instead of modifying a detached clone Management improvements (#22): - import_definitions: collect errors, return 207 Multi-Status on partial failure - Body size limit: 10 MB via DefaultBodyLimit layer - Password hash redaction: non-admins see empty string in export_definitions - CORS: add CorsLayer::permissive (was feature-flagged but unused) - Vhost validation: return 404 for unknown vhost path parameters Tests: 12 new unit tests covering authorization rejection, delete_permissions persistence, vhost 404, and password hash redaction.
Added tower (ServiceExt::oneshot) and http-body-util (BodyExt::collect) as dev-dependencies to support the new unit tests that exercise the axum router directly without starting an HTTP server.
jamesainslie
force-pushed
the
fix-mgmt-api
branch
from
March 30, 2026 10:42
f7525a1 to
7ba3bb1
Compare
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.
Summary
Test plan
Closes #14, closes #15, closes #22