Commit Graph
18 Commits
Author SHA1 Message Date
rosstimothy 2cced62805 Fix violations of non-constant format strings linter (#51812)
Depends on https://github.com/gravitational/teleport.e/pull/6006.
Now that we are compliant, the ignore rule was removed from the
golangci-lint config to prevent future regressions.
2025-02-04 16:43:35 +00:00
Gavin Frazar ee119ea6d6 Remove remaining db and discovery AWS SDK imports (#51628)
This eliminates all remaining references to AWS SDK v1 in the
lib/srv/db/... and lib/srv/discovery/... packages.
Most of the changes are simply to remove dead code.
2025-01-30 23:06:09 +00:00
Gavin Frazar cf15fa349c Migrate IAM in lib/cloud/clients to SDK v2 (#51145) 2025-01-17 18:22:28 +00:00
Gavin Frazar 5240a4d83b migrate AWS Redshift Serverless to AWS SDK v2 (#50964) 2025-01-16 22:36:56 +00:00
Marco Dinis 4b2a0da91d Fix AWS ListDeployedDatabaseServices when there's no ECS Cluster (#50843)
Calling the AWS API `ecs:ListServices` with a non-existent ECS Cluster
name will return a 400 w/ ClusterNotFoundException.

The existing code was not handling that error and a raw error was
returned.

This PR changes the logic to ensure that case is handled and that the
ListDeployedDatabaseServices returns an empty list.

An alternative would be to call the ListClusters beforehand, but that
would increase the number of API calls we do to external services.
2025-01-09 09:45:41 +00:00
Gavin Frazar ffacd99b28 migrate AWS Redshift services to AWS SDK v2 (#50600) 2025-01-06 21:23:44 +00:00
Andrew Burke 98ba4c9673 Migrate discovery EC2 clients to AWS SDK v2 (#48950)
This change migrates the EC2 clients used in the discovery service
to the v2 AWS SDK.
2024-11-19 19:02:53 +00:00
Gavin Frazar 9694550f5e migrate aws configurator to sdk v2 (#46367)
* migrate aws configurator to sdk v2

* rename package imports with lowercase

* export iam client interface

* mock loading aws config

* remove underscore from test name

* remove loop var reassignment
2024-09-09 21:17:30 +00:00
rosstimothy 1b5e0b0082 Reduce exposure of lib/cloud/gcp (#41678)
* Move imds related code into their own packages

Separating imds from cloud vm, kubernetes, etc. prevents the
dependency tree expanding to include extra cloud related things
for callers that only require an imds client.

* Move cloud constructors for types.KubeCluster out of lib/services

lib/services is meant to be a relatively dependency free package
that provides basic interfaces and functions for dealing with
types. NewKubeClusterFromGCPGKE, NewKubeClusterFromAWSEKS, NewKubeClusterFromAzureAKS
caused a slew of cloud related dependencies to be imported in
lib/services which increases binary sizes of client tools.

They have all been moved into lib/srv/discovery/common since
they were only consumed by other code in lib/srv/discovery.

* Decouple servicecfg and lib/auth/keystore

This was the last remaining way for lib/cloud/gcp to slip
into client tools that aren't importing lib/auth directly.

```
goda tree "reach(github.com/gravitational/teleport/tool/tctl...:all, cloud.google.com/go/compute/apiv1)"
├ github.com/gravitational/teleport/tool/tctl
    └ github.com/gravitational/teleport/tool/tctl/common
      ├ github.com/gravitational/teleport/lib/config
        ├ github.com/gravitational/teleport/lib/pam
          └ github.com/gravitational/teleport/lib/service/servicecfg
            └ github.com/gravitational/teleport/lib/auth/keystore
              └ github.com/gravitational/teleport/lib/cloud
                └ github.com/gravitational/teleport/lib/cloud/gcp
                  └ cloud.google.com/go/compute/apiv1
        └ github.com/gravitational/teleport/lib/service/servicecfg ~
      ├ github.com/gravitational/teleport/lib/service/servicecfg ~
      ├ github.com/gravitational/teleport/tool/tctl/common/accessmonitoring
        └ github.com/gravitational/teleport/lib/service/servicecfg ~
      ├ github.com/gravitational/teleport/tool/tctl/common/loginrule
        └ github.com/gravitational/teleport/lib/service/servicecfg ~
      ├ github.com/gravitational/teleport/tool/tctl/sso/configure
        ├ github.com/gravitational/teleport/lib/service/servicecfg ~
        └ github.com/gravitational/teleport/tool/tctl/sso/tester
          └ github.com/gravitational/teleport/lib/service/servicecfg ~
      └ github.com/gravitational/teleport/tool/tctl/sso/tester ~
```

* fix lints

* tidy integrations/event-handler

* fix license

* fix: only populate cloud clients if aws kms configured
2024-05-17 10:29:02 +00:00
rosstimothy b7318b5c7e Enable errorlint via golangci-lint (#37669)
Adds the new linter and configures it to prevent direct error
comparisions and type assertions in favor of errors.Is and errors.As.
All current violations caught by the linter have been updated
accordingly.
2024-02-02 15:59:24 +00:00
fheinecke b178b8b732 Updated Teleport codebase to AGPL3 license (#35259)
Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>
2023-12-01 17:48:14 +00:00
Brian Joerger 2ed1538e40 Ignore shared aws config not found error (#33651)
* Ignore shared aws config not found error.

* Move error conversion to lib/cloud/aws/errors.go
2023-10-25 01:56:46 +00:00
STeve (Xin) Huang e2320d7950 Fix AccessDenied not recognized for MemoryDB/RSSL API calls (#30226) 2023-08-10 13:04:47 +00:00
Marco André Dinis e043ac07ea AWS OIDC - DeployService: configure IAM (#28088)
* auto configure deployservice iam

* review pt1

* review pt2
2023-06-30 18:35:29 +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
STeve (Xin) Huang af2824fc9b Change IAM "UnmodifiableEntity" error to a debug log (#14594) 2022-07-27 16:58:23 +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
Gabriel Corado df44457b02 feat: aws database configurator (#9145) 2022-02-18 21:15:54 +00:00