summaryrefslogtreecommitdiff
path: root/go
Commit message (Collapse)AuthorAgeFilesLines
* Move go code up one levelNick Thomas2019-10-1888-6097/+0
|
* Remove handler functions which aren't usedIgor2019-10-185-199/+25
|
* Remove some unneeded binariesNick Thomas2019-10-156-282/+0
|
* Upgrade Gitaly to 1.68.0jc-upgrade-gitalyJohn Cai2019-10-1417-40/+105
| | | | Gitaly 1.68.0 upgrades gRPC to 1.24.0
* Remove buildCheckAllowedEnv() test helperAsh McKenzie2019-10-091-7/+0
|
* Rewrite bin/check in GoNick Thomas2019-10-088-0/+305
|
* Clean upadd-ip-address-to-call-to-rails-apiMałgorzata Ksionek2019-10-031-1/+0
|
* Add cr remarksMałgorzata Ksionek2019-10-032-3/+1
|
* Introduce changes from code reviewMałgorzata Ksionek2019-10-039-73/+12
|
* Update methods to use new pathMałgorzata Ksionek2019-10-016-7/+7
|
* Clean up filesMałgorzata Ksionek2019-09-303-4/+33
|
* Add cr remarksMałgorzata Ksionek2019-09-297-22/+52
|
* Add cr remarksMałgorzata Ksionek2019-09-264-9/+16
|
* Add code review remarksMałgorzata Ksionek2019-09-263-15/+16
|
* Add ip address to headersMałgorzata Ksionek2019-09-262-0/+42
|
* Merge branch '173-remove-go-fallback-and-feature-flags' into 'master'Nick Thomas2019-09-249-372/+70
|\ | | | | | | | | Remove feature flags and the fallback command See merge request gitlab-org/gitlab-shell!336
| * Remove feature flags and the fallback commandNick Thomas2019-09-209-372/+70
| |
* | Switch from 512-bit to 2048-bit keyNick Thomas2019-09-202-20/+47
| |
* | Fix logic errors in gitlabnet client testsNick Thomas2019-09-201-8/+8
|/
* Use go modJacob Vosmaer2019-08-19746-339195/+135
|
* Replace symlinks with actual binariesPatrick Bajao2019-08-155-5/+97
| | | | | | | | | | | | | | | | | | | We had `gitlab-shell-authorized-keys-check` and `gitlab-shell-authorized-principals-check` as symlinks to `gitlab-shell` before. We determine the `Command` and `CommandArgs` that we build based on the `Name` of the `Executable`. We also use that to know which fallback ruby executable should we fallback to. We use `os.Executable()` to do that. `os.Executable()` behaves differently depending on OS. It may return the symlink or the target's name. That can result to a buggy behavior. The fix is to create binaries for each instead of using a symlink. That way we don't need to rely on `os.Executable()` to get the name. We pass the `Name` of the executable instead.
* Implement AuthorizedPrincipals command181-authorized-principals-check-goPatrick Bajao2019-08-099-4/+235
| | | | | | Build this command when `Executable` name is `gitlab-shell-authorized-principals-check`. Feature flag is the same name.
* Implement AuthorizedKeys command181-authorized-keys-check-goPatrick Bajao2019-08-0812-2/+532
| | | | | | Build this command when `Executable` name is `gitlab-shell-authorized-keys-check`. Feature flag is the same name.
* Add Executable struct181-migrate-gitlab-shell-checks-fallbackPatrick Bajao2019-08-0212-176/+356
| | | | | | | | | | This struct is responsible for determining the name and root dir of the executable. The `RootDir` property will be used to find the config. The `Name` property will be used to determine what `Command` and `CommandArgs` to be built.
* Rename CommandArgs to ShellPatrick Bajao2019-07-3125-58/+58
| | | | | | Other functions are still expecting for `CommandArgs` instead of `Shell`. They should be expecting `commandargs.Shell` now since it has been renamed.
* Support different CommandArgs typePatrick Bajao2019-07-318-156/+238
| | | | | | | | `CommandArgs` has been renamed to `Shell`. An interface has been added that includes `Executable()` and `Arguments()` method. The `BaseArgs` implement this methods and should be embeeded in each type.
* Support falling back to ruby version of checkersPatrick Bajao2019-07-297-57/+101
| | | | | | | | | | | | | | Rename the ruby scripts to have `-ruby` suffix and add a symlink for both to `./gitlab-shell`. The executable name will be used to determine how args will be parsed. For now, we only parse the arguments for gitlab-shell commands. If the executable is `gitlab-shell-authorized-keys-check` or `gitlab-shell-authorized-principals-check`, it'll always fallback to the ruby version. Ruby specs test the ruby script, the fallback from go to ruby and go implementation of both (still pending).
* Go implementation for LFS authenticateIgor2019-06-068-0/+464
|
* Go implementation for git-upload-archiveIgor2019-06-059-0/+171
|
* Respect GITLAB_SHELL_DIR in the Go versionNick Thomas2019-06-041-0/+4
|
* Go implementation for git-upload-packIgor2019-06-0316-48/+213
|
* Return Fallback cmd if feature is enabled, but unimplementedIgor2019-06-032-11/+20
|
* Go implementation for git-receive-packIgor2019-05-3136-102/+1554
|
* Introduce gitlabnet.ParseJSON to DRYIgor Drozdov2019-05-224-60/+48
|
* Pass readWriter to Command constructorIgor Drozdov2019-05-209-40/+52
|
* Support calling internal API using HTTPSIgor2019-05-0110-16/+263
|
* Support calling internal api using HTTPIgor2019-04-2415-140/+348
|
* Pass the root directory into the fallback commandNick Thomas2019-04-124-12/+99
|
* Correctly determine the root directory for gitlab-shellNick Thomas2019-04-121-11/+24
| | | | Credit to https://gitlab.com/ejiek for spotting this one.
* Provide go implementation for 2fa_recovery_codes commandIgor2019-03-2117-46/+622
|
* Better testing for JSON deserialisationan-improve-test-coverageAndrew Newdigate2019-03-183-0/+177
| | | | | | | | Adds tests to ensure that JSON deserialisation from program arguments takes place. This was a testing blind spot, which led to a brief regression: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/280
* Wrap Stderr & Stdout in a reporter structBob Van Landuyt2019-03-158-37/+96
| | | | | The reporter struct can be used for passing around and reporting to the io.Writer of choice.
* Detect user based on key, username or idBob Van Landuyt2019-03-148-1/+634
| | | | | | | | | | | | | | | | | | This allows gitlab-shell to be called with an argument of the format `key-123` or `username-name`. When called in this way, `gitlab-shell` will call the GitLab internal API. If the API responds with user information, it will print a welcome message including the username. If the API responds with a successful but empty response, gitlab-shell will print a welcome message for an anonymous user. If the API response includes an error message in JSON, this message will be printed to stderr. If the API call fails, an error message including the status code will be printed to stderr.
* Get secret from configBob Van Landuyt2019-03-138-87/+182
| | | | | | | | | | | This adds parsing if the `secret_file` from YAML. And reads the contents of the configured file. If no file is configured, we fall back to the `.gitlab_shell_secret` in the root dir of the configuration. If the configured path does not start with a `/` we start looking for the file relative to the root dir of the configuration.
* Vendor otiai10/copyBob Van Landuyt2019-03-136-0/+161
|
* Fix unmarshalling JSON from the command lineNick Thomas2019-03-063-3/+3
|
* Adds distributed tracing instrumentation to GitLab-Shellan-distributed-tracingAndrew Newdigate2019-03-0111-223/+322
| | | | Adds distributed tracing instrumentation to GitLab-Shell using LabKit
* Add testify/require to vendored packagesAndrew Newdigate2019-02-268-0/+2274
|
* Vendor LabKit into GitLab-ShellAndrew Newdigate2019-02-25120-0/+16304
| | | | Done using `govendor fetch -v gitlab.com/gitlab-org/labkit/...@master`
* Bump gitaly-proto to v1.10.0sh-bump-gitaly-protoStan Hu2019-02-128-539/+1009
| | | | | This is done to ensure we don't run into unknown fields as we saw in https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/364.