security: harden admin user mutation endpoints#567
Closed
CaseyLabs wants to merge 1 commit intosecurity/user-admin-clone-helpersfrom
Closed
security: harden admin user mutation endpoints#567CaseyLabs wants to merge 1 commit intosecurity/user-admin-clone-helpersfrom
CaseyLabs wants to merge 1 commit intosecurity/user-admin-clone-helpersfrom
Conversation
12cf9b3 to
bac907c
Compare
3bc018c to
4045ace
Compare
bac907c to
cea71e2
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
This narrows the admin user mutation API so generic create and patch routes cannot mutate sensitive account-owned fields.
user; role changes stay with dedicated admin tooling.POST /admin/api/v1/users/{userid}/password.Stack
Compatibility
POST /admin/api/v1/usersstill creates users, but no longer acceptsRole.PATCH /admin/api/v1/users/{userid}no longer changes role, username, or password.POST /admin/api/v1/users/{userid}/password.modify role.Validation
Previously run before the branch split:
go test ./internal/webgo test ./internal/web ./internal/users ./internal/characters ./internal/items ./internal/pets ./internal/buffsmake validatego test ./...make js-lintmake testNot rerun after the branch split; commits were cherry-picked into the stack.