summaryrefslogtreecommitdiff
path: root/go/internal
Commit message (Collapse)AuthorAgeFilesLines
* Move go code up one levelNick Thomas2019-10-1881-5705/+0
|
* Remove handler functions which aren't usedIgor2019-10-185-199/+25
|
* Upgrade Gitaly to 1.68.0jc-upgrade-gitalyJohn Cai2019-10-149-9/+9
| | | | 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-087-0/+263
|
* 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-246-366/+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-206-366/+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
|/
* Replace symlinks with actual binariesPatrick Bajao2019-08-152-4/+4
| | | | | | | | | | | | | | | | | | | 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-0211-154/+351
| | | | | | | | | | 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-296-41/+99
| | | | | | | | | | | | | | 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
|
* 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-3128-102/+1212
|
* Introduce gitlabnet.ParseJSON to DRYIgor Drozdov2019-05-224-60/+48
|
* Pass readWriter to Command constructorIgor Drozdov2019-05-208-37/+49
|
* 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-123-7/+93
|
* Provide go implementation for 2fa_recovery_codes commandIgor2019-03-2116-35/+611
|
* Wrap Stderr & Stdout in a reporter structBob Van Landuyt2019-03-157-29/+85
| | | | | 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.
* Adds distributed tracing instrumentation to GitLab-Shellan-distributed-tracingAndrew Newdigate2019-03-017-95/+278
| | | | Adds distributed tracing instrumentation to GitLab-Shell using LabKit
* Don't fall back to ruby for non SSH connectionsbvl-feature-flag-commandsBob Van Landuyt2019-01-151-3/+3
| | | | | When SSH_CONNECTION is not set, we don't fall back to ruby, but instead fail directly in go writing the error to stderr.
* Allow enabling gitlab-shell "discover"-featureBob Van Landuyt2019-01-159-0/+407
| | | | | | | | | | | | | | | | | | | This adds the possibility to enable features for GitLab shell. The first feature being recognized is "Discover": It's the command that is executed when running `ssh git@gitlab.example.com` and is called without a command. The gitlab key id or username is already parsed from the command line arguments. Currently we only support communicating with GitLab-rails using unix sockets. So features will not be enabled if the GitLab-url is using a different protocol. The url for this read from the config yaml. Pending ruby-specs have been added for the gitlab-shell command. Refactor to have separate command packages
* Vendor updatesAndrew Newdigate2018-12-113-3/+3
|
* Revert "Merge branch 'zj-rename-gitalypb' into 'master'"revert-0662bdd1Zeger-Jan van de Weg2018-12-073-6/+6
| | | This reverts merge request !262
* Upgrade gitaly Client dependencyZeger-Jan van de Weg2018-12-063-6/+6
| | | | | The client now has TLS support. So this gets pulled into this component. To make it work, we have to upgrade the proto too.
* Use Gitaly's v2 auth schemegitaly-auth-v2Alejandro Rodríguez2018-10-091-1/+1
|
* Allow the config directory to be specifiedNick Thomas2018-09-282-7/+14
|
* Specify a richer scheme to run the migration withNick Thomas2018-09-282-11/+26
|
* Initial feature-flagged go/ruby switchNick Thomas2018-09-282-6/+13
|
* Add Gitaly git-upload-archive migrated commandgitaly-upload-archiveAlejandro Rodríguez2018-03-201-0/+26
|