Commit Graph
10 Commits
Author SHA1 Message Date
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Gavin Frazar a6c7107ebd handle postgres GSSEncRequest startup message (#17614)
* Recognize GSSEncRequest as postgres proto

* Respond to GSSEncRequest with 'N' for 'not supported' in postgres engine

* Add test for GSSEncRequest to postgres via proxy

* Save gssencmode=disable in .pg_service.conf and test it

* Check for repeated startup encryption request

* Refactor postgres startup test code into its own test

* Test covers all code paths in the proxy startup handler

* Make postgres proxy tests run in parallel

* Reduced test execution time from 15 seconds to 4.5 seconds.
* Ran with race detector and all tests passed.

* Make sure we read at least one byte

* Fix lint

* Fix lint

* Change err to bad parameter

* Update test
2022-10-25 02:35:02 +00:00
Alan Parra a75fcc21d8 Update golangci-lint to 1.49.0 (#16507)
Update metalinter, fix a few lint warnings and replace deprecated linters.

`deadcode`, `structcheck` and `varcheck` are abandoned and now replaced by [`unused`][1].

Since 1.19, `go fmt` reformats godocs according to https://go.dev/doc/comment. I've done a bulk-reformatting of the codebase to keep the linter happy. Backporting is mostly harmless (the exception being `lib/services/role_test.go`, that for some reason breaks the _old_ linter using the new format).

[1]: https://golangci-lint.run/usage/linters/

* Bump golangci-lint version
* Replace abandoned linters
* Fix bodyclose on lib/auth/github.com
* Fix bodyclose on lib/kube/proxy/streamproto/proto_test.go
* Fix bodyclose on lib/srv/alpnproxy/proxy_test.go
* Fix bodyclose on lib/web/conn_upgrade_test.go
* Silence staticcheck on lib/kube/proxy/forwarder_test.go
* Silence staticcheck on lib/utils/certs_test.go
* Address BuildNameToCertificate deprecation warnings
* Run `go fmt ./...`
* Run `go fmt ./...` on api/
* Ignore formatting in role_test.go
* Remove redundant initializers in lib/srv/uacc/
* Update e/
2022-09-19 22:38:59 +00:00
STeve (Xin) Huang fcd1916e9d Quote postgres connection string for printing to terminals (#11843) 2022-04-11 13:42:33 -04:00
Roman Tkachenko 97c0b5cb83 Add auth'd tunnel mode to tsh proxy db command (#11720) 2022-04-07 18:33:39 +00:00
Marek Smoliński fbd5a2aafd Fix tsh tctl do not load all CAS (#9357) 2022-01-31 13:35:15 +01:00
Roman Tkachenko 9bf88bef01 URL-encode Postgres username in connection string (#8771) 2021-11-01 08:40:06 -07:00
Roman Tkachenko 36998cf566 Add CockroachDB support (#8505) 2021-10-12 14:30:59 -07:00
Roman Tkachenko 6b9726f961 Add MongoDB database access support (#7213) 2021-06-21 22:54:05 -07:00
Roman Tkachenko f7e6838ee5 Refactor postgres service file handling, add db config command (#5319) 2021-01-21 15:21:17 -08:00