summaryrefslogtreecommitdiff
path: root/lib/api/internal.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary variablemk-fix-git-over-http-rejectionsMichael Kozono2017-06-051-3/+1
|
* Refactor construction of responseMichael Kozono2017-06-051-14/+6
|
* Refactor to let GitAccess errors bubble upMichael Kozono2017-06-051-18/+20
| | | | | | No external behavior change. This allows `GitHttpController` to set the HTTP status based on the type of error. Alternatively, we could have added an attribute to GitAccessStatus, but this pattern seemed appropriate.
* Prevent errors from non-functional notify_post_receive endpointfix-notify-post-receiveAlejandro Rodríguez2017-05-181-8/+9
|
* Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Pass GL_REPOSITORY in Workhorse responses29925-gitlab-shell-hooks-can-no-longer-send-absolute-paths-to-gitlab-ceAlejandro Rodríguez2017-05-051-1/+1
|
* Generate and handle a gl_repository param to pass around componentsAlejandro Rodríguez2017-05-031-4/+6
| | | | | | | | | This new param allows us to share project information between components that don't share or don't have access to the same filesystem mountpoints, for example between Gitaly and Rails or between Rails and Gitlab-Shell hooks. The previous parameters are still supported, but if found, gl_repository is prefered. The old parameters should be deprecated once all components support the new format.
* Wrong method call on notify_post_receive.Luigi Leoni2017-04-271-1/+1
|
* Remove unused user activities codeSean McGivern2017-04-141-10/+0
|
* Add user activity service and spec. Also added relevant - NOT offline - ↵James Lopez2017-04-141-0/+12
| | | | | | | migration It uses a user activity table instead of a column in users. Tested with mySQL and postgreSQL
* Set Git-specific env in /api/internal/allowedRémy Coutable2017-04-101-15/+9
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use Gitlab::Git::Repository#gitaly_... moreJacob Vosmaer2017-04-071-1/+1
|
* Incorporate Gitaly client for refs serviceAlejandro Rodríguez2017-04-041-1/+4
|
* Separate GRPC channels per repository storageJacob Vosmaer2017-03-291-1/+1
|
* Add internal endpoint to notify post-receive to Gitalygitaly-post-receiveAlejandro Rodríguez2017-03-011-0/+12
|
* Record and show last used date of SSH KeysVincent Wong2017-01-091-1/+7
| | | | | | | | Addresses: Issue #13810 1. Adds a last_used_at attribute to the Key table/model 2. Update a key's last_used_at whenever it gets used 3. Display how long ago an ssh key was last used
* Accept environment variables from the `pre-receive` script.Timothy Andrew2016-12-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Starting version 2.11, git changed the way the pre-receive flow works. - Previously, the new potential objects would be added to the main repo. If the pre-receive passes, the new objects stay in the repo but are linked up. If the pre-receive fails, the new objects stay orphaned in the repo, and are cleaned up during the next `git gc`. - In 2.11, the new potential objects are added to a temporary "alternate object directory", that git creates for this purpose. If the pre-receive passes, the objects from the alternate object directory are migrated to the main repo. If the pre-receive fails the alternate object directory is simply deleted. 2. In our workflow, the pre-recieve script (in `gitlab-shell) calls the `/allowed` endpoint, which calls out directly to git to perform various checks. These direct calls to git do _not_ have the necessary environment variables set which allow access to the "alternate object directory" (explained above). Therefore these calls to git are not able to access any of the new potential objects to be added during this push. 3. We fix this by accepting the relevant environment variables (GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_OBJECT_DIRECTORY) on the `/allowed` endpoint, and then include these environment variables while calling out to git. 4. This commit includes (whitelisted) these environment variables while making the "force push" check. A `Gitlab::Git::RevList` module is extracted to prevent `ForcePush` from being littered with these checks.
* Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project pathsNick Thomas2016-11-161-36/+2
| | | | | | | | | | | | | gitlab-shell v3.6.6 would give project paths like so: * namespace/project gitlab-shell v4.0.0 can give project paths like so: * /namespace1/namespace2/project * /namespace/project * /path/to/repository/storage/namespace1/namespace2/project * /path/to/repository/storage/namespace/project
* Refactor storage path extraction from full repo pathdz-internal-api-fullpathDmitriy Zaporozhets2016-10-281-6/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Make internal api work with full repo path instead of nameDmitriy Zaporozhets2016-10-271-4/+14
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Handle LFS token creation and retrieval in the same method, and in the same ↵lfs-ssh-authorization-fixPatricio Cano2016-09-281-1/+1
| | | | | | Redis connection. Reset expiry time of token, if token is retrieved again before it expires.
* Revert "Revert all changes introduced by ↵lfs-supportKamil Trzcinski2016-09-191-0/+13
| | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043" This reverts commit 6d43c95b7011ec7ec4600e00bdc8df76bb39813c.
* Revert all changes introduced by ↵Kamil Trzcinski2016-09-191-13/+0
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043
* Rename capabilities to authentication_abilitiesKamil Trzcinski2016-09-161-3/+3
|
* Merge remote-tracking branch 'origin/lfs-support-for-ssh' into per-build-tokenKamil Trzcinski2016-09-151-0/+13
|\ | | | | | | | | | | | | | | # Conflicts: # app/controllers/projects/git_http_client_controller.rb # app/helpers/lfs_helper.rb # lib/gitlab/auth.rb # spec/requests/lfs_http_spec.rb
| * Better authentication handling, syntax fixes and better actor handling for ↵Patricio Cano2016-09-151-8/+1
| | | | | | | | LFS Tokens
| * Refactored handling of the `LfsToken` and added functionality to it to ↵Patricio Cano2016-09-151-9/+11
| | | | | | | | simplify external code.
| * Refactored LFS auth logic when using SSH to use its own API endpoint ↵Patricio Cano2016-09-151-12/+18
| | | | | | | | `/lfs_authenticate` and added tests.
| * Refactor LFS token logic to use a Redis key instead of a DB field, making it ↵Patricio Cano2016-09-151-4/+5
| | | | | | | | a 1 use only token.
| * Added LFS support to SSHPatricio Cano2016-09-151-1/+12
| | | | | | | | - Required on the GitLab Rails side is mostly authentication and API related.
* | Fix existing authorization specsKamil Trzcinski2016-09-151-10/+8
| |
* | Add access specsKamil Trzcinski2016-09-151-2/+12
|/
* Minor edits to two_factor_recovery_codes API error catchingDrew Blessing2016-08-311-5/+9
|
* Add two factor recovery endpoint to internal APIDrew Blessing2016-08-241-0/+25
|
* api for generating new merge requestScott Le2016-08-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | DRY code + fix rubocop Add more test cases Append to changelog DRY changes list find_url service for merge_requests use GET for getting merge request links remove files rename to get_url_service reduce loop add test case for cross project refactor tiny thing update changelog
* Fix a bug where the project's repository path was returned instead of the ↵19842-cloning-a-gitlab-wiki-returns-the-repo-not-the-repo-s-wikiAlejandro Rodríguez2016-07-151-1/+6
| | | | wiki path
* Only allow Git Access on the allowed protocolPatricio Cano2016-07-051-2/+5
|
* Refactor repository paths handling to allow multiple git mount pointsAlejandro Rodríguez2016-06-291-11/+25
|
* Remove explicit Gitlab::Metrics.action assignments, are already automatic.18760-remove-explicate-assignment-on-metrics-actionPaco Guzman2016-06-181-2/+0
|
* Fix setting of "action" for Grape transactionsYorick Peterse2016-04-201-1/+1
| | | | | | | Merely setting the "action" tag will only result in the transaction itself containing a value for this tag. To ensure other metrics also contain this tag we must set the action using Transaction#action= instead.
* Add "action" tag to /internal/allowed APIYorick Peterse2016-04-181-2/+4
| | | | | This allows us to re-use any other analytics that rely on the "action" tag having a value set.
* updated internal.rb and spec based on MR feedbackJames Lopez2016-02-261-3/+3
|
* fix for projects ending in .wikiJames Lopez2016-02-241-1/+8
|
* Improve Git access error messages.Douwe Maan2015-05-131-19/+7
|
* Respond with full GitAccess error if user has project read access.api-internal-errorsDouwe Maan2015-03-241-1/+1
|
* Refactor GitAccess to use instance variables.Douwe Maan2015-03-241-19/+17
|
* Don't leak information about private project existence via Git-over-SSH/HTTP.Douwe Maan2015-03-021-17/+22
|
* Improve broadcast message APIDmitriy Zaporozhets2015-02-181-0/+2
|
* Dont send 404 if no broadcast messages now because it flood gitlab-shell ↵Dmitriy Zaporozhets2015-02-181-2/+0
| | | | logs with 404 errors :(
* Add internal broadcast message API.Douwe Maan2015-02-071-0/+8
|