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

Prevent double-login for Git HTTP and LFS and simplify login #15303

Merged
merged 17 commits into from
May 15, 2021

Commits on Apr 6, 2021

  1. Prevent double-login for Git HTTP and LFS and simplify login

    There are a number of inconsistencies with our current methods for
    logging in for git and lfs. The first is that there is a double login
    process. This is particularly evident in 1.13 where there are no less
    than 4 hash checks for basic authentication due to the previous
    IsPasswordSet behaviour.
    
    This duplicated code had individual inconsistencies that were not
    helpful and caused confusion.
    
    This PR does the following:
    
    * Remove the specific login code from the git and lfs handlers except
    for the lfs special bearer token
    * Simplify the meaning of DisableBasicAuthentication to allow Token and
    Oauth2 sign-in.
    * The removal of the specific code from git and lfs means that these
    both now have the same login semantics and can - if not
    DisableBasicAuthentication - login from external services. Further it
    allows Oauth2 token authentication as per our standard mechanisms.
    * The change in the recovery handler prevents the service from
    re-attempting to login - primarily because this could easily cause a
    further panic and it is wasteful.
    
    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    077f8bd View commit details
    Browse the repository at this point in the history
  2. oops forgot to move Basic up

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    9f78255 View commit details
    Browse the repository at this point in the history
  3. remove extraneous logging

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    7169169 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. Configuration menu
    Copy the full SHA
    aae6847 View commit details
    Browse the repository at this point in the history
  2. actually get the user from the context if present

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    58c821a View commit details
    Browse the repository at this point in the history
  3. Merge branch 'disable-basic-authentication-2' of github.com:zeripath/…

    …gitea into disable-basic-authentication-2
    zeripath committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    7759de8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ee27981 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

  1. Configuration menu
    Copy the full SHA
    89fe166 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2021

  1. Configuration menu
    Copy the full SHA
    1540f68 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Configuration menu
    Copy the full SHA
    fb27561 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2021

  1. Configuration menu
    Copy the full SHA
    454efa8 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2021

  1. Configuration menu
    Copy the full SHA
    ecfe6c4 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2021

  1. add testcase

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed May 12, 2021
    Configuration menu
    Copy the full SHA
    bbd09e9 View commit details
    Browse the repository at this point in the history
  2. add test

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed May 12, 2021
    Configuration menu
    Copy the full SHA
    6ec5e60 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b272dc8 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2021

  1. Configuration menu
    Copy the full SHA
    994c094 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd5b635 View commit details
    Browse the repository at this point in the history