feat: add support for GitHub OAuth authentication URLs#616
Open
sreekanthputta wants to merge 1 commit intoNoovolari:masterfrom
Open
feat: add support for GitHub OAuth authentication URLs#616sreekanthputta wants to merge 1 commit intoNoovolari:masterfrom
sreekanthputta wants to merge 1 commit intoNoovolari:masterfrom
Conversation
fed16f6 to
bd26926
Compare
Add GitHub OAuth URL pattern to support SAML authentication flows that use GitHub Enterprise or GitHub.com for OAuth authentication before redirecting to AWS SAML endpoint. This enables Leapp to work with identity providers that use GitHub as an authentication layer (e.g., GitHub Enterprise SAML IdP). Pattern /^https:\/\/github\..+\/login\/oauth\/authorize.*/ matches: - https://github.com/login/oauth/authorize - https://github.enterprise.com/login/oauth/authorize - https://github.example.com/login/oauth/authorize - Any GitHub instance domain Tests added to verify the pattern works with any domain format.
bd26926 to
9216956
Compare
|
Author
|
Sonarqube issues are not due to this PR. Although I can fix them in this PR if suggested to do so. |
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.




This PR adds support for SAML authentication flows that use GitHub OAuth for authentication.
The Problem
I was trying to use Leapp with a SAML provider that uses GitHub Enterprise for authentication. When I clicked "Start" on my session, Leapp would immediately show an error:
The browser window never opened, and the session failed after just 5 seconds.
Why This Happened
Here's what was going on:
https://github.example.com/login/oauth/authorize)The Fix
I added GitHub OAuth URLs to the list of recognized authentication services:
/^https:\/\/github\..+\/login\/oauth\/authorize.*/This pattern works with any GitHub instance:
github.com)github.enterprise.com)Now when Leapp encounters a GitHub OAuth redirect, it recognizes it as a valid authentication step and waits for you to complete the login instead of timing out.
Testing
Before: Session failed with timeout error, browser never opened
After: Browser opens, I can log in with GitHub, and the SAML flow completes successfully
This should work for anyone using GitHub (public or Enterprise) as part of their AWS SAML authentication flow.