Commit Graph
29 Commits
Author SHA1 Message Date
Marco DinisandRoman Tkachenko 54cdfb6895 AWS OIDC: Ping rpc and endpoint (#45702)
* AWS OIDC: Ping rpc and endpoint

* Update lib/integrations/awsoidc/ping.go

Co-authored-by: Roman Tkachenko <roman@goteleport.com>

* Update integration.go

---------

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2024-08-23 07:35:15 +00:00
STeve (Xin) Huang f240bfb312 Amazon DocumentDB access part 1 (#43867)
* Amazon DocumentDB access part 1

* fix lint

* make derive
2024-07-16 15:17:06 +00:00
Alan Parra 435a21badc chore: Bump AWS modules (#42316)
* chore: Bump AWS modules

* Tidy all modules

* Accept the "eu-isoe-west-1" AWS region as valid
2024-06-03 19:05:30 +00:00
STeve (Xin) Huang 6684370580 Improve error message when auto-user provisioning fails on reader endpoints (#37557)
* Improve error message when auto-user provisioning fails on reader endpoints

* fix lint
2024-02-08 19:48:07 +00:00
Zac Bergquist 44a6bb1933 Use pkg slices from the standard library (#35905)
Prefer the stdlib version of the experimental package.
Includes a depguard update to prevent future regressions,
as well as an e-ref update to appease depguard.

Generated with:

    $ gofmt -w -r '"golang.org/x/exp/slices" -> "slices"' . && \
        make fix-imports
2023-12-19 23:06:53 +00:00
rosstimothy d5a796c056 Enable testify lint (#34222)
Updates our golangci-lint configuration to enable testifylint and
fixes all issues found.

Bump e ref to include gravitational/teleport.e#2567
2023-11-06 20:38:38 +00:00
Nic Klaassen 8421f0b875 feat: generate randomized ExternalCloudAudit config (#33555) 2023-10-20 19:15:45 +00:00
Marco André Dinis 44209ce8dc DiscoveryMatchers: move checkandset to types package (#32857)
* DiscoveryMatchers: move checkandset to types package

* add opensearch to iamrole as users
2023-10-04 13:48:09 +00:00
STeve (Xin) Huang 76e5747baf Validate unknown AWS regions from discovery matchers (#31533)
* Validate unknown AWS regions from discovery matchers

* move and simply regex check
2023-09-13 15:54:41 +00:00
Forrest 4e66a6fc67 support case-insensitive routing option (#29320)
* support case-insensitive routing option

* update docs
2023-08-17 00:48:19 +00:00
STeve (Xin) Huang 116d88063c Database Service to validate URL of database resources from Discovery Service (#30054)
* url checker

* add ut

* add comment in test plan

* warnOnError only when err is not nil

* fix typos etc.

* enable metadata service permission for discovered databases

* add a debug log when azure db url is validated
2023-08-10 16:48:08 +00:00
Marco André Dinis 37243f8fa4 Script to configure IAM for the DeployService (#28436)
* Script to configure IAM for the DeployService

* use any instead of interface{}

* fix test typo
2023-07-04 15:10:00 +00:00
Mike Jensen 3f6e26ae07 Fuzzing test improvements (#28066)
* Remove lib/fuzz

These fuzz targets are already configured elsewhere.  oss-fuzz targets are configured in `fuzz/oss-fuzz-build.sh`

* aws_test.go: Add FuzzParseSigV4

This adds (and enables in oss-fuzz) a new fuzz test case (and seed) for aws.go's ParseSigV4

* api/types/fuzz_test.go: Add fuzzing seeds

* api/utils/aws/fuzz_test.go: Add basic seeds to get broad coverage

* api/utils/azure/fuzz_test.go: Add seeds and enable in oss-fuzz

* lib/utils/parse/fuzz_test.go: Add fuzzing seeds

* Add opensearch fuzzing to oss-fuzz

* lib/srv/db/redis/connection/fuzz_test.go: Add fuzzing seeds

* lib/kube/proxy/fuzz_test.go: Add fuzzing seeds

* lib/srv/regular/fuzz_test.go: Add Fuzzing Seeds

* lib/utils/fuzz_test.go: Add fuzzing seeds
2023-06-20 16:14:15 +00:00
Krzysztof Skrzętnicki 1b69fbcbed OpenSearch AWS autodiscovery (#27537)
* OpenSearch AWS autodiscovery

* Normalize description, check err.

* Fix tests.
2023-06-16 12:56:53 +00:00
Krzysztof Skrzętnicki 2af9d76ec0 AWS-hosted OpenSearch support (#23305)
* AWS-hosted OpenSearch support.

* Review: comments, case, cleanup.

* Review: comments, region discovery, typos, shared func, fix error type, fix empty CA case.

* Review: address comments.

- add docs
- refactor opensearch engine code
- make `opensearchsql` default client
- drop utils.CloneRequest function, it is not suitable for general use
- drop "extra args" functionality, it should be a separate PR and more generic
- minor refactorings

* Fix: linting, refactoring issues.

* Review: update the comment for accuracy.

* Correct merge issue.

* Review: reuse transport, use different context, rename tests

* Review: unexport internal error types, explicitly test the error serialization.
2023-04-13 06:14:39 +00:00
Gavin Frazar 3f0ef9f0ed improve aws utils and database validation (#23157)
* log a warning when an invalid AWS IAM role ARN is filtered out
* add tests for nested role arn path and remove superfluous test parallelism
* add extra godoc info for BuildRoleARN
* improve mock IAM error messages
  - Failing tests' error messages were not specific enough to know what
    happened.
* refactor code to call GetAWS() once
  - Avoids constantly fetching a full copy of the AWS metadata.
  - Reduces verbosity of code.
* reuse MetadataFromRedshiftCluster in meta fetcher
  - Avoids repeating the same logic inside the fetcher.
* improve database-access DynamoDB config checking
  - Don't early return from database CheckAndSetDefaults so AWS account ID
    is checked properly, and any other future checks added will apply to
    DynamoDB as well.
* add aws utils for parsing AWS IAM roles
  - ParseRoleARN will parse an AWS ARN and verify that it is a valid
    AWS IAM Role resource
  - CheckARNPartitionAndAccount is a helper that verifies an ARN partition
    and account ID matches the caller's expectations.
* use cmp.Diff instead of require.Equal in db tests
  - require.Equal spams a lot of protobuf noise.
  - cmp.Diff yields a precise, readable diff on test failure.
2023-03-17 00:45:25 +00:00
Gavin Frazar 5c752c4df8 Fixup teleport db configure create (#20968)
* add missing flags
* fix config generation bugs
* always wrap generated strings value in quotes
* parse and check generated config
* update tests for db agent config gen
2023-02-11 00:54:07 +00:00
Gavin Frazar 5bb0ef15db add dynamodb database access (#18843)
* Add a new db engine
* Add tests for new engine
* Update tsh db subcommands
* Refactor error message and suggestions for unsupported tsh commands
* Add dynamodb to test plan
* Add AWS external ID to db config and update protos
2022-12-30 18:22:30 +00:00
Marco André Dinis 6286488be3 Database: validate AWS Account ID (#19638)
When the AWS Account ID is provided, we must check that it is a valid
one.

AWS Account ID is a well documented field: 12-digit string

This check is meant to prevent typos when creating Databases mainly from
the Web UI in the context of Teleport Discover.
2022-12-28 12:42:39 +00:00
Steven Martin e1ebc332f8 spell fixes (#19419) 2022-12-16 19:01:28 +00:00
STeve (Xin) Huang f2cf36a450 AWS Redshift Serverless engine support (#18651) 2022-12-01 15:36:48 +00:00
STeve (Xin) Huang 4c943c671c Fix issue self-hosted databases with ec2 hostnames fail to create (#18711) 2022-11-24 14:37:18 +00:00
STeve (Xin) Huang 1b0a083b9d Database access AWS RDS Proxy support (#17005) 2022-10-31 15:21:31 +00:00
Marek Smoliński 7aa224e430 Add Cassandra/Scylla database support (#15895) 2022-10-10 12:37:51 +02:00
d8c9b08001 Support China and GovCloud for database access (#15359)
Co-authored-by: waylen <waylen.guo@gmail.com>
Co-authored-by: Jianghui Guo <89057156+waylenguo@users.noreply.github.com>
Co-authored-by: STeve (Xin) Huang <huangin52@gmail.com>
2022-08-16 18:42:18 +00:00
Norbert SzeteiandZac Bergquist 0ab9716aac oss fuzz integration (#13473)
* Update api/types/fuzz_test.go
* do not fail if the file is missing
* missing go-118-fuzz-build fix

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2022-06-18 21:28:07 +00:00
STeve (Xin) Huang 85016a9a3e MemoryDB support (#13069) 2022-06-14 19:09:31 +00:00
STeve (Xin) Huang 5c6deb7d9d ElastiCache support - the basics (#12209) 2022-05-13 15:09:20 +00:00
STeve (Xin) Huang fd12e934ee RDS & Redshfit support for AWS China regions (part 1?) (#10560) 2022-03-25 17:40:51 +00:00