- 07 Mar, 2017 4 commits
-
-
Markus Koller authored
Gitlab::Auth and API::APIGuard already check for at least one valid scope on personal access tokens, so if the scopes are empty the token will always fail validation.
-
Markus Koller authored
-
Markus Koller authored
Gitlab::Auth.find_with_user_password is currently used in these places: - resource_owner_from_credentials in config/initializers/doorkeeper.rb, which is used for the OAuth Resource Owner Password Credentials flow - the /session API call in lib/api/session.rb, which is used to reveal the user's current authentication_token In both cases users should only be authenticated if they're in the active state.
-
Markus Koller authored
-
- 06 Mar, 2017 4 commits
-
-
Tiago Botelho authored
-
Pawel Chojnacki authored
- cleanup formating in haml - clarify time window is in seconds - cleanup straneous chunks in db/schema - rename count_uniqe_ips to update_and_return_ips_count - other
-
Pawel Chojnacki authored
-
Pawel Chojnacki authored
-
- 01 Mar, 2017 2 commits
-
-
Sean McGivern authored
-
Tiago Botelho authored
-
- 28 Feb, 2017 2 commits
-
-
Tiago Botelho authored
-
Simon Vocella authored
-
- 23 Feb, 2017 1 commit
-
-
Douwe Maan authored
-
- 30 Jan, 2017 1 commit
-
-
Drew Blessing authored
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.
-
- 16 Dec, 2016 6 commits
-
-
Timothy Andrew authored
`valid_api_token?` is a better name. Scopes are just (potentially) one facet of a "valid" token.
-
Timothy Andrew authored
- 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
-
Timothy Andrew authored
- Based on @dbalexandre's review - Extract token validity conditions into two separate methods, for personal access tokens and OAuth tokens.
-
Timothy Andrew authored
- 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.
-
Timothy Andrew authored
- This module is used for git-over-http, as well as JWT. - The only valid scope here is `api`, currently.
-
Timothy Andrew authored
- 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`
-
- 28 Sep, 2016 1 commit
-
-
Patricio Cano authored
Reset expiry time of token, if token is retrieved again before it expires.
-
- 20 Sep, 2016 1 commit
-
-
Kamil Trzcinski authored
-
- 19 Sep, 2016 6 commits
-
-
Kamil Trzcinski authored
Revert "Revert all changes introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043" This reverts commit 6d43c95b.
-
Kamil Trzcinski authored
-
Kamil Trzcinski authored
-
Kamil Trzcinski authored
-
Kamil Trzcinski authored
-
- 16 Sep, 2016 2 commits
-
-
Kamil Trzcinski authored
-
Kamil Trzcinski authored
-
- 15 Sep, 2016 10 commits
-
-
Patricio Cano authored
-
Patricio Cano authored
-
Patricio Cano authored
-
Patricio Cano authored
Use special characters for `lfs+deploy-key` to prevent a someone from creating a user with this username, and method name refactoring.
-
Patricio Cano authored
-
Patricio Cano authored
-
Patricio Cano authored
-
Patricio Cano authored
Refactored LFS auth logic when using SSH to use its own API endpoint `/lfs_authenticate` and added tests.
-
Patricio Cano authored
-
Patricio Cano authored
- Required on the GitLab Rails side is mostly authentication and API related.
-