Repository navigation
Conversation
…forced Closes keycloak#55530 Signed-off-by: rmartinc <rmartinc@redhat.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change restricting when the update-email action accepts request-supplied email addresses.
No open issues 🎉
What changed in this PR
This PR addresses #55530 by restricting when Keycloak’s update-email action accepts an email directly from request parameters, preventing confirmation from being triggered without the normal form submission.
Changes:
- Accept an incoming email during the initial challenge only when email verification was explicitly forced.
- Mark forced verification when handing off from the update-profile action.
- Add a regression test that removes
session_codeandexecutionand verifies that the email-entry page remains unchanged.
| File | Description |
|---|---|
| testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/AppInitiatedActionUpdateEmailWithVerificationTest.java | Tests submission without session and execution parameters. |
| testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/EmailUpdatePage.java | Adds an accessor for asserting the displayed email. |
| services/src/main/java/org/keycloak/authentication/requiredactions/UpdateProfile.java | Marks the forced email-verification handoff. |
| services/src/main/java/org/keycloak/authentication/requiredactions/UpdateEmail.java | Requires and consumes the forced-verification flag before accepting an incoming email. |
Review effort: Balanced
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.
Closes #55530
Protect the UpdateEmail.requiredActionChallenge to only accept the incoming email parameter if the verification was forced by the update profile. If not, starting the flow requires to present the challenge normally and send the sessiobn_code parameter. Test added.