-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Disable email verification when email manually changed by idp review. #40520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.cluster.RealmInvalidationClusterTest#crudWithFailoverKeycloak CI - Store IT (mysql)
|
This gets a +1 from me. I am personally not sure about the option to revert to the current behavior in point 1 above. I would rather always have the username AND email change validations always in place. |
Thanks @sguilhen! Yes, I'm not sure either about adding the previous behavior. I just did it because maybe somebody is using only email to link users, and this way they can revert to previous behavior. Let's wait for @pedroigor and we have three votes. |
It makes more sense to remove both new options. As @rmartinc mentioned, in a scenario where a legitimate user is trying to link an account from an IdP where the email/username is different, it is still possible to finish the linking by re-authenticating. And this mechanism is much better/secure than allowing sending arbitrary e-mails and eventually taking over accounts. Perhaps the last thing to add is a release and upgrade guide note about this new behavior. FTR, this is also related to #25575. Ideally, we should control the behavior of user attributes through user profile. Preventing users from changing emails when being federated from an IdP is a valid use case and could also help as an extra security layer to prevent such issues. But regardless, we need to prevent sending verification emails when username/email changes in favor of using the user credentials. |
Closes keycloak#40446 Signed-off-by: rmartinc <rmartinc@redhat.com>
OK, I have done the changes we have been talking about:
Let's see the tests but they worked OK for me in another branch. |
@rmartinc @pedroigor @sguilhen Thanks for this PR and for reviewing it! |
Fantastic news! Thanks a million for creating the PR and reviewing it folks! |
Add option to hide the idp review button.
Closes #40446
Draft PR that just adds the ideas presented in the issue comment.
Verify existing account by Email
steps is not executed when theusername
or theemail
are modified in theReview Profile
step. This way sending emails to random users is disabled. The PR sets a configuration option to revert to previous behavior (if you think that is not needed just let me know). When disabled only the re-authentication execution is available to link the account.Confirm link existing account
. I managed the option to just check if theReview Profile
step was executed before. But I preferred to add the option just in case a custom review execution is used or similar. (The same, if you think that is better not to use an option and just check if the review step has been executed just let me know.)I have chatted a bit with @pedroigor and he thinks we will need to improve email texts too. It's a good idea. We will need an upgrading note too. But I'll do both points if the general idea in this PR is OK.
Tests added. @keycloak/core-iam take a look.