Commit Graph
26798 Commits
Author SHA1 Message Date
rosstimothy c7a82f9325 Use text template for installer script rendering (#67136)
Render `/webapi/scripts/installer/:name` responses with the text
template engine instead of the HTML template engine. The endpoint emits
shell script content, so HTML entity escaping can corrupt rendered values
containing characters such as `&`, `<`, or `>`.

Resolves https://github.com/gravitational/pressure-washing/issues/195.
2026-05-27 19:33:21 +00:00
Sakshyam Shah 545e5dd372 delete unused ErrMissingDeltaToken (#67131) 2026-05-27 18:21:45 +00:00
Hugo Shaka 725707a917 Add scoped bot support to Terraform (#66961)
* Add scoped bot support to Terraform

* Document scoped bot

* Remove useless fixture + make scope part of RFD 153
2026-05-27 17:04:17 +00:00
Marco Dinis 9fdb5effb6 Fix Azure/GCP IMDS tests when HTTP_PROXY is set (#66996) 2026-05-27 15:42:17 +00:00
Steven Martin b95d7667a8 docs: Fix beams role example (#67123) 2026-05-27 14:52:01 +00:00
STeve (Xin) Huang c2307ccd04 Merge branch 'master' of github.com:gravitational/teleport into STeve/vnet_process_app_https_tunnel (#66451) 2026-05-27 14:44:32 +00:00
STeve (Xin) Huang ae4ea74ad8 Spinner for "tsh beams add" (#66881)
* "tsh beams add" with spinner

* add recconect message

* add example usage

* minor

* fix re-login

* address comments

* add t.Parallel
2026-05-27 14:44:30 +00:00
Tiago Silva 1eabae0285 discovery/eks: use iam:GetRole to resolve caller identity ARN (#65984)
AWS SSO sessions return assumed-role ARNs from GetCallerIdentity
(e.g. arn:aws:sts::ACCOUNT:assumed-role/AWSReservedSSO_Admin_.../session)
but the corresponding IAM role lives at a path that includes the SSO
home region:
  arn:aws:iam::ACCOUNT:role/aws-reserved/sso.amazonaws.com/REGION/AWSReservedSSO_Admin_...

The region component is not present in the STS ARN and cannot be
inferred by string manipulation, so the previous convertAssumedRoleToIAMRole
approach produced an incorrect ARN for SSO credentials, causing EKS
access entry creation to fail.

Fix this by adding iam:GetRole to the AWSClientGetter interface and
calling it with the role name extracted from the assumed-role ARN.
IAM accepts just the role name (no path required) and returns the
full ARN including the correct path. convertAssumedRoleToIAMRole is
retained as a fallback for cases where iam:GetRole is unavailable.

Signed-off-by: Tiago Silva <[email protected]>
2026-05-27 14:37:22 +00:00
Alan Parra 049a635379 Refactor duplicated CA override logic into lib/subca (#67023)
* Refactor duplicated CA override logic into lib/subca

* Make getClientCert resilient to trailing PEM whitespace

* Drop a.subCAEnabled from lib/auth/ca_override.go
2026-05-27 14:32:19 +00:00
Gabriel Corado d579d342b2 Add SSE events read/write helper functions to httplib (#67042)
* feat(httplib): read and write sse events helpers

* refactor(httplib): code review suggestions

* chore(lib): fix lint

* refactor(httplib): move to its own package and simplify names
2026-05-27 14:00:59 +00:00
Alan Parra 982315065e Remove the subca.Enabled() feature guard (#66916)
* Remove subca.Enabled() checks

* nit: Sort the resources.Handlers() map

* Remove feature checks from lib/auth

* Remove feature flag from subca.NewCAOverrideResolver()

* Delete lib/subca/feature.go

* Update godoc on NewCAOverrideResolver
2026-05-27 13:43:58 +00:00
Gabriel Corado e5c992ccc1 App service use upstream TLS options (#66454)
* feat: app service use upstream tls options

* refactor: code review suggestions

* refactor(upstreamtls): code review suggestions

* test(app): provide missing transport options

* chore(app): fix lint
2026-05-27 13:41:28 +00:00
rosstimothy 10d7a5d2db Replace FileConfig.DebugDumpToYAML with YAMLString (#66903)
Returns the marshal error to the caller instead of panicking, and
removes the unused Config.DebugDumpToYAML method.
2026-05-27 13:39:33 +00:00
Noah Stride d79bff946e Revert x/crypto ssh update (#67111) 2026-05-27 12:36:00 +00:00
Marek Smoliński 48cad6ce3f Rate limiter lib - update error (#66827) 2026-05-27 12:01:50 +00:00
Tiago Silva e6d7372b6b service: stop reconnect loop on graceful exit (#66947)
During a graceful restart (SIGHUP), the shutdown context passed to
StartShutdown has a very long timeout (MaxCertDuration). This means
ExitContext does not close until that timeout elapses, while
GracefulExitContext closes immediately when graceful shutdown begins.

reconnectToAuthService was selecting on ExitContext().Done(), so the
retry loop kept firing (with growing backoff) even after graceful
shutdown started — because ExitContext stays open throughout. Meanwhile,
connectToAuthService uses GracefulExitContext internally and returns
"context canceled" on every attempt. The net effect: register.discovery
and discovery.init never exited, Supervisor.Wait blocked indefinitely,
and the pod was stuck for the full 5m terminationGracePeriodSeconds
before Kubernetes sent SIGKILL.

Switching the select to GracefulExitContext().Done() makes the retry
loop exit as soon as graceful shutdown is initiated, unblocking the
supervisor and allowing the pod to terminate cleanly.

Signed-off-by: Tiago Silva <[email protected]>
2026-05-27 11:23:49 +00:00
Grzegorz Zdunek f06d535d8d Connect: Do not leak last terminal input in logs (#67049)
* Do not leak `lastInput` in logs

* Security hardening: use `execFile` instead of `exec`
2026-05-27 08:28:14 +00:00
Julia Ogris 18c407ca6d discovery: Fix watcher deadlock on group reassign (#67098)
Fix a self-deadlock in `(*Server).startDynamicWatcherUpdater`. When the
watcher receives an `OpPut` event for an already-tracked `DiscoveryConfig`
whose `DiscoveryGroup` no longer matches the local server, the `OpPut`
handler acquires `dynamicDiscoveryConfigMu.RLock()` for the existence
check, never releases it on the fall-through path, then calls
`dynamicDiscoveryConfigMu.Lock()`. Go's `sync.RWMutex` does not allow a
same-goroutine upgrade from read to write, so `Lock()` blocks forever.
The dynamic-config watcher goroutine wedges and no further
`DiscoveryConfig` events are processed until the process is restarted.

Mirror the sibling `OpDelete` handler: take `RLock`, read, `RUnlock`,
then branch on the membership flag, then acquire the write lock. Also
drop a duplicate "part" in the adjacent comment.

Add `TestDiscoveryServer_dynamicMatcherGroupReassign`, which drives an
`OpPut` event for an already-tracked config with a non-matching group,
then sends an unrelated event and asserts forward progress. Without
the fix the test times out at 30s with the watcher goroutine blocked
on `Lock()`.
2026-05-27 05:40:04 +00:00
Tiago Silva c6582f9d42 Update CLI reference docs and lint filters (#67058)
Expand the CLI docs lint trigger to cover all files under tool command
directories.

Signed-off-by: Tiago Silva <[email protected]>
2026-05-26 21:31:26 +00:00
Michael 3cb4f87cd3 Update e (#67093) 2026-05-26 20:44:23 +00:00
rob-picard-teleport 3e82795e7b Add vulnerability management page to docs (#66599)
* Add vulnerability management page to docs

* Fix some typos and improve language

* clarify cadence for updates, fix stylistic issues

* add govulncheck to cspell
2026-05-26 19:26:04 +00:00
rosstimothy b4955bd6a0 Fix: scoped remote conn cleanup (#66990)
The agent scope was never specified in removeRemoteConn which
prevents cleaning up tunnels when scoped resources are disconnected.
2026-05-26 19:01:34 +00:00
Hugo Shaka 6b45598430 Fix updater chart not honouring podSecurityContext (#67044) 2026-05-26 18:46:18 +00:00
Bartosz Leper adb7d2b6f9 Update database connection command in per-session MFA docs (#65986) 2026-05-26 18:43:21 +00:00
Michael 399ddddaa2 Pick edition logo at build time instead of runtime config (#66815) 2026-05-26 17:23:06 +00:00
rosstimothy b7ec3c26e6 Update AGENTS.md (#67024)
Add an additional entry to Reliability regressions to catch nil
pointer dereferences.
2026-05-26 17:22:47 +00:00
Nibras Ohin fbdece6221 chore: added package icon to be used in beams (#67072) 2026-05-26 17:06:48 +00:00
Steven Martin 9bc904545f docs: Update ldap username references (#67055)
* docs: Update ldap username references

* docs: update database config
2026-05-26 16:54:17 +00:00
Maxim ad3d0c828a fix: Filter desktop logins to granted-only in clusterUnifiedResourcesGet (#67013) 2026-05-26 16:19:57 +00:00
Alan Parra 60dc84987d Enable the Sub CA feature (#66495) 2026-05-26 14:58:57 +00:00
Paul Gottschling 407f8d83e1 Add Troubleshooting notes to Azure join guide (#66207)
* Add Troubleshooting notes to Azure join guide

Fixes #61191

- Add table of required endpoints to the Prerequisites section
- Add a Troubleshooting section that illustrates error messages that
  occur if Teleport services cannot reach the required endpoints

* Clarify the Azure join guide

- Split a long Prerequisites item (per mmcallister feedback).
- Add a URL to the table of required URLs.
2026-05-26 14:31:56 +00:00
Travis Rodgers e65cb10986 docs: spelling fix for managed updates (#66991)
This commit fixes a spelling error in the `/upgrading/agent-managed-updates/bootstrap-ec2-agent` page.
2026-05-26 13:39:10 +00:00
Paul Gottschling afdb3f16e8 Fix tctl mistake in Helm Access Graph guide (#67012)
Replace `tctl apply` with `tctl create`.
2026-05-26 13:16:02 +00:00
Paul Gottschling e9d4668d2b Fix mistakes in Jira Access Request plugin guide (#67017)
In #65190, we inadvertently introduced two small issues, which this
change fixes:

- Remove a reference to a nonexistent role. This was a mistake due to a
  find/replace operation.
- Add full permissions to the access-plugin-update role. The Jira Access
  Request plugin needs to list and read `access_plugin_data`, not just
  create it.
2026-05-26 13:13:26 +00:00
Noah Stride 68e7319fcd MWI: Scoped Kubernetes support (#66953)
* Allow scoped mode for kubernetes/v2 config

* Support scoped generation/add tests
2026-05-26 11:24:11 +00:00
Alan Parra eadd080306 Fix TestConnectivityDuringAuthRestart flakiness (#67039) 2026-05-26 09:33:38 +00:00
Nic Klaassen be383ce680 fix: avoid dns lookups in TestDiscoveryDatabase (#67027) 2026-05-25 19:40:42 +00:00
Maja 111b7c9962 Fix flaky vnetContext.test.tsx (#67037)
* Make `VnetContext` tests depend on action order rather than no of calls

* Explain the idea behind acknowledgement/dismissal being "sticky"

* Update Jest mock outside of `act`
2026-05-25 17:42:40 +00:00
Alan Parra a6b9e2fd49 chore: Bump golang.org/x/ dependencies (#67011)
* chore: Bump golang.org/x/ dependencies

* tidy

* Fix TestTCPIPForward (close resources in the correct order)
2026-05-25 14:27:42 +00:00
Steven Martin 8f8b6f6ba0 docs: Update sql server self-hosted (#67028)
* docs: Update sql server self-hosted

* docs: Update config file instrs
2026-05-25 13:32:36 +00:00
Maxim 4d580653b4 fix: Propagate DeviceExtensions in remote user identity mapping (#67016) 2026-05-24 01:22:12 +00:00
Edoardo Spadolini 6413a5ae2e Add an optional unstable rate limit for ResolveSSHTarget (#66952)
* Move CreateAuditStream unstable envvar to lib/service

* Add an optional rate limit for ResolveSSHTarget

* Fix logging oddities

* Actually set the create audit stream limit metric

* Fix and synctest TestCreateAuditStreamLimit
2026-05-22 23:03:52 +00:00
Hugo Shaka 57ee7542c8 Force resource replacement on scope change (#66960) 2026-05-22 21:43:42 +00:00
Hugo Shaka 9443943375 crdgen: address scope-related bugs (#66955)
* crdgen: restore age column + fix additional column scoped bug

* Make scope field immutable

* Scope bots
2026-05-22 21:09:42 +00:00
Hugo Shaka e2c22ebd54 Add scoped mode for the operator (#66762)
This work is not production ready yet. While this work makes the
operator support running with a scoped token, this is not enough for a
public release.

Several failure modes must be addressed, including scoped name
conflicts, and operators fighting for ownership of a resource.
2026-05-22 20:48:45 +00:00
teleport-post-release-automation[bot] 8b4ba68a8b [auto] Update AMI IDs for 18.8.2 (#67015)
Co-authored-by: teleport-post-release-automation[bot] <128860004+teleport-post-release-automation[bot]@users.noreply.github.com>
2026-05-22 19:53:45 +00:00
Paul GottschlingandHugo Shaka 6cd0efe99b Add a docs linter for unused partials and images (#64999)
* Add a docs linter for unused partials and images

Check whether any images in the `docs/img` directory or partials in the
`docs/pages/includes` directory are unused within the docs. This
prevents situations such as the following:

- An author unknowingly removes the only inclusion of a partial with
  important information, which should remain in the docs.
- An author introduces an image, thinking they might use it, but ends up
  using a different image, unnecessarily increasing repo size.
- An author forgets to remove unused assets, causing cluster that adds
  friction for other authors trying to navigate the `docs` directory.

Implementation details:
- Add a script to `build.assets` to list unused docs assets, including
  images and partials.
- Add a step to the `Lint (Docs)` workflow that checks whether the list
  is nonempty and, if so, exits with an error.

* Remove unused docs partials and images

* Refactor custom installer partials

The current approach injects a parameter into partial paths within
`custom-installer.mdx` in order to load one of several partials based on
the cloud provider and whether the installer is created statically or
dynamically.

However, if we use the automated approach in
`build.assets/unused-docs-assets.sh` to check for unused partials, it is
impossible to determine whether the partials we keep in
`docs/pages/includes` are included in the docs. This change refactors
the custom installer partials so we can use only static partial paths,
rather than dynamic ones.

* Apply suggestion from **hugoShaka**

Co-authored-by: Hugo Shaka <[email protected]>

---------

Co-authored-by: Hugo Shaka <[email protected]>
2026-05-22 19:50:07 +00:00
Paul Gottschling f5212798ec Fix the event handler reference (#66972)
- Fix incorrect table column syntax
- Fix make command to use the `-C` flag
2026-05-22 19:31:14 +00:00
Paul Gottschling 2a1bcc2247 Add a conceptual introduction to Beams (#66155)
* Add a conceptual introduction to Beams

Expand the Agentic Identity Framework section of the docs with a
conceptual guide to the architectural principles behind Beams. The guide
is for prospective Teleport users who may be solving the same problems
as Beams independently with their own solution. This guide explains the
principles behind Beams by emphasizing that Teleport builds Beams on top
of its existing infrastructure identity foundations, and that the
overall approach is deeply integrated into Teleport's longstanding
approach to infrastructure security.

Implementation details:
- Create an Agentic Identity Framework section.
- Assume that we have moved to VNet for egress controls (e.g., #66074).
- Mention the possibility of scoped delegation based on the current
  architecture of Beams.
- Link to the guide in the "security model" section of beams.mdx.
- Add a sidebar item for the new guide, but don't add it to the section
  index page yet, as there is no natural place for it. Decouple this
  change from a reorganization of the Agentic Identity Framework page.

* Clean up Beams guidance

Responds to **kurktchiev**

- Remove the mentions of "Firecracker", as this is an implementation
  detail that is more likely to change than the use of a microVM.
- Add a link to the tbot introduction and VNet in the "Sandboxing"
  section of the "Reference implementation" H2
- Indicate in the Beams guide that they are a reference implementation
  of the Agentic Identity Framework
- Remove the specific TTL of a beam, which is an implementation detail.
  Move the first mention of the TTL to where we explain how Teleport
  uses it.

* Update spellcheck config

Add "sandboxing" and "indeterministic" and sort the list.

* Edit introductory Beams documentation

- Remove descriptions of functionality that is not yet available from
  beams.mdx.
- Replace "indeterministic" with "non-deterministic".
- Remove the Beams discussion from the conceptual introduction. Link to
  the Beams docs instead.

* Remove implementation language around Beams

Use softer language around Beams implementing the agentic identity
framework or a secure agentic environment.

* Remove redundant sentence

Respond to zmb3 feedback.
2026-05-22 19:25:30 +00:00
Chris Thach c46a8f5f14 Migrate MFA service from v1 to v2 (#66820)
* Migrate from mfa v1 to v2.

Signed-off-by: Chris Thach <[email protected]>

* Set deprecated proto option and update migration comment.

Signed-off-by: Chris Thach <[email protected]>

* Reduce nolint directives.

Signed-off-by: Chris Thach <[email protected]>

* Tag Ryan for the Desktop TODO.

---------

Signed-off-by: Chris Thach <[email protected]>
2026-05-22 18:49:20 +00:00