Repository navigation
[Cherry-pick to branch-1.3] [#13925] improvement(idp-basic): Require currentPassword for self password change (#13926) - #13963
Merged
roryqi merged 1 commit intoOct 20, 2026
Conversation
…lf password change (apache#13926) Cherry-pick of apache#13926 onto branch-1.3. Require oldPassword for self password changes and move the endpoint to PUT /idp/users/{user}/password. The enabled API from main is omitted because branch-1.3 does not have the enabled-user storage/feature yet. Co-authored-by: Cursor <cursoragent@cursor.com>
Code Coverage Report
Files
|
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.
Cherry-pick Information:
branch-1.3What changes were proposed in this pull request?
Backport #13926 / #13925 to
branch-1.3:oldPasswordfor self password changes and verify it against the stored hashPUT /api/idp/users/{user}/passwordwithnewPassword/ optionaloldPasswordGETtheir own user andPUTtheir own passwordnewPasswordand must omitoldPasswordBackport notes
branch-1.3does not include the local-userenabledflag /PUT .../enabledAPI from main, so that part of [#13925] improvement(idp-basic): Require currentPassword for self password change #13926 is omitted.Why are the changes needed?
Self-service (and admin self) password change previously accepted only the new password. Callers with a valid Basic session could change a password without proving knowledge of the existing password again.
Fix: #13925
Does this PR introduce any user-facing change?
Yes.
PUT /api/idp/users/{user}/password{"newPassword":"...","oldPassword":"..."}{"newPassword":"..."}(must omitoldPassword)passwordHow was this patch tested?
./gradlew :plugins:idp-basic:test --tests org.apache.gravitino.idp.TestIdpUserGroupManager --tests org.apache.gravitino.idp.dto.requests.TestChangePasswordRequest --tests org.apache.gravitino.idp.web.rest.TestIdpOperations --tests org.apache.gravitino.idp.web.rest.TestIdpAuthorizationFilter -PskipITs./gradlew :docs:buildMade with Cursor