Commit Graph
11123 Commits
Author SHA1 Message Date
STeve (Xin) Huang b9fea4bd36 PoC v2 with double-encryption 2026-08-18 09:30:07 +01:00
STeve (Xin) Huang fed872a709 check github enterperise with sso tricking during integration creation 2026-07-15 10:05:44 -04:00
STeve (Xin) Huang dd21799afa license check update 2026-07-14 11:12:11 -04:00
STeve (Xin) Huang 1b3a355ba4 fix github status and switch to encrypted tokend for backend storage 2026-07-13 11:30:16 -04:00
STeve (Xin) Huang 8728071434 vnet 2026-07-06 15:20:19 -04:00
STeve (Xin) Huang d7df44dd27 poc v2 to match rfd 2026-06-26 09:13:05 -04:00
STeve (Xin) Huang 097f3dbb91 [git] github http support 2026-06-09 16:04:46 -04:00
Grzegorz Zdunek dd9407930c Prevent unbounded allocation on legacy TDP shared directory read (#66950) 2026-06-01 15:12:00 +00:00
Noah Stride a399b5ce53 Update Proxy heartbeats to heartbeat with Kind=Proxy (#67062)
* Proxy now heartbeats with Kind Proxy

* tidy

* Remove warning message (since it should never show and is therefore pointless)

* Add TODO comment

* Spell things the Americani/z/ed way
2026-06-01 14:36:53 +00:00
Marco Dinis f423ecab76 move token validation to services/local (#67266) 2026-06-01 14:11:34 +00:00
Chris Thach b704f7bdaf Fix TestLeaseBucketing in the Flaky Tests Detector (#66987)
* Fix flaky TestLeaseBucketing.

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

* Stagger expiry times so items land in different lease buckets.

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

* Revert changes to count and lease bucket to minimize diff.

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

---------

Signed-off-by: Chris Thach <[email protected]>
2026-06-01 14:09:03 +00:00
Edoardo Spadolini 4dfdc15944 Allow concurrent connections to forwarded SSH agents (#67116)
* Allow concurrent connections to forwarded SSH agents

* Silence forbidigo in the new tests
2026-06-01 08:56:52 +00:00
Chris Thach 5481586a57 VNet SSH will dial direct with user cert before falling back to legacy per-session MFA cert (#66584)
* Cherry-pick in-band MFA support changes for VNet that do no depend on x/crypto/ssh.

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

* Use cached client.

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

* Migrate to mfav2 after rebase.

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

---------

Signed-off-by: Chris Thach <[email protected]>
2026-05-29 23:43:16 +00:00
KennethandCopilot e0d96bb393 Switch to net.SplitHostPort to extract host from remote address (#66890)
* Switch to net.SplitHostPort to extract host from remote address

* Add tests

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

---------

Co-authored-by: Copilot <[email protected]>
2026-05-29 22:06:57 +00:00
Kenneth f5cad458fa Validate rate limiter to prevent integer division truncation (#66940) 2026-05-29 22:06:40 +00:00
Brian Joerger 66c995f295 Make sess.Close idempotent. (#67207) 2026-05-29 20:35:27 +00:00
Nibras Ohin 58e91dc62e feat: updated side panel to be expanded for beams (#66603)
* feat: updated side panel to be expanded for beams

* chore: updating tests to make it more readable as par suggestion

* chore: updated to use userpreference state to validate expand state

* chore: removed dead code definining unused nav categories

* chore: refactor nav item ordering logic for better readability

* chore: udpated default sticky mode value instead of updating user pref
2026-05-29 16:54:16 +00:00
rosstimothy 58126ad723 Remove lib/client as a dependency of lib/config (#67257)
Relocates client.ParseLabelSpec to lib/utils/parse. This results in
a net 5MB reduction in the weight of lib/config. This may not
have a correlation in binary size since lib/client is heavily consumed
by other packages.

```bash
$ goda cut './lib/config:all' | rg '^github.com/gravitational/teleport/lib/client\b|^ID'
github.com/gravitational/teleport/lib/client   InDegree=1   Cut.PackageCount=75   Cut.AllFiles.Size=5.3MB   Cut.Go.Lines=129512
```
2026-05-29 15:42:50 +00:00
Zac BergquistandDawid Hanak 2bccbac90b Add SCard Security Status & CCC Handling (#66604)
Signed-off-by: Zac Bergquist <[email protected]>
Co-authored-by: Dawid Hanak <[email protected]>
2026-05-29 14:33:09 +00:00
Grzegorz Zdunek 8c15be1f1a Properly escape resource names in predicate expressions (#67227) 2026-05-29 13:38:48 +00:00
rosstimothy 45a427eedc Rework scopes feature flags (#67073)
Replace the functions in the scopes package to infer if scoped features
are enabled with a concrete struct that is injected to consumers. This
permits tests to toggle scopes features without having to specify environment
variables.
2026-05-29 13:37:25 +00:00
Trent Clarke 8de08c41f1 Reject empty challenges in devicetrust (#67102)
As an empty challenge is never legal, this patch tightens the `devicetrust`
signer and verifier to explicitly reject them.

Changelog: Tightened signature handling in Device Trust
2026-05-29 07:11:52 +00:00
Yassine Bounekhla c28001c8c9 Add web_terminal_copy_mode role option (#66597)
* add web terminal copy mode role option

* CR
2026-05-28 19:58:49 +00:00
Erik Tate 68b0b974e9 Adding missing validations when creating scoped join tokens (#66977)
* adding scoped token validations

* using strong validation when using token
2026-05-28 19:49:10 +00:00
Brian Joerger bac3c70e6a Fix cleanup in session setup failure path (#64649)
* Add test for session setup failure paths.

* Fix session cleanup in failure paths.

* Fix lint.

* Fix exec party not added to session.

* Use defered close.

* Drop enterprise test modules.

* Use InDelta to avoid InEpsilon hack.
2026-05-28 18:40:18 +00:00
Travis LaDuke 0394d3e4a5 UI interaction events protos (#66372)
* Add ui interaction event protos

* make grpc

* Add userEventService method

* Fix signature

* Fix username field

it would have been logging the hash of ""
2026-05-28 18:36:15 +00:00
Brian Joerger 96449be834 Use session params in non-interactive sessions (#64400)
* Use session params in regular session.

* Add regression test.
2026-05-28 17:59:09 +00:00
Carson Anderson 81517e6f42 service: use GracefulExitContext on event waiting (#67146)
It was observed in cloud that proxies will hang on deletion if they lose
connection to auth prior to being terminated. This will cause pods to
hang until the termination grace period is hit which can be quite long
in some cases. Testing this in cloud allowed disconnected proxies to
exit quickly when terminated.
2026-05-28 17:46:33 +00:00
Tyler Richardson 587641f80f Add secondary index for Kubernetes server lookup by cluster name (#67103)
Adds a new function, RangeKubernetesServersWithName, to the cache and
presence APIs that returns an iterator over Kubernetes servers
matching a given cluster name.

Replaces the full scan in IsMFARequiredRequest_KubernetesCluster, which
fetched all Kubernetes servers and filtered in-memory, with a range scan
over a secondary index keyed by cluster name.
2026-05-28 17:09:45 +00:00
Marco Dinis 38be341492 Fix TestDiscoveryServerEKS flaky test (#66905) 2026-05-28 16:42:17 +00:00
Forrest 87f8a28487 scoped agent pins (#66590) 2026-05-28 15:48:36 +00:00
Alex Carrithers 59b1d9f7be Sanitize AWS federation transport errors (#66753)
* Sanitize AWS federation transport errors

* Rename AWS federation redaction helper and tighten test assertions
2026-05-28 15:29:43 +00:00
Grzegorz Zdunek 3f14f042ab Connect: do not crash tsh daemon if user preferences update is nil (#66899)
* Fix `userpreferences.Update` panic on nil request

* Recover from panic in gRPC middleware, add logging for stream handlers

* Use `trace.Errorf` to log stack trace, skip logging the actual panic

* Make panic recovery interceptor the last interceptor

* Replace incorrect `require.Errorf` usage with `require.ErrorContains`

* Use grpc getters instead of direct field access
2026-05-28 15:20:48 +00:00
Marco Dinis 495f821467 Add support for filtering by Organizational Units in IAM Join (implementation) (#66242)
* Allow IAM Join by specific Organizational Units

* fix for account not found scenario

* move checks to write paths instead of checkandsetdefaults

* fix cache
2026-05-28 15:18:10 +00:00
Grzegorz Zdunek 8c6f09e439 Connect: harden osascripts (#67176)
* Harden osascripts for installing/removing tsh

* Harden osascript for VNet setup
2026-05-28 15:06:44 +00:00
rosstimothy 3f03489943 Inject build type into teleportassets.DistrolessImage (#66693)
This is purely mechanical change to inject the build type as a
depency instead of relying on modules.GetModules().BuildType().

In addition to contributing to https://github.com/gravitational/teleport/issues/62799
this also serves as a prerequisite to future work that will provide
a user supplied build type that is not based on the modules to
retrieve the correct image.
2026-05-28 14:17:34 +00:00
rosstimothy e82eceb456 Make resolved access requests immutable (#66736)
Prevent access requests in APPROVED, DENIED, or PROMOTED states from
being updated through SetAccessRequestState, including same-state
updates that could otherwise mutate resolution metadata.
2026-05-28 14:11:41 +00:00
Tiago SilvaandZac Bergquist 3048bc3e36 fix(aws-sync): fix data race and wrong fallback in EC2 fetcher (#67135)
* fix(aws-sync): fix data race and wrong fallback in EC2 fetcher

Fix two bugs in the Access Graph AWS sync EC2 fetcher:

1. Data race in fetchAWSEC2Instances: goroutines were appending directly
   to the shared `hosts` slice instead of accumulating into a per-goroutine
   `lHosts` local slice and flushing it through the mutex-protected
   collectHosts helper. This caused a data race when multiple regions were
   fetched concurrently.

2. Incorrect fallback in fetchInstanceProfiles: on a pagination error the
   function was returning append(profiles, existing...), mixing partial
   new results with the previous sync's data. The correct behaviour is to
   return only the previous sync's profiles unchanged.

Add tests covering both cases with multiple regions, verifiable with -race.

Fixes https://github.com/gravitational/pressure-washing/issues/265
Fixes https://github.com/gravitational/pressure-washing/issues/186

Signed-off-by: Tiago Silva <[email protected]>

* Apply suggestions from code review

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

---------

Signed-off-by: Tiago Silva <[email protected]>
Co-authored-by: Zac Bergquist <[email protected]>
2026-05-28 10:29:18 +00:00
Grzegorz Zdunek 44940fca6e Connect: Avoid falling back to system CA in tshd gRPC server when cert cannot be read (#67038)
* Avoid falling back to system CA when cert cannot be read

* Add test

* Fix flaky test

* Ensure cert is trusted by verifier

* Add explicit comment for non-nil `ClientCAs`
2026-05-28 08:52:15 +00:00
Noah Stride 1bb374784b Convert (Upsert/Delete)Proxy RPC from HTTP to gRPC (#66124)
* Convert DeleteProxy RPC from HTTP to gRPC

* Use `t.Context()`

* Add more greppable TODO

* Fix usage of deprecated rpc

* Upsert RPC

* Use wrapper message for UpsertResponse

* gofmt

* Simplify godoc

* Update response message

* Update method names on public api client

* fix tests

* Introduce UpsertProxyWithoutServer

* Edoardo comments

* separate

* Change to UpsertProxyServer RPC handler
2026-05-28 07:59:00 +00:00
Trent Clarke 4b66b2a7a7 Tightens DMI output parser (#66992)
Fixes an off-by-one error in the `tsh dmi-read` output parser and adds tests for same.
2026-05-28 01:50:34 +00:00
Brian JoergerandErik Tate 6609076e29 Fix Enhanced Session Recording in proxy recording mode (#66918)
* Fix enhanced session recording skip in proxy recording mode.

* Update lib/srv/sess_test.go

Co-authored-by: Erik Tate <[email protected]>

---------

Co-authored-by: Erik Tate <[email protected]>
2026-05-27 23:03:30 +00:00
Pawel Kopiczko 009da4dcc7 MCP: Reject tools/call Requests without lowercase "name" param (#66989)
* MCP: Reject tools/call Requests without lowercase "name" param

* Emit events in processClientRequest callers

* Use mcpClientTransport in tests

* Fix emit event context

* Audit log headers

* Remove unused testJSONString

* Address review

* Add test for empty "name" param rejection
2026-05-27 19:34:58 +00:00
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
Marco Dinis 9fdb5effb6 Fix Azure/GCP IMDS tests when HTTP_PROXY is set (#66996) 2026-05-27 15:42:17 +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