Commit Graph
26300 Commits
Author SHA1 Message Date
rosstimothy c1c5c039aa Stop consuming global modules in auth packages (#65883)
This removes the last few places in lib/auth/* that were
consuming modules with modules.GetModules and setting
them via modulestest.SetTestModules.

Contributes to https://github.com/gravitational/teleport/issues/62799.
2026-04-20 17:01:56 +00:00
dependabot[bot] d8cde94137 Bump github.com/go-git/go-git/v5 from 5.17.1 to 5.18.0 (#65905)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.17.1 to 5.18.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.17.1...v5.18.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 16:53:59 +00:00
Grzegorz Zdunek 36dc67e68d Connect: Clear only stale clients in cache (#65832)
* Clear only stale clients in cache

* Match test on specific error

* Improve comment
2026-04-20 16:18:32 +00:00
rosstimothy 7691ff5a1c Remove dependency on github.com/buger/jsonparser (#65830)
The library has had a number of CVEs recently and uses shady
dependencies. https://github.com/gravitational/teleport.e/pull/8513
removed the dependency pulled in via teleport.e. This updates the
e_imports.go to reflect that change which moved buger/jsonparser to
an indirect dependency.

To remove the dependency entirely, mark3labs/mcp-go was updated to
the latest version. In that version they have replaced
github.com/invopop/jsonschema, which brough in buger/jsonparser,
with github.com/google/jsonschema-go. As a result buger/jsonparser
is no longer in our dependency tree.
2026-04-20 15:55:16 +00:00
Noah Stride 0b95c4272f Remove unused DeleteAllTunnelConnections & DeleteTunnelConnections RPCs (#65932) 2026-04-20 15:01:12 +00:00
dc01dd9fdc Add join failure handling for ec2 using readyz health check (#64296)
* Detect EC2 join failures and surface via readyz

* Replace readyz join check with systemd log capture

* Add JoinFailureTimeout constant

The installer's readyz polling timeout is referenced by both
the autodiscover installer and the SSM waiter. A shared constant
avoids drift between the two values and keeps the user-facing
status message in sync with the actual wait duration.

* Replace two-attempt join check with poll loop

The join health check now polls the readyz endpoint in a loop
until the node reports ready or a five-minute timeout elapses.
Previously the check ran at most twice with a fixed delay of
thirty seconds, which missed nodes that needed longer to join
and could not distinguish a slow start from a permanent failure.

On timeout the error includes a best-effort systemd service
snapshot gathered via systemctl show. This replaces the earlier
systemctl is-active gate that blocked readyz from being checked
at all when the service was in a non-active or transient state.

The readyz function returns a simple (ready, error) pair instead
of the earlier four-value tuple, and per-attempt timeouts that
hit deadline-exceeded are treated as transient so that polling
continues. A clockwork.Clock field enables deterministic time
control in tests.

* Align SSM waiter timeout with poll timeout

The SSM command waiter used a hardcoded 100-second wait that was
inherited from the v1 SDK default. The installer now polls readyz
for up to five minutes, so the SSM waiter must outlast that to
avoid reporting a stale in-progress state as the final outcome.
The new timeout is the join-failure timeout plus a ten-minute pad.

* Update docs for readyz poll loop errors

Error patterns, status messages, and the example event code now
reflect the polling-based join health check. The event code moves
from TDS01E to TDS00W, and the user task description no longer
assumes an IAM join handshake rejection as the sole failure mode.

* Trim SSM stdout/stderr in audit events

SSMRun audit events can carry unbounded stdout/stderr from
command invocations, risking the 64 KB stream message limit.
Cap each field at 24 000 characters (matching the per-field
cap in the event schema) by keeping only the trailing portion
and aligning the cut to a full-line boundary so diagnostics
stay readable.

* Simplify output.

Co-authored-by: Roman Tkachenko <[email protected]>

* Expand RedactFlagArgs doc comment

* Add IsConnectionError to utils package

Move the socket-level connection check from the installer package
into the shared utils package. The readyz checker needs this to
distinguish transient socket errors from application failures,
and the existing helpers in utils already cover related network
error classification.

* Remove install-script binary-exists guard

The shell installer no longer skips the download when a Teleport
binary already exists on disk. Previously the guard would bypass
reinstallation, but the installer is now expected to always run so
that package-managed upgrades and configuration changes take effect.

* Remove readiness handler tests from lib/service

These tests covered the HTTP readyz handler that is no longer
exercised through the service-level test surface. Readyz check
behaviour is now validated through the installer readyz checker
tests, making these redundant.

* Simplify join-failure error output

The error writer no longer unpacks trace message slices or strips
standalone sentinel lines before printing. Errors now flow through
as plain strings, which is sufficient because the upstream assembly
was simplified to produce one coherent error message.

* Extract readyz checker and diagnostics helpers

Split readyz check logic and systemd diagnostics out of the large
autodiscover file into dedicated files. The readyz checker becomes
a standalone struct with its own per-attempt timeout, connection
error classification, and test suite. Diagnostics helpers such as
journal capture, service state gathering, and the systemctl runner
move into a diagnostics file alongside ErrJoinFailure and related
constants.

The poll loop in checkJoinHealth is restructured to perform an
immediate first check before entering the timer loop, and error
assembly is inlined instead of threading through append helpers.
Tests now use a fake clock and goroutines to exercise the timer
driven polling flow deterministically.

* Move JoinFailureTimeout to installer package

Relocate JoinFailureTimeout from installstatus/exitcodes.go
into installer/autodiscover.go where the readyz polling
logic that consumes it lives. The exit-code String() method
now returns a generic timeout message; ssm_install.go
appends the concrete duration for the join-failure case.

* Reuse poll timer in readyz health check loop

The readyz poll loop allocated a new timer on every iteration and
checked readiness only after waiting. The loop now runs the first
check immediately before entering the poll cycle and reuses a single
timer via Reset, reducing per-iteration allocations. The ready state
drives the loop condition directly, moving the success return after
the loop so the function ends with the diagnostic-failure path at
the bottom.

* Replace binary mocks with function overrides

Join-health timeout tests relied on bintest process mocks for both
systemctl and journalctl, requiring filesystem setup, path wiring,
and post-run invocation assertions for every test case. Diagnostics
and journal capture now use optional function-level overrides that
are injected through the installer config, with thin wrapper methods
that fall through to the real implementation when no override is set.
Previously each test needed six to eight lines of mock orchestration
that obscured the actual test logic.

* Update lib/srv/server/installer/autodiscover_test.go

Scope context to test.

Co-authored-by: Chris Thach <[email protected]>

* Update lib/srv/server/installer/autodiscover_test.go

Scope context to test.

Co-authored-by: Chris Thach <[email protected]>

* Update lib/srv/server/installer/autodiscover_test.go

Scope context to test.

Co-authored-by: Chris Thach <[email protected]>

* Update lib/srv/server/installer/autodiscover_test.go

nstaller/autodiscover_test.go

Co-authored-by: Chris Thach <[email protected]>

* Simplify arg redaction loop to use range

Co-authored-by: Chris Thach <[email protected]>

* Simplify override fields to defaults in config

Co-authored-by: Tiago Silva <[email protected]>

* Add JoinFailureError structured error type

Replace the ErrJoinFailure sentinel with a JoinFailureError struct
that carries message, service diagnostics, journal output, and last
readyz error as separate fields. Previously callers had to parse a
concatenated string to extract individual diagnostic sections, making
downstream formatting and programmatic inspection fragile.

* Surface unexpected readyz errors to caller

Return unexpected errors from the readyz check instead of swallowing
them and returning false. The polling loop in checkJoinHealth keeps
retrying on these errors but now records the last one so it appears
in the timeout diagnostics. Previously a transient HTTP or socket
error was silently discarded, making it impossible to distinguish
"not ready yet" from "endpoint unreachable."

* Replace clock and overrides with function fields

Remove the clockwork dependency from the join-health check and use
the standard time package directly. Promote journalOverride and the
diagnosticsOverride to first-class diagnostics and journal function
fields initialized in checkAndSetDefaults. Build a JoinFailureError
on timeout instead of concatenating string parts. Tests switch from
fakeClock and BlockUntilContext to synctest.Test with time.Sleep,
removing the need for manual clock advancing.

* Use JoinFailureError in CLI error output

Switch the CLI join-failure path from errors.Is with the old sentinel
to errors.As with JoinFailureError. The writer function now accepts
the typed error and prints each diagnostic field on its own line.
Previously the error was printed as a single opaque string, making it
harder to scan in SSM console output.

* Normalize dash prefix in flag redaction

Add a lookupRedactor helper that maps both single-dash flags to their
double-dash redactor registration and vice versa, so callers need not
register both variants. Previously a -token=secret argument passed
through unredacted because only --token was registered in the redactor
map.

* Improve trace msg

Co-authored-by: Gavin Frazar <[email protected]>

* Minor refactor

Co-authored-by: Gavin Frazar <[email protected]>

* Minor refactor

Co-authored-by: Gavin Frazar <[email protected]>

* Minor refactor

Co-authored-by: Gavin Frazar <[email protected]>

* Minor refactor

Co-authored-by: Gavin Frazar <[email protected]>

* Minor refactor

Co-authored-by: Gavin Frazar <[email protected]>

* Minor log improvement

Co-authored-by: Gavin Frazar <[email protected]>

* Remove redundant check

Co-authored-by: Gavin Frazar <[email protected]>

* Quote command+args

Co-authored-by: Gavin Frazar <[email protected]>

* Remove token-redaction utility and its usage

Log node-configure arguments directly instead of redacting the join
token. The token is a short-lived secret issued by the auth server
for EC2 auto-discovery; it expires before log entries are typically
reviewed, so the redaction layer added complexity without meaningful
security benefit. Previously every call to the node-configure step
copied the argument slice through a redactor map and a flag-parsing
loop.

Replace hardcoded five-second sleeps in health-check tests with the
installer's readyzPollInterval field so the tests stay correct when
the interval changes. Remove a stray closing brace left over from a
prior edit.

* Improve diagnostics error messages and comments

Add a comment explaining the systemctl-show output format that the
property parser expects. Quote "systemctl show" in the log message
for the invocation-ID retrieval failure so it renders as a distinct
command name rather than bare words. Switch the infrastructure error
path to use the %q format verb with the full command object so the
message includes the complete binary path instead of manually joining
the argument list.

* Use server clock for EC2 installation SyncTime

Set SyncTime to the discovery server's clock instead of the SSM run
event timestamp. Previously the field carried the event time, which
reflects when SSM dispatched the command rather than when the server
recorded the installation result, causing user-task entries to show
stale timestamps that did not advance on re-evaluation.

* Expand trimToRecentTail godoc comment

* Bound diagnostics collection after join timeout

Diagnostics and journal capture now run under a dedicated five-second
timeout derived from the parent context. Previously they inherited the
caller's context with no independent deadline, so a hung systemctl or
journalctl call could block indefinitely after the readyz poll already
determined the node failed to join.

Journal capture errors are downgraded from a hard return to a warning
log entry. A transient journalctl failure was masking the underlying
join-failure error, causing the caller to receive a journal-capture
error instead of the structured JoinFailureError that carries the
diagnostics payload.

* Document waitTimeoutPad tradeoff and TODO

* Replace systemctl subprocess with D-Bus API

Diagnostics collection now queries systemd properties through the
native D-Bus connection rather than shelling out to systemctl show
and parsing stdout. The D-Bus interface needs fully-qualified unit
names, so the unit-name builder appends a ".service" suffix to each
returned value. This eliminates the systemctl binary-path dependency
during diagnostics and avoids subprocess-parsing fragility around
exit-code versus infrastructure error disambiguation.

* Fix go mod

* Bump how many journal lines we output

* Extract systemd client into lib/systemd package

The systemd D-Bus property lookups, invocation ID retrieval, and the
journalctl capture now live in a reusable lib/systemd package that
exposes a Client with ReadServiceState, InvocationID, and CaptureJournal
methods. Previously these helpers lived as unexported methods on the
AutoDiscoverNodeInstaller type, so any other call site that needed a
systemd state snapshot had to either duplicate the logic or import the
installer package just to reach them. Moving them to a dedicated package
keeps the shared integration layer free of installer-specific policy
and makes the code reusable by unrelated callers.

The installer diagnostics file retains only installer-facing types and
the enableAndRestartTeleportService logic. JoinFailureError doc comments
no longer hardcode the 5m0s timeout in the example, since the timeout
is now configurable and changes across releases. Two clarifying comments
on runSystemctlCommand document why context errors are preferred over
exec errors, and why ExitError branches include the exit code and the
captured stdout and stderr streams in the wrapped error message.

The installer-side test file drops the helpers' tests because they now
live alongside the package they cover in lib/systemd. The remaining
TestJoinFailureErrorString case derives its expected message from
JoinFailureTimeout rather than hardcoding a duration literal.

* Bound join-health polling and diagnostics collection

The join-health check now drives polling with retryutils.NewRetryV2
against a dedicated pollCtx bounded by readyzPollTimeout, and the
diagnostics collection step races the diagnostics and journal goroutines
against diagCtx using channels and a select loop. Previously the poll
loop used a hand-rolled timer with a remaining-duration calculation, and
the diagnostics step waited on a sync.WaitGroup, so a stuck diagnostics
or journal implementation blocked the join failure report indefinitely
even after the parent context was canceled. With the new structure,
context cancellation and the diagnostic timeout both unblock the join
failure path, and the journal output field now carries an explanatory
message when collection times out or is canceled instead of being
silently empty.

JoinFailureTimeout is reduced from five to three minutes to surface
join failures sooner in SSM invocation results, where the full five
minute wait previously delayed operator feedback without improving the
odds of recovery. LastError is no longer populated when the error from
readyzChecker originates from the poll context already expiring, so the
join failure message reflects the actual join outcome rather than a
context cancellation observed only after the poll deadline.

The installer now delegates diagnostics collection and journal capture
to a teleportsystemd.Client constructed from the installer config,
rather than calling unexported systemd helpers on the installer itself.
The local dbusConn interface and its sole usage are removed in favor of
teleportsystemd.NewConnFunc, which is now the test seam for injecting
fake D-Bus connections into the diagnostics client.

The autodiscover tests cover the new behaviors: a stuck diagnostics or
journal implementation does not block join failure reporting when the
parent context is canceled, a poll timeout does not populate LastError,
and a diagnostics timeout produces a human-readable journal substitute.
Existing tests switch from context.Background() to t.Context() so they
inherit the per-test deadline configured by the testing package.

The EC2 troubleshooting docs and ssm_install_test fixtures stop using
a hardcoded five-minute duration and instead derive it from exported
installer.JoinFailureTimeout, so they track future timeout changes
without manual edits across docs, tests, and error message snippets.

* Use t.Context in readyz checker tests

* Reduce join-failure timeout default from 3m to 2m

---------

Co-authored-by: Roman Tkachenko <[email protected]>
Co-authored-by: Chris Thach <[email protected]>
Co-authored-by: Tiago Silva <[email protected]>
Co-authored-by: Gavin Frazar <[email protected]>
2026-04-20 14:59:21 +00:00
Steven Martin f7f8745217 docs: k8s updates (#65931)
* docs: k8s updates

* docs: update intro k8s verbiage
2026-04-20 14:21:24 +00:00
STeve (Xin) Huang f1b359e075 add AppMetadata to AuthAttempt (#65594)
* add AppMetdata to AuthAttempt

* legacy gogoproto, add godoc, resuse helper

* use unknown idenitty for cookie case
2026-04-20 13:22:55 +00:00
Pavel 28994805bd fix vnet config terraform resource ID to use apitypes.MetaNameVnetConfig (#65930) 2026-04-20 12:50:23 +00:00
Dan Share 5bddb36c65 [Browser MFA] Add documentation (#65176)
* [Browser MFA] Add documentation

* Address comments

* Add browser to env vars

* Address feedback

* feedback

* Address comments
2026-04-20 11:47:27 +00:00
Grzegorz Zdunek f1bd20090e Update protobufjs to 7.5.5 (#65918) 2026-04-20 10:02:08 +00:00
Grzegorz Zdunek b7f317af13 Connect: Improve search bar readability (#65781)
* Improve results layout

* Do not show matches in resource's secondary properties/labels if there's already a match on the main field

* Adjust stories and add tests

* Change `font-weight` to 400 for better redability

* Add tests for `getVisibleMatches`

* Remove unnecessary trailing spaces
2026-04-20 09:14:49 +00:00
Tiago Silva 1bd317b983 Add set support in labels expressions (#65863)
Label expressions don't have a way to declare slices. This PR introduces
a function that we expose for other parsers.

This will support some work in access graph repo.

Signed-off-by: Tiago Silva <[email protected]>
2026-04-18 14:41:24 +00:00
Tim Buckley 4e90c9de1c Return HostResult messages for agents in bound keypair joining (#65439)
* Return HostResult messages for agents in bound keypair joining

The current bound keypair implementation only returns BotResult from
its join implementation, despite being otherwise updated to account
for host joins. This mostly works as the only real difference between
bot and host results is the bound keypair result... as well as
`ImmutableLabels`, which was effectively lost. Certificates were
otherwise valid and returned intact. This only applies to scoped
token joining as `ImmutableLabels` are nil for standard
`ProvisionTokenV2`.

This would ultimately cause any host joined using a scoped token with
`ImmutableLabels` configured to be inaccessible to users attempting
to access that resource.

To fix the issue, this changes `HandleBoundKeypairJoin` to return
a generic `messages.Result` and constructs a `messages.HostResult`
appropriately for instances. The `joinclient` is also updated to
account for host joins.

* Update token ref after rebase

* Fix lint
2026-04-17 23:26:49 +00:00
Evan Freed a5a77be8f9 [prometheus] Initialize metrics (#65619)
* initialize metrics

Signed-off-by: Evan Freed <[email protected]>

* iniailize backend metrics to zero at startup

Signed-off-by: Evan Freed <[email protected]>

---------

Signed-off-by: Evan Freed <[email protected]>
2026-04-17 19:55:28 +00:00
Lisa Kim 0b200f26e8 Rename DiscoveryIACToolLabel to generic IACToolTerraform (#65809) 2026-04-17 18:05:32 +00:00
Lisa Kim 10e022f96e tfgen: sanitize terraform resource name (#65848) 2026-04-17 18:05:25 +00:00
Sakshyam Shah 67757a9fe2 refactor: move msgraph models to models package (#65871)
* refactor: move msgraph models from /lib/msgraph to /lib/msgraph/models package

* test: use msgraphtest server to test TestIterateUsers_Empty

* add comments to exported types

* lint: fix import cadence

* test: DecodeGroupMember

* test: add license header
2026-04-17 17:48:57 +00:00
Nic Klaassen c7df9759db [vnet] fix: use correct SSH login when checking MFA requirement (#65729) 2026-04-17 16:38:38 +00:00
dependabot[bot] b95a677f3c Bump github.com/moby/spdystream from 0.5.0 to 0.5.1 (#65860)
Bumps [github.com/moby/spdystream](https://github.com/moby/spdystream) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/moby/spdystream/releases)
- [Commits](https://github.com/moby/spdystream/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/moby/spdystream
  dependency-version: 0.5.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 15:37:03 +00:00
Alan Parra 2edfe25ada Add dynamic marshalers for CertAuthorityOverride (#65858) 2026-04-17 14:44:02 +00:00
Edoardo Spadolini 3da0f44c80 session-helper: embeddable binary and embedding logic (#65784)
* Clean up unneeded forwarder for reexec.IsReexec

* Disallow reexec through common.Run

* Remove the checkhomedir SSH subsystem

* Add true reexec subcommand

* Assume /proc/self/exe is always usable

* Add sessionhelper embed logic
2026-04-17 14:16:53 +00:00
Ryan Clark 6105aebd81 Add support for nested lists and tables in the markdown component (#64843)
* Add support for nested markdown lists

* Fix header content not parsing as markdown

* Add support for markdown tables

* Add max depth of 10 for parsing nested lists

* Only consume sibling list items with the same list marker

* Respect the start number on ordered lists

* Code review fixes

* Code review fixes

* Cap the max number of table columns to 100, rows to 1000

* Check max iterations before skipping blank lines
2026-04-17 14:02:14 +00:00
Marek Smoliński 9c25843710 Okta: Add assignments Upsert/UpdateCAS methods (#65590)
* Okta: Add assignments Upsert/UpdateCAS methods

* rename CAS to ConditionalUpdate

* Update
2026-04-17 13:24:18 +00:00
Alan Parra 93b1b583f0 Wire CertAuthorityOverride resources to the cache (#65805)
* Add CertAuthorityOverride to EventTo/FromGRPC

* Implement SubCAServiceGetter in lib/cache.Cache

* Implement SubCAServiceGetter in lib/auth/authclient.Cache

* Add dynamic marshalers for CertAuthOverride

* Drop dynamic marshalers

* Mimic backend keys in cache keys

* Test newAccessCacheForClient wiring

* Fix error message

* Return CertAuthorityOverride instead of ResourceHeader on OpDelete
2026-04-17 13:22:02 +00:00
Ryan Clark a18ab3ea8c Upgrade vite to 8.0.8 (#65508)
* Upgrade vite to 8.0.7

* Vite 8.0.8
2026-04-17 13:18:58 +00:00
Noah Stride d0165123a9 MWI Scopes[6]: tbot changes (#65351)
* MWI Scopes[6]: tbot changes

* Check scope correctness for loaded identities

* return scope

* Cover new case caused by delegation_session_id
2026-04-17 12:48:42 +00:00
Grzegorz Zdunek a5ff5dfe2b Bypass HTTP proxies for local JS gRPC clients (#65634) 2026-04-17 12:13:39 +00:00
Maja 68cb8a2af2 VNet macOS: Handle "No such process" race condition on the very first launch (#65169) 2026-04-17 11:38:34 +00:00
Dan Upton 9f160cbe6f Add support for delegation to tbot's relevant services (#64900)
* Add support for delegation to `tbot`'s relevant services

* Explicitly prevent use of delegation with leaf clusters

* Make `WithRoles` and `WithDelegation` mutually-exclusive

* Make `delegation_session_id` and `roles` mutually-exclusive in tbot config

* Use nil-tolerant proto getter functions

* Move delegation cert generation into separate method

* Stop delegation service from returning CA certificates

Per @strideynet's request, to avoid replicating existing bad patterns around
conflating the user and host CAs.

* Fix tbot OpenSSH output in delegation sessions
2026-04-17 10:24:15 +00:00
Dan Share 8260094dd6 [Browser MFA] Add Browser MFA ceremony tests (#65280) 2026-04-17 06:39:44 +00:00
Gabriel Corado 893e9cb28a Add LLM inference endpoint configuration (#65688)
* feat: llm subkind config

* refactor: code review suggestions

* refactor(api): change llm format and provider to string

* fix: update missing references

* feat: update CRDs with new app spec options

* feat: update docs and terraform

* chore(api): update derived values and nil checker

* refactor(app): move not implemented error to servehttp to avoid leaks

* refactor: remove presentation (webui/teleterm) changes

* refactor(auth): remove unified resources changes
2026-04-16 21:58:45 +00:00
0a316dfe40 Add app.session.llm.request audit event (#65626)
* feat: add app.session.llm.request audit event

* fix(events): wrong code constant

* Apply suggestions from code review

Co-authored-by: Nibras Ohin <[email protected]>
Co-authored-by: STeve (Xin) Huang <[email protected]>

* feat(events): trim event

* chore(web): fix eslint error

---------

Co-authored-by: Nibras Ohin <[email protected]>
Co-authored-by: STeve (Xin) Huang <[email protected]>
2026-04-16 21:44:38 +00:00
rosstimothy 3672719968 Update examples to use moby/moby instead of docker/docker (#65856) 2026-04-16 21:06:57 +00:00
rosstimothy a363e3410a Remove services.CompareResources (#65151)
All remaining reconcilers relying on the default
ReconcilerConfig.CompareResources function have been updated to
provide one explicitly. All direct uses have been replaced with
equivalent functionality via the appropriate IsEqual function.

The golangci-lint depguard rules have been updated to
remove the current exclusions.
2026-04-16 20:10:09 +00:00
Zac BergquistandKyle Liebler 107caf5145 Fix tsh beams exec examples in beams.mdx (#65842)
Signed-off-by: Zac Bergquist <[email protected]>
Co-authored-by: Kyle Liebler <[email protected]>
2026-04-16 20:09:41 +00:00
Sakshyam Shah 449be355d5 Add Entra ID integration test cases (#64663) 2026-04-16 19:58:38 +00:00
charlestp aa59e528aa Terraform teleport/discovery/aws change kube_app_discovery default to circumvent explicit false provider bug (#65802) 2026-04-16 16:35:18 +00:00
Dan Share 4e1c58ae86 Small improvements to Browser MFA (#65582) 2026-04-16 15:59:02 +00:00
Chris Thach 6106575984 Replace client racing dial with sequential dial. (#65793)
Signed-off-by: Chris Thach <[email protected]>
2026-04-16 15:12:01 +00:00
Steven Martin 6877f14ac1 docs: remove Team references and update access request plugins (#65777)
* docs: update access request plugins

* docs: remove Team reference

* docs: remove extra space in join-methods
2026-04-16 15:10:25 +00:00
Alan Parra b68cae7226 Fix ./lib/tpm tests using -tags=tpmsimulator (#65807)
* Fix ./lib/tpm tests using -tags=tpmsimulator

* Lint the `tpmsimulator` tag in CI
2026-04-16 15:07:00 +00:00
Chris Thach fcd89d4d23 Fix list resources when in-band MFA is required for all SSH connections (#65464)
* Fix list resources when TELEPORT_UNSTABLE_FORCE_IN_BAND_MFA=yes.

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

* Improve comments.

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

* Minify test name.

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

---------

Signed-off-by: Chris Thach <[email protected]>
2026-04-16 14:57:19 +00:00
Alan ParraandTiago Silva 035aa48cd0 Implement SubCAServiceGetter in lib/auth/authclient.ClientI (#65759)
* Add SubCAService interfaces to lib/services

* Implement SubCAServiceGetter in lib/auth/authclient.ClientI

* Use GetCaOverride()

Co-authored-by: Tiago Silva <[email protected]>

* Rename DisplayName to FullName

---------

Co-authored-by: Tiago Silva <[email protected]>
2026-04-16 13:40:52 +00:00
Paul Gottschling 915c50c29b Begin restructuring installation docs (#64429)
* Begin restructuring installation docs

See RFD 246

The documentation in the Installation section is currently organized by
platform while documentation for deploying Teleport components is
organized elsewhere. This creates confusion for users, who visit the
Installation docs far more often than any other section, missing
critical instructions.

This change modifies the Installation section to include four children:
- Deploying Teleport Agents
- Installing Teleport on a single machine
- Uninstalling Teleport
- An external link to the Download page, the fastest way to download
  Teleport client tools.

Implementation details:

- Remove the `amazon-ec2.mdx` installation guide. This has to do with
  cluster installation, not single-machine installation. Move AMI
  information into the EC2 Terraform guides, which a separate change
  will add to the Installation section. Also remove `helm.mdx` from the
  single-machine section, where it does not belong. A separate change
  will add our Helm guides to the Installation section.
- Move `amazon-ecs.mdx` to the `agents` directory. It's a guide for
  deploying Teleport Agents.
- Remove `windows.mdx`, which only pertains to clients, in favor of
  making the Download page more visible in the Installation section.

This change also adds some structural improvements to the `linux.mdx`
guide:

- Organize section introductiosn to create a clearer hierarchy between
  more general and more specific information. Readers now read more general
  information first.
- Move the item re: recommending Cloud to the top of the page.
- Rework the control plane section. Remove the tab for Teleport Cloud,
  which is unnecessary since the section isn't for cloud customers. Add
  stepped instructions to consolidate the text a bit.
- Include clearer branching in the TAR and package download section
  between self-hosted and agent use cases. Move the branching between
  FIPS and standard installations higher in the section for clarity.

* Fix links after reorganizing installation docs

* Clean up installation instructions

Responds to **GavinFrazar** feedback:

- Make the Installation section description more precise.
- Extract the Teleport AMI list into a partial.

* Fix clarity issues in the Installation section

- In the landing page, provide a clearer route for users interested in
  self-hosting Teleport Community Edition.
- Restore the Windows guide so we have consistent installation
  instructions for all supported platforms. Accordingly, update the
  `docs/pages/installation/single-machine` landing page to indicate that
  this section also pertains to client tools.
- Place the Amazon EC2 guide in the Single Machine subsection and
  include the partial that lists AMIs. Replace the single H2 with an
  Admonition for clarity. Fix redirects accordingly.
- Move "Downloads" to the end of the Installation sidebar section.
  Clarify the purpose of the link.
- Include `fdpass-teleport` in the table of installed binaries.
- Use "control plane" instead of "cluster" to describe the Auth Service
  and Proxy Service in the single-machine.mdx index page.
2026-04-16 13:36:13 +00:00
Kevin ef7f45ce34 docs: Remove redundant operator reference for lock resource (#65541)
* Remove redundant reference

* Add redirect
2026-04-16 11:44:44 +00:00
Edoardo Spadolini 68ea089c6f Bump e ref (#65827) 2026-04-16 10:33:34 +00:00
Noah Stride 473f954e92 MWI Scopes[5]: Bot Instances (#65318)
* MWI Scopes[5]: Bot Instances

* Extend E2E test to check BotInstance

* Propagate scope to recreated bot instances

* Address Nic's test feedback

* Push authz filtering down to cache/backend to avoid partial pages
2026-04-16 08:28:46 +00:00
Tim Buckley edabc9f89c MWI Scopes[4]: Scoped bot joining and bound keypair support (#65366)
* MWI: Support scoped join tokens in the bound keypair join method

* Bot fields for scoped tokens

* Check bot scope

* Allow bound keypair tokens to pass scope validation

* Support bots

* Fix outstanding references to ProvisionTokenV2

* Zero check on MustRegisterBefore due to proto impl differences

* Properly pass through nil must_register_before

* Also fix nil timestamps in bound keypair status

* And fix rotate_after

* Add BotInternal certificate field

* Add 'bot' TokenUsageMode value and require for bot joins

* Fix mutator execution for scoped bound keypair joining

* Implement more ScopedToken StrongValidateToken checks for bots

Adds a few more of the bot-specific RFD validation checks for bots.

* Improve bot join checks for scoped joining

* Fix build after rebase and add additional RFD checks

This fixes builds after upstream updates and implements a few more
validations required by the RFD:
- AssignedScope field for bots must be empty
- Moved original AssignedScope check to validateNonBot() since it was
  checked unconditionally before.
- BotScope must be a presumably-valid scope at creation time

* Use scope-aware access checker for initial bot certs

* Fix WeakValidateToken() for scoped tokens for bots

WeakValidateToken() was not updated to match the new checks in
StrongValidateToken(); this adds minimal bot-related exemptions
around `assigned_scope` for bots to allow it to be read without
error.

* Add tests for scoped bot tokens, fix role bug

This adds a set of additional token tests for scoped bot tokens, and
fixes an issue where WeakValidateToken() was erroneously rejecting
invalid system roles.

* Properly initialize bound keypair scoped tokens on creation/upsert

We weren't applying the same initialization logic for scoped tokens
that we did for ProvisionTokenV2; this is required for registration
secrets to work properly.

* Update CRDs

* Fix failing test

* Specify types for bound keypair timestamp fields

* Update terraform resources

* Fix lint

* Include bot scope in BotJoin audit events

This includes the bot scope in audit events. It includes the user
label bot scope for successful joins where the user has been fetched,
and otherwise includes the bot scope configured on the token.

* Reject `token` join method for scoped bot tokens

Bot joining should use `bound_keypair`, so reject scoped bot tokens
that attempt to join with the traditional `token` join method.

* Fix failing test due to BotInternal cert parameter

TestRegisterBotInstance wasn't updated to include the BotInternal
flag on initial identity, so this includes it.

* Actually include Scope in bot audit events

* Mutate correct token status in `patchToken`

The mutate result was discarded because the wrong status object was
passed to `mutateScopedToken`.

* Use ScopedAuthorizer in join/Server.authenticate()

`authenticate()` currently rejects scoped identities which prevented
clients from reauthenticating with an existing identity, which is
important for bot renewal and bound keypair joining.

* Pass `BoundHostID` through properly in `GetBoundKeypairStatus()`

* Add basic TestJoinBoundKeypair_ScopedToken test

* Fix lint

* Update join server comments, add note about feature flag edge case

* Target correct provision token for standard token mutations

* Return correct mutated token in patchToken()

* Hide bound keypair registration secrets when `WithSecrets` is unset

* Avoid possible nil pointer dereference

* Address proto comment suggestion from review

* Deduplicate bound keypair mutator validation logic

Validation logic has been pulled out into a `validate()` interface
function and unified for both token types; scoped token bound keypair
fields are converted to their equivalent ProvisionTokenV2 variant
using existing helper logic.

* Nil check in consumeRecoveryMutator.validate()

* Simplify lastRotatedAtMutator

This removes the confusing switch with fallthroughs in favor of 2
simple ifs and a helper function.

* Ensure bound keypair status is non-nil before mutating

* Note non-nil requirement for new lastRotatedAt value

* Update generated operator resources

* Also nil-check status for standard tokens

* Mirror secret censoring for bound keypair secrets in tctl

This mirrors the existing secret censoring in tctl. It doesn't
actually work since the conditional can never be true.

* Use StrongValidate() on BotScope in token StrongValidate()

`validateBotToken()` was incorrectly calling `scopes.WeakValidate()`
on the bot scope. This changes it to call `scopes.StrongValidate()`
instead.

* Mark scoped token bound keypair registration_secret field as sensitive

* Make lastRotatedAtMutator's `mutateScopedToken` nil-safe

* Tag mutator validation errors with a unique name of the mutator

Errors are tagged with the primary field that mutator modifies to
help identify the failing mutator without necessarily identifying
the specific failing check.

* Address code review feedback

* Wait for ScopedRoleAssignment to become available

SRAs don't always propagate immediately, so adds a
`require.EventuallyWithT()` check to ensure it exists before
continuing.

* Add test for scoped bot joining via kubernetes

* Fix formatting
2026-04-16 02:06:24 +00:00
Julia Ogris cf76490d2a app: Preserve trailing slash in URI redirect (#65739)
* app: Preserve trailing slash in app URI redirect

path.Clean strips trailing slashes, so a configured URI like
http://backend:9000/dashboard/ produces a redirect to /dashboard
instead of /dashboard/. The upstream returns 404 because it
expects the trailing slash.

Preserve the trailing slash from the original URI after cleaning
by re-appending it when the administrator's URI ended with one.
Add TestNeedsPathRedirect to cover the redirect path logic.

* app: Assert empty location on no-redirect paths

Add an else branch to TestNeedsPathRedirect that verifies the
returned location string is empty when no redirect is expected.
This guards against future regressions where needsPathRedirect
might return a non-empty string alongside ok=false.
2026-04-15 22:43:51 +00:00