Commit Graph
9 Commits
Author SHA1 Message Date
Noah Stride 476a4a7e82 context.TODO() tidying (#21288)
* Use `ctx` rather than `context.TODO()` where available

* Further propagation of context

* Use `context.Background()` instead of `context.TODO()` where appropriate in tests

* Further remove `context.TODO` from tests

* Appease linter on parameter order
2023-02-07 09:01:35 +00:00
Andrew Burke ac257084a7 Automatically import Azure tags (#16218)
This change lets Teleport automatically import tags from the Azure instance it's running on.
2022-09-28 23:40:13 +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
Nic Klaassen cf30661de6 Use regional STS endpoints for IAM join method (#15337) 2022-08-29 18:35:28 +00:00
Andrew BurkeandTim Ross 645afa051b Make EC2 availability check more robust (#14867)
This change improves the reliability of checking for the presence of an EC2 instance.

Co-authored-by: Tim Ross <tim.ross@goteleport.com>
2022-07-27 18:35:35 +00:00
Nic Klaassen dd12a7f60e Display helpful error when joining with invalid host ID for EC2 join method (#14404) 2022-07-14 22:34:51 +00:00
Andrew Burke 413cfd876e Optimize instance metadata availability check (#13167)
This change optimizes the availability check for EC2 instance metadata, especially when Teleport isn't running on EC2.
2022-06-07 18:12:54 +00:00
Andrew Burke a8ed7bd1fd Automatically import EC2 tags (#12593)
This change allows Teleport to automatically import EC2 tags when running in an EC2 instance.
2022-05-31 23:19:16 +00:00
Nic Klaassen 2b8205256b Treat EC2 Node IDs as UUIDs (#9722) 2022-01-18 22:48:34 +00:00