Commit Graph
24051 Commits
Author SHA1 Message Date
Edoardo Spadolini dc5482d6c7 RFD 213 - Relay, a lightweight tier 2 proxy (#54603)
* RFD 213 - Relay, a lightweight tier 2 proxy

* clarify review questions

* Simplify wording, divide servers into clients/agents/relays

* no relay to proxy tunnels, default relay address on login, cleanups

* cspell

* required approvers

* separate listeners for ssh transport and kube sni routing
2025-09-25 13:37:13 +00:00
3294453ac4 MWI: HTTP Proxying App Access service (#59064)
* Initial implementation of an HTTP Proxy implementation for TBot

* Added caching feature, caching config option & tests

* Rework httpClient; Rework insecureSkipVerify; Remove whitelist; Improved Error Handling;

* Move proxyPing to startProxy

* Remove old Application whitelist reference

* Review comments

* fix header issue, improve tests a bit

* Fix passing path; Improve testing

* add query passing; add tests for it

* Merge contexts of request

* Use service ctx as base context for http server

* Simplify creation of upstream request

* Add TODO around determing correct URL to use when connecting upstream

* Add TODO on checking ALPN upgrade

* Block CONNECT requests

* Add TODO around caching whole http client

* Add note on public address of app

* Fix upstream request host/scheme

* Tidy

* Fix logging to guidelines

* Add support for ALPN upgrade

* A little tidying

* Add GoDocs for the service config

* Setup fncache with correct interval

* Add GoDoc

* Remove redundant otel tracer

* Add tests for config

* Fix lint issues

* Update config golden file

* Fix test

* Add license headers

* proxy_service_config.go -> proxy_config.go

* Update lib/tbot/services/application/proxy_service_test.go

Co-authored-by: Dan Upton <[email protected]>

* Add note on h2c/http2

* Remove  spurious line

* Add godocs

* Replace context.Background() with t.Context() in test

* Add GoDOc for ProxyServiceType

* Update ports in example to not clash with postgres

* Add CLI command

---------

Co-authored-by: Thijs Cramer <[email protected]>
Co-authored-by: Dan Upton <[email protected]>
2025-09-25 13:08:12 +00:00
Grzegorz Zdunek 7d09a9f6aa Do not enter background mode on quitAndInstall (#59574) 2025-09-25 12:49:40 +00:00
Nick Marais a45e9b2700 feat: List bot instances version and hostname sort (#59263)
* Add version and hostname indexes to cache

* Add `ListBotInstancesV2` rpc and use request options

* Add v2 bot instance list endpoint

* Use v2 endpoint in web UI

* Pass signal through to support aborting requests

* Fix comment typo

* Rename util func

* Deprecate `ListBotInstances` rpc

* Encode hostname in cache key

* Address pre-release sorting in version numbers

* Rename bot instance cache utils

* Fix lint deprecation warnings

* Extract filter fields to message

* Replace `fmt.Sprintf("%06d", ...)`

* Update invalid sort field error

* Fallback to v1 endpoint if possible

* Use `strcase` for case-insensitive compare

* Backend results are filtered by bot name so no need to re-filter in `MatchBotInstance`

* Revert "Replace `fmt.Sprintf("%06d", ...)`"

This reverts commit 2fbd79742a.
2025-09-25 11:46:23 +00:00
Edoardo Spadolini e1102466ae Relay peering client and server (#58854)
* proto: relay peering messages

* make grpc

* Relay peering server and client

* fallible client creation, comments

* server comments
2025-09-25 10:19:36 +00:00
Dan Upton e8400418c8 MWI: Customizable Argo CD cluster name template (#59541)
* MWI: Customizable Argo CD cluster name template

Resolves #58551, by reproducing `tsh`'s `--set-context-name` flag's behavior.

changelog: MWI: The `kubernetes/argocd` output now supports customizing cluster names with a template

* Fix linting issue
2025-09-25 09:01:22 +00:00
dependabot[bot]andRafał Cieślak 0d9e10fb24 Bump tar-fs from 3.1.0 to 3.1.1 (#59552)
* Bump tar-fs from 3.1.0 to 3.1.1

Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.1.0 to 3.1.1.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Revert unnecessary updates

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rafał Cieślak <[email protected]>
2025-09-25 08:57:50 +00:00
Luke Okraszewski 5e8bc92c42 [api] Add ListTrustedClusters (#59484)
This commits deperecates GetTrustedClusters, which
should be replaced by a paginated counterpart:
ListTrustedClusters

Towards: gravitational/teleport.e/issues/6759
Changelog: Add paginated API ListTrustedClusters, deprecate GetTrustedClusters
2025-09-25 08:48:12 +00:00
Bernard Kim 1cbbb5355e Web: Add ScheduleEditor component (#59103)
* Add ScheduleEditor component

* Use !important to override select creatable styles

* Init ordered record of shifts

* Fix lint

* Use lowercase exports

* Avoid useTheme

* Use 12-hour labels

* Show border on hover and focus

* Add test case for custom time input

* Move to shared/components dir

* Fix lint
2025-09-25 04:41:09 +00:00
Tim Buckley 41d1375b3f Add a caching OIDC validator for use with Kubernetes OIDC (#57862)
* Add a caching OIDC validator for use with Kubernetes OIDC

This adds a generic caching OIDC validator which is initially used
to cache Kubernetes OIDC requests. This takes a simpler approach to
the one explored in #57789 and explicitly caches the two resources
in question:
- We cache the OIDC discovery configuration for an hour
- We cache the JWKS keyset for 24 hours, and additionally allow the
  library to cache internally. It currently has no internal method
  for invalidating old keys, so we purge the `oidc.KeySet` regularly.
  However, upon encountering an unknown `kid`, the library will
  attempt to fetch new keys on its own.

This validator is designed to be generic and should be easy to
apply to other users of our existing OIDC helper.

* Manage validator instances by issuer; use in Kubernetes validator

This adds an indirection layer to automatically manage validator
instances as cached data is specific to a particular (issuer,
audience) combination.

Additionally, this swaps the new caching validator in in place of the
standard non-caching validator.

* Fix comments and add missing mutex lock

* Add tests for the caching validator

* Fix lints

* Add logging

* Fix imports

* Code review suggestions: atomic expiry, misc fixes

This changes `validatorExpires` to be an atomic int64, which removes
a locks from `Expires()` / `IsStale()` and ensures an ongoing pruning
won't block `ValidateToken()`.

* Replace validator cache and pruning with `utils.FnCache`

This swaps the hand-rolled cache for validators with utils.FnCache,
since it's more robust and its TTL mechanism works properly for our
needs.

* Remove commented out test code

* Fix build errors and enable ReloadOnErr

* Code review suggestions
2025-09-25 02:01:40 +00:00
Vadym PopovandEdoardo Spadolini 4c7ad913e2 Add teleport-tools package for use with client tools managed updates (#58685)
* Add `teleport-tools` package to be used by client tools managed updates

* Add runtime check

* Update lib/autoupdate/tools/utils.go

Co-authored-by: Edoardo Spadolini <[email protected]>

* Use general `version.EnsureSemver` for semantic version parsing

---------

Co-authored-by: Edoardo Spadolini <[email protected]>
2025-09-24 21:57:22 +00:00
Rana Ian 0920363895 Refactor healthcheck for Kubernetes extensibility with HealthChecker interface (#59396)
The main intent of refactoring is to provide health check extensibility for Kubernetes while supporting the existing DB health checks. A `HealthChecker` interface is added to support the different health check approaches of DBs and Kubernetes. Existing DB TCP health check logic is moved to a new `TargetDialer` struct.

Changes:
- Added `HealthChecker` interface with two functions:
    - `CheckHealth(ctx context.Context) ([]string, error)`
    - `GetProtocol() types.TargetHealthProtocol`
- Added `TargetDialer` struct which encapsulates existing TCP health check logic
- Changed `Target` struct to use the `HealthChecker` interface
- Changed `worker.checkHealth` to call the new `CheckHealth` function
- Removed a `protocol` field from `healthCheckConfig`
- Added `TargetHealthProtocolHTTP` for use with Kubernetes health checks
- Moved and renamed test `Test_dialEndpoints` to `TestTargetDialer_dialEndpoints`
- Added files `net.go` and `net_test.go` for `TargetDialer`

Part of #58413
2025-09-24 21:31:07 +00:00
Paul Gottschling 163974ddf3 Bump shared-workflows ref in Lint (Docs) (#59330)
Use the commit that corresponds to gravitational/shared-workflows#393,
which fixes a bug in the workflow that rejects a PR that changes a
section index page to a regular docs page.
2025-09-24 20:53:18 +00:00
Paul Gottschling d25659bd33 Tag docs pages with access-requests (#59538)
Using Teleport for just-in-time Access Requests is a common use case.
Tag pages with this use case so users can find related pages when
looking for Access Request-related content.
2025-09-24 19:47:04 +00:00
Andrew Burke 90d5d402c8 Fix uacc linting on mac (#59271) 2025-09-24 19:32:37 +00:00
Zac Bergquist 80bbf6fa8f Pin tool versions using Go tool deps (#59540)
* Pin tool versions using Go tool deps

Use versioned tools rather than installing @latest on every run.
This ensures consistency across developer machines and can also
help protect against supply chain attacks.

Updates usages of gci, goda, and gotestsum.

* make go-generate
2025-09-24 19:18:56 +00:00
Paul Gottschling df666a4d53 Ensure docs pages have intro paragraphs (#59542)
Prepare the docs for the intro paragraph linter proposed by
gravitational/docs-website#383. This replaces the Vale-based intro
paragraph linter, which cannot be ignored in comments due to the `raw`
scope, with one based on `remark`, which can.

- Add an intro paragraph to each Terraform data source reference. To do
  so, edit the data source template to use the approach of the resource
  template, including an intro paragraph with the data source's name.
- Ignore the page-structure linter in the changelog. This needs to
  happen before the frontmatter block, since, because of the way
  `remark-includes` works, AST node line numbering is preserved within
  included partials.
- Get the Device Trust Concepts guide to conform to the expected
  structure. Currently, it begins with an Admonition, leaving it unclear
  what the guide is about.
- Remove the Vale linter for intro paragraphs, since we will add a
  `remark`-based linter in gravitational/docs-website#383.
2025-09-24 17:42:11 +00:00
Ryan Clark eb5aff278d Handle sessions that do not have metadata but do have a summary (#59297)
* Handle sessions that do not have metadata but do have a summary

* Wrap ssh player in the container
2025-09-24 17:01:38 +00:00
Pawel Kopiczko e0d1cd811c Log kind with all Reconciler logs (#59503) 2025-09-24 15:04:04 +00:00
Noah Stride 7d918d4fb8 Fix persistence of metadata.description for Bot resource (#59524) 2025-09-24 13:49:52 +00:00
Steven Martin 14a493bce8 docs: update urls that do not resolve (#59532) 2025-09-24 12:22:43 +00:00
Rafał Cieślak efd1caec8c Unified resources card: Add gap between name and button (#59416) 2025-09-24 08:33:51 +00:00
Grzegorz Zdunek 05f0c89b9d Remove access requests from clusters service (#59434)
* Remove `ClustersService.getAssumedRequests`

* Add react-query and fetch requests with it

* Adjust callsites

* Remove `ClustersService.getAccessRequest`

* Improve comments

* Fix optional chaining

* Expand stories and tests
2025-09-24 08:08:53 +00:00
64f6154301 Fix discrepancies between Node and Proxy recording modes. (#58707)
* Fix usage of node server ID and proxy host UUID in the forwarding server.

* Make GetInfo and TargetMetadata consistent between the forwarding and regular server.

* Rename TargetMetadata to EventMetadata and only use it for events' ServerMetadata.

* Remove unused method.

* Resolves comments on test.

* Remove unused fields.

* Update lib/srv/ctx.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update integration/integration_test.go

Co-authored-by: rosstimothy <[email protected]>

---------

Co-authored-by: Zac Bergquist <[email protected]>
Co-authored-by: rosstimothy <[email protected]>
2025-09-23 23:45:20 +00:00
rhammonds-teleportandZac Bergquist aea0077030 Desktop Access: Fix Stack Overflow (#59502)
* Fix stack overflow that occurs when the audit compactor encounters a shared directory read/write event of length zero, which commonly occurs when the client returns an IO error.

* Add some clarity to zero-length audit compaction test case

* In the case that we combine enough read/write events such that the length exceeds the maximum value of a uint32, emit an audit event where length is math.MaxUint32 rather than whatever a raw cast might give us.

* Apply suggestions from code review

Co-authored-by: Zac Bergquist <[email protected]>

---------

Co-authored-by: Zac Bergquist <[email protected]>
2025-09-23 23:41:00 +00:00
Edoardo Spadolini a5c5444894 Relay tunnel client and server (#58755)
* proto: relay tunnel messages

* make grpc

* Relay tunnel server and client

* Explain tls and yamux configs

* clarify logger adapter

* clarify reserved fields

* Clarify serverConn selection logic

* add a todo to handle the control stream messages more efficiently
2025-09-23 21:28:15 +00:00
Travis Rodgers 6af771c874 docs: relocate SCIM integration section under Identity Governance (#59501)
The SCIM integration lived at `/docs/zero-trust-access/management/guides/scim/` under zero trust access. But these docs are about Access Lists so should live under Identity Governance as an integration. This PR moves this section into identity governance at `/identity-governance/scim/`, fixes a few breaking links due to the change, and add the appropriate redirects.
2025-09-23 20:04:12 +00:00
STeve (Xin) Huang 6786bd00d8 [discover] add unguided enrolment for MCP Servers (#58880)
* [discover] add unguided enrolment for MCP Servers

* remove demo
2025-09-23 19:57:27 +00:00
Hugo Shaka 5960070fd3 Move autoupdate version resolving logic in a separate package (#59432)
* Move autoupdate version resolving logic in a separate package

* fixup! Move autoupdate version resolving logic in a separate package

* apply edoardo's feedback
2025-09-23 19:52:53 +00:00
Paul Gottschling 9c9d88972c Tag docs pages with teleport-as-idp (#59490)
Using Teleport as an IdP is a use case we want to promote. Tag pages
with this use case so users can find related pages when looking for
Teleport-as-IdP content.
2025-09-23 19:09:08 +00:00
Paul Gottschling 184b419e31 Tag pages with "ci-cd" (#59487)
Using Teleport to protect CI/CD pipelines is a common use case. Tag
pages with this use case so users can find related pages when looking
for CI/CD content.
2025-09-23 19:06:07 +00:00
Paul Gottschling 9d0fca9bcd Remove unused partials (#59438)
Use the following command to find and delete partials that are not
included in any page in the docs:

```
find docs/pages/includes -name "*.mdx" -exec \
  bash -c 'grep -Rq {} docs/pages || git rm {}' \;
```
2025-09-23 17:24:19 +00:00
Paul Gottschling 7c62986959 Simplify Kubernetes Operator reference index page (#59433)
The current list of guides is long and difficult to navigate. Instead,
include a description of the section, recommend reading the Managing
Resources guides for typical patterns, and indicate that there is one
guide per resource version.

Another possibility would be to make the list of reference docs easier
to navigate by formatting it as a table of resource names and
descriptions. However, we currently do not include descriptions of
resources when generating CRDs from resource proto messages.
2025-09-23 17:14:39 +00:00
Marek Smoliński 667ca241a4 Add utils/batcher state (#59457) 2025-09-23 15:52:01 +00:00
Ben Arent 6d13965820 Update session summaries docs for Enterprise editions (#59293)
* Update session summaries docs for Enterprise editions

Clarifies that Session Recording Summaries are currently available only to Teleport Enterprise (Self-Hosted) customers, with Cloud support coming soon. Updates prerequisites and feature notes to distinguish between Self-Hosted and Cloud editions, and adds information about early preview availability for Cloud customers. Also clarifies that the feature uses a Large Language Model.

* tpyo

* Clarify that this is feature is disabled by default

* s/AWS Bedrock/Amazon Bedrock
2025-09-23 14:52:24 +00:00
Krzysztof Skrzętnicki 3e91db0419 Append project ID-based suffix for GCP Postgres databases (#58940)
* Automatically append `@<project-id>.iam` suffix to
the username for GCP Postgres databases (CloudSQL, AlloyDB).

* Apply project ID suffix in the engine

* drop engine-side fix

* add web UI fix

* extract common helper

* sort imports
2025-09-23 13:32:09 +00:00
Gus Luxton 2fd280dc1a install-node.sh: Make Teleport process checking more robust (#59452) 2025-09-23 13:16:42 +00:00
Noah Stride cf265e2ffe Fix tctl marshaling of Bot resource (#59477) 2025-09-23 08:45:37 +00:00
Noah Stride 0b000b6d28 Remove DevBox (#59455) 2025-09-23 07:49:19 +00:00
Lisa Kim 3cfad50bf5 Web: add read-only styles to user input components (#57153) 2025-09-23 05:43:20 +00:00
Gabriel Corado 78fe72fc03 Add initial support for generating MCP configuration for VSCode and Claude Code (#57469)
* feat: add initial config generation for vscode and claude code

* chore: fix lint

* refactor(tsh): move vscode and claude-code to a separate flag

* refactor(mcp): update format flag work to raise error on format mismatch

* refactor(mcp): revert run mcp changes

* refactor(mcp): code review suggestions

* fix(mcp): picking the incorrect config format

* chore(tsh): use raw config format string

* fix(config): match claude-code config file

* fix(tsh): solve format alias
2025-09-23 01:16:50 +00:00
Brian JoergerandSTeve Huang 72855b6095 Fix session ID env var handling for joining sessions (#59294)
* Refactor server session ID logic; Separate join and open session flows.

* Remove unused client node session ID.

* Fix backwards compatibility.

* Fix tests and lint.

* Update deprecation TODO.

* Fix failing test caused by delayed association with join session.

* fix session ID for git events

---------

Co-authored-by: STeve (Xin) Huang <[email protected]>
2025-09-23 00:37:22 +00:00
Hugo ShakaandEdoardo Spadolini 428ecd4385 include hostID in app access error (#59390)
* include hostID in app access error

* Update lib/srv/app/transport.go

Co-authored-by: Edoardo Spadolini <[email protected]>

---------

Co-authored-by: Edoardo Spadolini <[email protected]>
2025-09-22 20:55:14 +00:00
Hugo Shaka ab4605843e tctl oidc helper (#58455)
* Add `tctl tokens configure-kube` helper

* address feedback
2025-09-22 20:42:45 +00:00
Marek Smoliński 90ec1c8110 Add event batcher for collecting events over a time window (#59415) 2025-09-22 17:42:32 +00:00
Marco Dinis a961d9491f Add env param to SSM Doc used for EC2 auto discovery (#59047)
This PR adds a new param, `env` which will be used to inject environment
variables into the script.

This will be useful for injecting the TELEPORT_INSTALL_SUFFIX and
TELEPORT_UPDATE_GROUP used by `teleport-update` and, soon, `teleport
install autodiscover-node` command.
2025-09-22 16:45:15 +00:00
Paul Gottschling d6da0f434a Clarify self-hosted Enterprise starter guidance (#59033)
* Clarify self-hosted Enterprise starter guidance

Closes #8547

Make it more explicit in the self-hosted Teleport Enterprise index page
that self-hosted deployents start with outreach to the Teleport team,
and that the HA guide and multi-region blueprint are outlines to help a
team plan a deployment that a customer designs in conversation with the
Teleport team.

Otherwise, the implication is that the guides listed on the self-hosted
Teleport Enterprise index page are sufficient for deploying a
self-hosted cluster. There has been a longstanding request for Oracle
Cloud guidance, and rather than expect these users to be self
sufficient, explain that the recommended approach is to reach out to
Teleport and model a deployment based on our architectural outlines.

Some new text in the self-hosted Enterprise index page is based
on #57931.

* Edit the self-hosted Teleport Enterprise intro

Respond to internal feedback by **pschisa**. The multi-region blueprint
is recommended only for a select group of organizations with specific
needs. For the general introduction, link only to the single-region HA
guide.
2025-09-22 16:25:52 +00:00
Paul Gottschling 6b6f57fdf1 Clarify configs in self-hosted Event Handler guides (#56937)
* Edit self-hosted Event Handler guides

Closes #38184

Prevent users from using example Event Handler configurations without
modifying the placeholder values. Remove placeholder values from example
Event Handler configs and add them to the comments accompanying the
modified fields.

Exceptions are if the accompanying guide does not explain the
placeholder, e.g., `serviceType` and the `log` section. In these cases,
we expect users to copy the placeholders and use them as they are.

Skip purely hosted Event Handler guides, which don't include
instructions for configuring the Event Handler.

Note that in the MS Teams guide, the TOML example includes clear
placeholders to indicate format, and this change leaves these in.

Also note that some guides, like the PagerDuty guide, include an example
of the final config files after providing lists of instructions. This
change does not touch the example configs in this case.

* Respond to kopiczko feedback

- Fill in missing examples.
- Consistently place comments above configuration fields.
- Use Cloud domain in the email Helm example.
2025-09-22 16:24:41 +00:00
Paul Gottschling 1ef8d8aca6 Make the Terraform starter guide more visible (#59375)
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
2025-09-22 13:34:35 +00:00
Steven Martin f0455ec052 docs: use automatic toc for ig idps (#59371) 2025-09-22 12:48:45 +00:00