Commit graph

10 commits

Author SHA1 Message Date
Reed Loden 23c67d4c16
Re-enable AWS IMDSv1 fallback (#39363)
It was discovered that some customers' EKS clusters did not have their IMDSv2 hop limits
set correctly, causing requests for key functionality to attempt IMDSv1 fallback and failing.

For now, re-enable IMDSv1 fallback by way of removing the explicit disabling of
`EC2MetadataEnableFallback` until better documentation, error handling, and other work
can be done to inform customers that they need to correctly set their IMDSv2 hop limits.
2024-03-14 18:12:50 +00:00
Reed Loden b72d4e1032
Disable AWS IMDSv1 fallback and enforce use of FIPS endpoints (#34170)
Two changes to AWS SDK usage:

Teleport should never use AWS IMDSv1 for requests, so disable the
ability to fallback to it, as it could be a malicious attempt to
downgrade security.

Teleport generally prefers FIPS endpoints when in FIPS mode, but
there were a few places that were not selecting the FIPS endpoints.
Ensure that the FIPS endpoints if BoringCrypto is being used.
2023-11-09 21:53:25 +00:00
Reed Loden 1a9c026741
Convert examples/teleport-usage to use distroless image (#32532)
Standardize `examples/teleport-usage` to use the same base image
and other (general) build commands as `integrations/kube-agent-updater`
and `integrations/operator`.

The main change is moving from `debian:stable-slim` to `distroless/static-debian12`.
2023-09-27 15:26:08 +00:00
Jakub Nyckowski 78a26a1390
Update Golang Docker images to v1.21 (#30221)
The Golang Docker images used in 'build.assets/Dockerfile-grpcbox' and 'examples/teleport-usage/Dockerfile' have been updated from version 1.20 to version 1.21.
2023-09-08 20:20:58 +00:00
rosstimothy 6b26d5712a
Fix rough edges with usage script (#29003)
When the script detects throttling it automatically scales the RCU,
however it was allowing the RCU to reach 0 which is an invalid
value. Any subsequent requests with a 0 RCU end up terminating the
script due to errors from the request. The RCU is no capped at a
minimum value of 1 to prevent this.

CredentialsChainVerboseErrors is now set in the aws.Config to provide
more actionable error messages when credentials are not configured
correctly. Users who had authentication issues would previously see
the following:

> 2023/07/11 16:50:25 NoCredentialProviders: no valid providers in chain. Deprecated.
>	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

By setting the config value to true users will now see more detailed output:

> 2023/07/12 10:56:06 NoCredentialProviders: no valid providers in chain
> caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
> SharedCredsLoad: failed to load profile, .
> EC2RoleRequestError: no EC2 instance role found
> caused by: RequestError: send request failed

The README was also updated to include instructions on how to authenticate
and run the script from outside the Auth server if they so choose.
2023-07-13 23:03:42 +00:00
Yael Jay Perez a81210b5dc
Update to Readme for Teleport Usage (#24899)
* Update to Readme for Teleport Usage

Cleaning up the Readme. Removing the prompt option as it is no longer an option. Also clarifying where to find the container image version. Lastly, reordered the docker command to be backwards compatible on Docker.

* Update examples/teleport-usage/README.md

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Update examples/teleport-usage/README.md

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-06-07 16:36:48 +00:00
Mike Jensen a410acef01
Dependency updates for examples (#26947)
* Bump golang.org/x/net in /examples/desktop-registration

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go in /examples/teleport-usage

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.224 to 1.44.269.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG_PENDING.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.224...v1.44.269)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /examples/service-discovery-api-client

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.55.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.55.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/google/uuid from 1.1.2 to 1.3.0 in /examples/go-client

Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.2 to 1.3.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.2...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /examples/api-sync-roles

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.55.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.55.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/stretchr/testify in /examples/teleport-usage

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/docker/docker in /examples/service-discovery-api-client

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.6+incompatible to 24.0.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.6...v24.0.1)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump k8s.io/apimachinery in /examples/api-sync-roles

Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.3 to 0.27.2.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.26.3...v0.27.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump k8s.io/client-go from 0.26.3 to 0.27.2 in /examples/api-sync-roles

Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.26.3 to 0.27.2.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.26.3...v0.27.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 22:26:10 +00:00
Yael Jay Perez a35383ad2f
Add SSL Certificates to Usage Script (#24443)
* Added SSL Certificate install

* Update examples/teleport-usage/Dockerfile

Co-authored-by: Russell Jones <russjones@users.noreply.github.com>

* Update examples/teleport-usage/Dockerfile

Co-authored-by: Russell Jones <russjones@users.noreply.github.com>

---------

Co-authored-by: Russell Jones <russjones@users.noreply.github.com>
2023-04-14 20:40:29 +00:00
Logan Davis 6d4575affd
Update Teleport Usage README container image badge (#24421)
This PR adds a Container Image badge to allow users to check out the latest published image for the teleport usages script.

CC: @yjperez
2023-04-11 21:13:58 +00:00
Joel 884a95cc10
Teleport Usage Script (#23304)
* draft go script

* print end stats

* remove empty

* default start date

* prios

* todo

* update ratelimiter algo

* add comments

* dockerfile stuff

* include image workflow

* use official product names

* comments + rephrase output

* fix various script bugs

* feedback

* wording

* show users option

* use multistage to reduce image size

* make throttle error handling stable

* lowercase fns

* set go.mod to 1.19 to match main project

* Update examples/teleport-usage/main.go

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>

* exp ratelimit

* okay, seems binary search throttling is best

* add test coverage for ratelimiter

* add span test

* remove unused const

* use custom retry passby

* update flaky tests ci

* split job

* fix makefile

* oops

* run tests in integration job

* go mod tidy

---------

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>
2023-03-22 16:36:21 +00:00