This repository was archived by the owner on Sep 26, 2024. It is now read-only.
If a user can't be found by identity, fall back to checking Email#46
Open
slewis74 wants to merge 1 commit into
Open
If a user can't be found by identity, fall back to checking Email#46slewis74 wants to merge 1 commit into
slewis74 wants to merge 1 commit into
Conversation
…ress. Server can't do this for us in `GetByIdentity` because OnPrem AD scenarios would then break.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
At the moment server will fallback to comparing the email from the token to existing usernames within Octopus. This doesn't however work in Octopus instances that have been running against other providers and have usernames already created that don't match the email addresses.
User Email addresses may have changed for a number of reasons over time, but the username in Octopus is immutable, which causes the Authenticated action handlers in this provider to create new users when it shouldn't, because it can't find the existing users.
This has shown in a customer scenario for Okta specifically, but all of the providers would be susceptible to this so the fix has been applied at the common level. The fix is to explicitly fall back to looking for users by Email if the standard
GetByIdentitydoesn't return a user (that call actually has some "fuzzy" matching and fallbacks, but they don't cover this scenario and can't be changed because they would break certain OnPrem AD scenarios).