1. 06 3月, 2017 1 次提交
  2. 01 3月, 2017 1 次提交
  3. 23 2月, 2017 1 次提交
  4. 31 1月, 2017 1 次提交
    • D
      Reduce hits to LDAP on Git HTTP auth by reordering auth mechanisms · 29414ab0
      Drew Blessing 提交于
      We accept half a dozen different authentication mechanisms for
      Git over HTTP. Fairly high in the list we were checking user
      password, which would also query LDAP. In the case of LFS,
      OAuth tokens or personal access tokens, we were unnecessarily
      hitting LDAP when the authentication will not succeed. This
      was causing some LDAP/AD systems to lock the account. Now,
      user password authentication is the last mechanism tried since
      it's the most expensive.
      29414ab0
  5. 16 12月, 2016 6 次提交
    • T
      Rename the `token_has_scope?` method. · 5becbe24
      Timothy Andrew 提交于
      `valid_api_token?` is a better name. Scopes are just (potentially) one facet of
      a "valid" token.
      5becbe24
    • T
      Convert AccessTokenValidationService into a class. · b303948f
      Timothy Andrew 提交于
      - Previously, AccessTokenValidationService was a module, and all its  public
      methods accepted a token. It makes sense to convert it to a class which accepts
      a token during initialization.
      
      - Also rename the `sufficient_scope?` method to `include_any_scope?`
      
      - Based on feedback from @rymai
      b303948f
    • T
      Refactor access token validation in `Gitlab::Auth` · dc95bcbb
      Timothy Andrew 提交于
      - Based on @dbalexandre's review
      - Extract token validity conditions into two separate methods, for
        personal access tokens and OAuth tokens.
      dc95bcbb
    • T
      Implement minor changes from @dbalexandre's review. · 4d6da770
      Timothy Andrew 提交于
      - Mainly whitespace changes.
      
      - Require the migration adding the `scope` column to the
        `personal_access_tokens` table to have downtime, since API calls will
        fail if the new code is in place, but the migration hasn't run.
      
      - Minor refactoring - load `@scopes` in a `before_action`, since we're
        doing it in three different places.
      4d6da770
    • T
      Validate access token scopes in `Gitlab::Auth` · 36b3210b
      Timothy Andrew 提交于
      - This module is used for git-over-http, as well as JWT.
      
      - The only valid scope here is `api`, currently.
      36b3210b
    • T
      Calls to the API are checked for scope. · 7fa06ed5
      Timothy Andrew 提交于
      - Move the `Oauth2::AccessTokenValidationService` class to
        `AccessTokenValidationService`, since it is now being used for
        personal access token validation as well.
      
      - Each API endpoint declares the scopes it accepts (if any). Currently,
        the top level API module declares the `api` scope, and the `Users` API
        module declares the `read_user` scope (for GET requests).
      
      - Move the `find_user_by_private_token` from the API `Helpers` module to
        the `APIGuard` module, to avoid littering `Helpers` with more
        auth-related methods to support `find_user_by_private_token`
      7fa06ed5
  6. 29 9月, 2016 1 次提交
  7. 20 9月, 2016 1 次提交
  8. 19 9月, 2016 6 次提交
  9. 16 9月, 2016 12 次提交
  10. 15 9月, 2016 4 次提交
  11. 14 9月, 2016 1 次提交
  12. 13 9月, 2016 3 次提交
  13. 19 8月, 2016 1 次提交
  14. 18 8月, 2016 1 次提交