summaryrefslogtreecommitdiff
path: root/internal
Commit message (Collapse)AuthorAgeFilesLines
* close; things are colliding506-jsandlinJames Sandlin2022-07-151-129/+27
|
* waitgroup implemented & otp testing worksJames Sandlin2022-07-152-71/+116
|
* All testing for otpAuth now works.James Sandlin2022-07-153-144/+116
|
* add temp filesJames Sandlin2022-07-153-0/+553
|
* reorgJames Sandlin2022-07-152-39/+212
|
* Remove redundant channelkmcknight2022-07-121-19/+11
|
* Remove redundant contextskmcknight2022-07-121-9/+7
|
* Update test caseskmcknight2022-04-142-12/+0
|
* Add mock test server handler for push internal apikmcknight2022-04-141-1/+36
|
* Fix test formatting and inconsistencykmcknight2022-04-122-7/+1
|
* Split client tests into manual/pushkmcknight2022-04-122-13/+152
|
* Split out into manual/pushkmcknight2022-04-122-20/+135
|
* Fix format errorskmcknight2022-04-071-2/+2
|
* Merge context logger additions from mainKen McKnight2022-04-0668-1403/+2656
|\ | | | | | | # Conflicts: # internal/command/twofactorverify/twofactorverify.go
| * Fix connections duration metricsIgor Drozdov2022-04-051-4/+4
| | | | | | | | We need to pass time.Now as a param, otherwise it's calculated on call
| * Improve login grace timeout messageIgor Drozdov2022-03-311-1/+1
| |
| * Abort long-running unauthenticated SSH connectionsIgor Drozdov2022-03-303-1/+50
| |
| * Merge branch 'id-reuse-grpc-connections-and-sidechannel' into 'main'Igor Drozdov2022-03-1810-148/+329
| |\ | | | | | | | | | | | | Reuse Gitaly connections and sidechannel See merge request gitlab-org/gitlab-shell!575
| | * Reuse Gitaly conns and SidechannelIgor Drozdov2022-03-0710-148/+329
| | | | | | | | | | | | | | | | | | | | | | | | When gitlab-sshd has been introduced we've started running our own SSH server. In this case we're able to cache and reuse Gitaly connections and Registry. It helps to reduce memory usage.
| * | Default to info level for an empty log-levelNick Thomas2022-03-152-3/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd assumed that the `omitempty` directive for LogLevel in internal/config/config.go would get us this behaviour. If it did, we wouldn't have had to specify the default twice. Unfortunately, it doesn't, which is to say that given a config file like: ``` log_level: ``` The default *is* overridden by the empty string. It's an easy enough fix. Changelog: fixed
| * Add more metrics for gitlab-sshdIgor Drozdov2022-02-214-26/+84
| | | | | | | | | | | | - Counter of HTTP merge requests - Gauge of HTTP requests currently being performed - Gauge of connections currently handled by gitlab sshd
| * Handle and log unhandled errorsIgor Drozdov2022-02-023-11/+23
| | | | | | | | | | | | | | | | | | Currently, we don't process the results of this execution, because it's not really imprortant Let's at least log the err if the execution went wrong That will also make Vulnerability report happy
| * Optionally use SSHUploadPackWithSidechannelJacob Vosmaer2022-01-257-15/+106
| | | | | | | | | | | | | | If the GitLab API returns an allowed response with use_sidechannel set to true, gitlab-shell will establish a sidechannel connection and use SSHUploadPackWithSidechannel instead of SSHUploadPack. This is an efficiency improvement.
| * Support parsing `use_sidechannel` API response fieldJacob Vosmaer2022-01-253-4/+63
| | | | | | | | | | | | This field will act as a feature flag that controls whether gitlab-shell uses the old SSHUploadPack RPC or the new SSHUploadPackWithSidechannel.
| * Refactor client response testsJacob Vosmaer2022-01-201-44/+40
| | | | | | | | | | | | | | | | | | | | This reduces coupling between tests in internal/gitlabnet/accessverifier/client_test.go, and will make it easier to add new test cases in the future. Note that the test server had a special behavior for the username "second", but this was never used. So we removed that behavior in this commit.
| * Remove SSL_CERT_DIR loggingid-remove-ssl-cert-dir-loggingIgor Drozdov2021-11-231-4/+0
| | | | | | | | | | This log entry doesn't respect log level, because the log level is configured after this logging happens
| * Refactor flaky test case in sshd_testid-fix-flaky-testIgor Drozdov2021-11-151-13/+3
| | | | | | | | | | - Use require.Regexp to expect ssh handshake error - Use require.Eventually to refactor verifyStatus
| * Relax key and username matching for sshdsh-improve-key-matching-sshdStan Hu2021-11-101-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the way sshd works, gitlab-shell could be called with a single string in the form: ``` /path/to/gitlab-shell -c key-id ``` However, due to the tightening of the regular expressions in fcff692b this string no longer matches, so logins would fail with: ``` Failed to get username: who='' is invalid ``` This can be reproduced by changing the user's shell to point to gitlab-shell. For example: ``` usermod git -s /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell ``` While setting gitlab-shell as the user's shell isn't officially supported, gitlab-shell still should be able to cope with the key being specified as the last argument. We now split the argument list and use the last value. Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/530
| * Add logging to RunGitalyCommand funcid-logging-for-handlerIgor Drozdov2021-10-202-5/+12
| |
| * Log SSL_CERT_DIR when it's configuredIgor Drozdov2021-10-201-0/+4
| |
| * Merge branch '499-log-non-git-commands' into 'main'Ash McKenzie2021-10-134-9/+37
| |\ | | | | | | | | | | | | Improve logging for non-git commands See merge request gitlab-org/gitlab-shell!538
| | * Improve logging for non-git commands499-log-non-git-commandsNick Thomas2021-10-134-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Several of our commands only touch the internal API, and go nowhere near Gitaly. Improve logging for each of these in a single MR. In general, we want to be able to tell what happened in the execution of each command, and to track failures down to a specific line of code. Changelog: added
| * | Reject non-proxied connections when proxy protocol is enabled532-proxy-protocol-requireNick Thomas2021-10-122-5/+42
| |/ | | | | | | | | | | This will help to prevent misconfigurations. Changelog: fixed
| * Log command invocation499-log-command-invocationNick Thomas2021-10-071-0/+7
| | | | | | | | | | | | | | | | Use reflection to log the command we are about to execute, both in gitlab-shell and gitlab-sshd. Include the environment, which has all the context we need to understand what the command is expected to do. Changelog: added
| * Fix logging channel typefix-logging-channel-typeNick Thomas2021-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | Currently we get this in some log messages: logrus_error="can not add field \"channel_type\"" This is because we're trying to add a function, rather than the result of the function call (a string) to the `log.Fields`. Whoops! Changelog: fixed
| * Resolve an error-swallowing issue499-log-me-more-moreNick Thomas2021-09-301-0/+7
| |
| * Add gitlab-sshd connection loggingNick Thomas2021-09-282-6/+18
| |
| * Add debug logging to gitlab-sshd sessionNick Thomas2021-09-282-12/+36
| |
| * Don't swallow an error parsing SSH_ORIGINAL_COMMANDNick Thomas2021-09-272-10/+5
| |
| * Respect log-level configuration againNick Thomas2021-09-233-2/+29
| | | | | | | | | | | | This was lost in the move from Ruby to Go. Restore it now. Changelog: fixed
| * Merge branch 'refactor/unify-shell' into 'main'Igor Drozdov2021-09-202-18/+15
| |\ | | | | | | | | | | | | | | | | | | refactor: unify instantiation of command.Shell Closes #517 See merge request gitlab-org/gitlab-shell!520
| | * refactor: unify instantiation of command.Shellfeistel2021-09-202-18/+15
| | |
| * | Improve err message given when Gitaly unavailableIgor Drozdov2021-09-172-0/+22
| |/
| * Add context fields to loggingid-context-fieldsIgor Drozdov2021-09-155-12/+12
| | | | | | | | It adds correlation ids wherever possible
| * Extract server config related code out of sshd.goIgor Drozdov2021-09-154-73/+217
| |
| * Unit test exit-codes for sshd/session.goid-session-test-2Igor Drozdov2021-09-151-0/+145
| |
| * Unit test sshd.handleEnv functionIgor Drozdov2021-09-151-0/+44
| |
| * Add TestInvalidClientConfig and TestNewServerWithoutHosts for sshd.goid-sshd-testsIgor Drozdov2021-09-151-0/+16
| |
| * Merge branch 'main' into refactor/cmdNick Thomas2021-09-141-1/+1
| |\
| | * Fix a flaky testNick Thomas2021-09-141-1/+1
| | |