Skip to content
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

Add support for GitHub enterprise-managed user accounts #1190

Merged
merged 3 commits into from
Jun 23, 2023

Commits on Jun 22, 2023

  1. githubauth: add wwwauth header parsing

    Add parsing of GitHub.com's WWW-Authenticate header, with the upcoming
    enterprise_hint and domain_hint properties that can be used to indicate
    when a resource (repository) requires a specific EMU account.
    mjcheetham committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2f88662 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0521f2d View commit details
    Browse the repository at this point in the history
  3. github: filter GitHub.com accounts based on WWW-Auth headers

    If we have been given a domain_hint in the WWW-Authenticate headers we
    should use that value to filter any existing accounts we have stored.
    
    The header format is:
    
    WWW-Authenticate: Basic realm="GitHub" [enterprise_hint="X"] [domain_hint="Y"]
    
    ..where X is the enterprise slug/name, and Y is the enterprise 'shortcode'.
    
    The shortcode is the suffix applied to GitHub.com accounts that are
    EMUs (Enterprise Managed Users). That is to say they are backed by an
    external IdP (Identity Provider).
    
    If we have not been given any WWW-Authenticate header (such as with
    older versions of Git), do not do any filtering. Likewise, if the remote
    is not GitHub.com (the only place EMUs mingle with other account types)
    then do no filtering.
    mjcheetham committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    d70a146 View commit details
    Browse the repository at this point in the history