Commit Graph
2739 Commits
Author SHA1 Message Date
nixpig 6f88342fca Add Okta assignment target status to tctl resource output (#67498) 2026-06-09 09:19:44 +00:00
Alex Carrithers 8de3b4f238 tctl: add structured output to status commands (#67201)
* tctl: add structured output to status commands

* tctl: use test context in auto update agent status tests
2026-06-09 08:36:53 +00:00
Pavel 2265165125 Improve role expressions validation (#66030)
* add session filter, access predicate, impersonate checks; fail fast on invalid expressions at create/update

* add list indexes to role validation error messages

* reject wildcards in search_as_roles and preview_as_roles

* validate join_sessions and require_session_join fields

* include index and tool value in mcp.tools validation error

* update commentary

* aggregate errors in ValidateRole

* aggregate errors in ValidateAccessPredicates

* validate linux_desktop_logins templates
2026-06-08 17:35:49 +00:00
rosstimothy 02a758b23a [2] Migration to the Opaque API (#67384)
* Convert existing non-gogo codegen to the Hybrid API

Contributes to https://github.com/gravitational/teleport/issues/66776.

All existing protos explicitly set to API_OPEN have been change to
API_HBYRID. The new codegen was performed via make grpc. There are no
other functional changes to the code to start consuming the Hybrid API
those will come later. The intent is to get all Hybrid codegen in and
backported to ease the transition.

* Initial migration to the Opaque API

Contributes to https://github.com/gravitational/teleport/issues/66776.

All of the changes here are mechanical conversions generated from
`open2opaque rewrite -levels=green ./...`. There will be a follow up
to this in teleport.e which does the same. Once all changes have been
merged the process will be repeated with -levels=yellow followed by
-levels=red.


See https://protobuf.dev/reference/go/opaque-migration/ for more
details.

* [2] Migration to the Opaque API

Contributes to #66776.

All of the changes here are mechanical conversions generated from
open2opaque rewrite -levels=yellow./.... There will be a follow up
to this in teleport.e which does the same. Once all changes have been
merged the process will be repeated with -levels=red.

See https://protobuf.dev/reference/go/opaque-migration/ for more details.
2026-06-08 13:21:41 +00:00
Tiago Silva 679d627839 Fix tctl recordings search pagination and surface fetch errors (#67545)
"Load more" in the recordings search TUI (and --resume-token) failed with
"start_time is required" after the latest access graph update.
Follow-up pages were sent with only the batch_token, relying on the
proto comment that claimed all other filter fields are ignored
once batch_token is set. That contract is wrong: the server validates
and applies start_time/end_time and every other filter on each request,
and the access graph re-checks that the checkpoint falls
within the requested time range.

The batch token is intentionally only a cursor and does not carry the full
search state - encoding every filter into the token would let it grow to
very large sizes. So the original request must be replayed with the
batch_token set on each page. Build the request once and have the fetcher
clone it and attach the token for the initial page, resume, and load-more,
fixing both the TUI and --resume-token.

Also surface the fetch error back to the user: a failed "load more" now
opens a popup with a red header and the server message rendered as code,
instead of silently swallowing the error behind a "(retry)" label.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2026-06-08 12:10:40 +00:00
rosstimothy 4f17314a11 Initial migration to the Opaque API (#67279)
* Convert existing non-gogo codegen to the Hybrid API

Contributes to https://github.com/gravitational/teleport/issues/66776.

All existing protos explicitly set to API_OPEN have been change to
API_HBYRID. The new codegen was performed via make grpc. There are no
other functional changes to the code to start consuming the Hybrid API
those will come later. The intent is to get all Hybrid codegen in and
backported to ease the transition.

* Initial migration to the Opaque API

Contributes to https://github.com/gravitational/teleport/issues/66776.

All of the changes here are mechanical conversions generated from
`open2opaque rewrite -levels=green ./...`. There will be a follow up
to this in teleport.e which does the same. Once all changes have been
merged the process will be repeated with -levels=yellow followed by
-levels=red.


See https://protobuf.dev/reference/go/opaque-migration/ for more
details.
2026-06-05 14:52:58 +00:00
Tiago Silva 7fd409da6b tctl recordings search: rename time flags and add JSON/YAML pagination (#67501)
Rename --from/--to to --from-utc/--to-utc on `recordings search` to
match the `recordings ls` flag naming convention. The old names are
kept as hidden aliases for backward compatibility.

For JSON and YAML output formats, automatically paginate through result
batches until up to 500 sessions are collected rather than stopping
after the first batch. When results are truncated, a --resume-token
hint is printed to stderr so the caller can continue from where the
previous run left off.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2026-06-05 10:36:24 +00:00
Noah Stride 4bb3181f74 Fix missing assignment of ctx including tracing span (#67469)
* Fix missing assignment of ctx including span

* unoffend linter

* Use nolint instead
2026-06-05 09:05:10 +00:00
dependabot[bot] 9a9829a9f3 Bump nix in /tool/fdpass-teleport in the rust group (#67361)
Bumps the rust group in /tool/fdpass-teleport with 1 update: [nix](https://github.com/nix-rust/nix).


Updates `nix` from 0.31.2 to 0.31.3
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.31.2...v0.31.3)

---
updated-dependencies:
- dependency-name: nix
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-04 16:22:11 +00:00
Lisa Kim b0b6b8b663 Move tctl acl command into its own directory (#67334)
* Move tctl acl command into its own directory

Create a accesslist preset file to be referenced later
in future acl commands

* Remakes the original acl_command.go file

This is so that during merging, the enterprise build doesn't break
This file will be removed once all merging is complete.
2026-06-04 01:06:03 +00:00
Lion Chen e2114f2116 Add a Shared User Display Formatter for the CLI (#67293)
* Add FormatUserDisplay helper for CLI user identity output

* refactor: reuse terminal control sequence handling

* update FormatUserDisplay output format for clarity

* fix tests

* test: update TestFormatUserDisplay_CanonicalForms to include empty input case
2026-06-03 21:10:30 +00:00
Kevin 49f98b260e Fix tsh request show output formatting (#66232) 2026-06-03 16:39:57 +00:00
Edoardo Spadolini 5c1c9d157d Disable the embedded session helper by default (#67386) 2026-06-03 09:56:48 +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
Alex Carrithers 3b2b7d1882 tctl: document existing format flags (#67163) 2026-05-29 13:48:14 +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
Ghassan Gedeon Achi 47bfc60239 feat: add detection get command to tctl (#66888)
Adds the `tctl detections get` command that allows you to retrieve the
details of a security alert from Access Graph.
2026-05-28 21:58:12 +00:00
Ghassan Gedeon Achi 23c42032f7 feat(tctl): add detections ls for Access Graph (#66885)
Adds the first user-facing Access Graph tctl command, listing security
detections with filters and a time window.

Talks to Access Graph through the web proxy and relies on the backend's typed
501/credential errors (see access-graph#1998) instead of a pre-emptive
features.json probe, so the CLI stays stateless.
2026-05-28 21:04:32 +00:00
Ghassan Gedeon Achi c316bba716 feat: add shared utils for tctl accessgraph cmds (#66863)
This PR adds some shared helpers that will be used by upcoming tctl
access graph based commands such as `tctl detections ls | get`
2026-05-28 19:57:31 +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
Ghassan Gedeon Achi 5f6d0caf15 Add access graph client and response helpers to tctl (#66724)
* feat: access graph client and helpers

* fix: validate non-nil json success response

* lint: fix go lint ci errors

* fix: address PR review comments

* fix: improvements based on pr suggestions
2026-05-28 17:28:27 +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
Alex Carrithers 22bac96447 tctl: add YAML parity for structured output commands (#67126)
* tctl: add YAML parity for structured output commands

* Add WriteProto Go Doc comment

* Make output format flag visible in evaluate-db-access command

* Make output format flag visible in evaluate SSH command

* remove x509 override dry-run format flag

* refactor: simplify error messages for unknown output formats

* refactor: replace printJSON with utils.WriteJSON and WriteJSONArray
2026-05-28 06:26:09 +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
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
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 2bfaf33b32 Add tsh workload-identity issue-jwt (#66963)
* Add `tsh workload-identity issue-jwt`

* Avoid creating new iface
2026-05-22 09:30:58 +00:00
rosstimothy d90f946b83 fix: Use pointer types for generated protobuf messages (#66777)
Converts non-pointer protobuf generated Go types to pointers
via `open2opaque rewrite -levels=red ./...`. This contributes to
https://github.com/gravitational/teleport/issues/66776 and was done
separately to isolate per proto file migrations in the future.
2026-05-20 18:28:42 +00:00
Julia Ogris 005a2aa755 app: Consolidate app name and public_addr validation (#65728)
* app: Consolidate app name and public_addr validation

Consolidate app `name` and `public_addr` validation to fix six issues
where Teleport rejects valid app names, accepts invalid ones, or
crashes on startup. Preserve backwards compatibility for dynamic and
heartbeat paths: clusters with mixed-case records already in the
backend keep working.

Strict write validation (admin writes + static config):

- App name, static: `IsDNS1123Label` - no dots, max 63 chars.
- App name, dynamic: `IsDNS1123Subdomain` - dots OK for AWS-OIDC,
  max 253 chars.
- `public_addr`: `IsDNS1123Subdomain` - dots OK (it is a hostname),
  max 253 chars.

All three k8s validators also enforce lowercase. RFC 1123 itself
does not -- lowercase is a Teleport convention for interop with
Kubernetes object names.

`ValidateApp` is the single write-time validator, called from
`CreateApp`, `UpdateApp`, `UpsertApplicationServer`, the inventory
control stream, and app service startup. Heartbeats run
`NormalizeAppServerForHeartbeat` first, which lowercases both
`name` and `public_addr` and strips URL schemes and ports, so
heartbeats from older agents end up stored lowercase.

Link: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

* app: Apply review feedback

Address review nits from the PR:

- Use t.Context() in new tests; add t.Cleanup for client Close.
- Drop double Close() in inventory controller tests.
- Use proto getters in identitycenter to avoid panic on nil Spec.
- Replace multi-hyphen regex with strings.ReplaceAll loop.
- Collapse mockRolesAnywhereClient.profiles into pages.
- Retitle and flesh out the CHANGELOG entry.
- Revert accidental enterprise submodule bump.

* app: Apply review feedback

Use proto getters for the remaining `acct.Spec.*` accesses in
`IdentityCenterAccountToAppServer` so the function stays nil-safe end to
end. Fix grammar in the app name doc bullet ("as is a duplicate name" ->
"as are duplicate names").

* app: Preserve Identity Center launch URL

Identity Center accounts surface in the unified-resource cache as
synthetic AppServers and never traverse `ValidateApp` /
`ValidateAppServer`, so the DNS-1123 normalization the previous
commits introduced in `IdentityCenterAccountToAppServer` had no write
path to satisfy. Keep the raw StartUrl in both `URI` and
`PublicAddr`: the web Launch button builds the SSO launch href as
`${publicAddr}&role_name=...`, so stripping scheme, path, port, or
case breaks every Identity Center app launch.

Drop the matching lowercase on `metadata.Name` for the same reason,
and restore the delete handler in `processEventsAndUpdateCurrent` to
its pre-PR shape (rebuild a `KindAppServer` header from the IC
account event, no lowercase).

Rewrite `TestIdentityCenterAccountToAppServer` to assert StartUrl
passes through verbatim; remove the `ValidateApp` round-trip
assertion, which was checking a path the synthetic AppServer never
takes in real callers.

* app: Apply review feedback

* app: Apply review feedback

Tighten the "Stricter application validation" CHANGELOG entry to
focus on the three backwards-incompatible cases: static-config
DNS label, unrecoverable public_addr, and duplicate names within
one agent's teleport.yaml. Expand the write-path list to include
the Terraform provider, Kubernetes operator, and direct API
calls. Note that multi-agent same-name heartbeats remain
supported for load balancing.

* app: Allow underscores in dynamic app names

Swap IsDNS1123Subdomain for IsDNS1123SubdomainWithUnderscore in
ValidateApp, the required_apps loop, and ValidateAppServer. The
strict variant rejected snake_case names that Teleport Cloud and
self-hosted clusters both accept today, breaking the Terraform
provider tests as the canary.

Static yaml (lib/service/servicecfg/app.go) remains strict, since
the rule there is a deliberate breaking change. public_addr also
stays strict, since it is the actual hostname used for routing.

Document the new rule and the strict-TLS-client caveat in the
"Application name" section of connecting-apps.mdx.
2026-05-20 05:04:19 +00:00
Cam Hutchison 54273f91fe fips: Switch to Go-native FIPS140 builds from boring crypto (#66690)
* fips: Switch to Go-native FIPS140 builds from boring crypto

Switch to using Go-native FIPS140 builds, using the GOFIPS140 build
environment variable, from the old boringcrypto FIPS140 build. The
latter is no longer supported now that Go supports FIPS140 builds
natively.

FIPS140 is enabled across the build when FIPS=1 is passed to `make` when
building. The main package of the binaries import the `lib/fipscheck`
package to ensure that a binary is not switched into or out of FIPS140
mode at launch time using the GODEBUG environment variable.

FIPS140 builds of OSS Teleport are not a supported configuration,
however the base of the Enterprise edition is the OSS repository, so
most of the changes are in this repository. Building OSS Teleport in
FIPS140 mode may not be complete.

* fips: Stop using fips buildbox

Stop using the fips buildbox for fips release builds, and just use the
normal centos7 buildbox. The fips buildbox sets
`GOEXPERIMENT=boringcrypto` which should no longer be set when building
with Go-native FIPS140. The fips buildbox is otherwise identical to the
non-fips buildbox.
2026-05-20 00:42:41 +00:00
williamong-tel 7629b951d4 Add scope support to OpenSSH nodes (#64819)
* Add scope support to OpenSSH certificate generation

simplify scopes open ssh connection

Add DeviceVerified and isBot in the signer

tweak signer to be lazily referenced

revert adding login to client

Pass in targetServer to the OpenSSHCertRequest instead - use CheckAccessToSSHServer to check if scoped role has access

Respond to pr review

Changed signature of DialHost to use a struct before it gets too big

Changed requestedHostLogin to login and targetnodescope to targetserverscope

fix build

Update auth_with_roles.go

Update split_access_checker.go

Update agentless.go

Update auth.go

fix test

Update authservice.pb.go

move cert gen

alias auth proto instead and update the test error expectation

rename goproto go googleproto for better readability - address pr feedback

Update integration_test.go

test

fix build

revert merge conflict for applyTraits

Switch to using pinning package to marshal/unmarshal

* respond to PR review

* updated the need for a agents to upsert node

* revert permissions.go change for upserting node

Update auth_with_roles.go

* set gogo proto options to false for openSSHCertRequest so that we can import teleport.scoped.v1.Pin

Update authservice.pb.go

* Add node ID check in upsertNode

* fix test structure

Update auth_with_roles_test.go
2026-05-19 18:41:29 +00:00
Dan Upton ce46e109d0 Add beam-user, beam-admin, and beam roles (#66708)
* Add `beam-user`, `beam-admin`, and `beam` roles

Migrates the beam roles from the cloud tenant controller, adds descriptions, and
marks `beam` as a "system" role so it does not show in the role selector.

Fixes https://github.com/gravitational/beams/issues/137

* Make `host_cert` permissions more restrictive

* Disable beams roles in OSS

* Extract beams login into a constant

* Fix stray quote

* Further lock down the host cert permissions

* Fix role preset tests

* Using `host_cert.role` in expressions doesn't work
2026-05-14 11:50:52 +00:00
Ghassan Gedeon Achi c3d03ddce1 Access Graph credential management plumbing for tctl (#66270)
* feat(tctl): credential management for Access Graph

Adds the `tool/tctl/common/accessgraph` package with the credential
helpers shared by the upcoming experimental Access Graph tctl
subcommands. Helpers only — no subcommand wiring lands here.

Surface:

  - `resolveAccessGraphCredentials`: looks up the keyring by the
    profile's `Name` / `Cluster` / `Username` and bundles it with the
    proxy address.
  - `ensureAccessGraphCert`: fast-paths on a valid cached cert,
    otherwise checks the precondition and re-issues via
    `GenerateUserCerts(Usage=AccessGraphAPI)`.
  - `validateAccessGraphCert{,Expiration,PrivateKey}`,
    `checkAccessGraphSupported`, `issueAccessGraphCert`,
    `issueAndStoreAccessGraphCert`.

Splitting the helpers from the command tree lets this code merge
ahead of #65949 (vendored Access Graph REST client), which is still
in review.

* fix: tighten TTL and share tctl config resolution

Address #66270 review feedback:
- Split the AG persistence floor (accessGraphMinPersistTTL = 5m)
  from the validity buffer (accessGraphCertExpiryBuffer = 2m).
- Add a separate auth-host credential resolver that skips disk
  persistence by returning clientStore = nil.
- Widen tctlcfg.ApplyConfig to return ResolvedConfig{Auth,
  ClientStore, Profile} so the upstream AG dispatcher reuses the
  same profile / identity-file / auth-host detection as every other
  tctl command.

* fix: resolve proxy address from auth Ping

Identity-file mode with `--auth-server=<host>:3025` was wrongly using
that auth address as the AG proxy address. Always backfill
`creds.proxyAddr` from `ping.GetProxyPublicAddr()` on the issue path;
non-`tsh login` resolvers leave it empty. Ping fetch consolidated to
a single call site so `checkAccessGraphSupported` becomes a pure
function over the response.

* fix: set proxy-url from ping when not already set

* fix: exercise private funcs and policy check

* fix: lint error kebab vs snake case

* refactor: drop auth-host flow for tctl ag

Issuing an Access Graph cert on the auth host requires picking an
cluster user to mint the certificate for. Though this is a `valid`
operation in terms of permissions, it's a bit of a footgun so at least
for now we are dropping support for it and replacing it with a more
detailed error message.

* chore: add missing space in auth host error
2026-05-13 16:56:20 +00:00
Dan Upton 6af6676ea8 lib/tbot: Add identity/key-agent service (#66535)
* Use hardware key service when providing an explicit identity file

* lib/tbot: Add `identity/piv-agent` service

* Rename `identity/piv-agent` to `identity/key-agent`

* Allow overriding the hardware key agent with TELEPORT_KEY_AGENT_DIR

* Hardcode knownKey to return true

* Set `RouteToCluster` properly

* Increase timeout for CI

* Report bot failures to help debug CI failure

* Validate destination

* Fix config tests

* Handle the error from `PIVSlotKeyFromProto`

* Fix file permissions and ACLs for multi-user systems

* Prevent accidentally blowing away an important directory if misconfigured

* Respect `TELEPORT_KEY_AGENT_DIR` in `flattenIdentity`

* Fix broken test
2026-05-13 10:04:29 +00:00
randy 0743823ba7 tctl resource: convert login rule handler (#66588) 2026-05-12 13:18:24 +00:00
Ryan Clark 75d317b264 Add session event to enhanced summaries for desktop + other recording type events (#66527)
* Add session event to enhanced summaries for desktop + other recording type events

* Add more comments to proto

* Fix proto numbers

* Handle deprecation in recording TUI
2026-05-12 12:26:59 +00:00
Alan Parra 6bd8a571f2 Match tctl auth export --type in create-override-csr (#66589) 2026-05-11 17:14:56 +00:00
Alan Parra 86efcb30c2 Apply overrides to Windows certificates (#66411)
* Apply overrides to Windows certificates

* Add lib/subca.CalculateOverrideResult.ToClientOverrideDetailsProto

* Propagate CA override details to audit
2026-05-11 17:03:50 +00:00
Jake Alti 900f2957a8 kube: URL-based local-proxy routing for tsh proxy kube (#66099)
* kube: URL-based local-proxy routing

* kube: drop wildcard local CA and SNI prefix

* kube: unexport kubeClusterKey

* kube: add tests for local-proxy path helpers

* kube: write error msg for old URL format

* kube: support both formats to preserve compatibility

* kube: drop misleading 'regenerate kubeconfig' error

* kube: drop in-place request mutation

* kube: fix tests for URL-based routing

* kube: drop legacy SNI fallback in local proxy
2026-05-11 14:54:24 +00:00
Tiago Silva fb98c980ec Add enum value rendering to CLI docs and remove duplicate descriptions (#66466)
This commit enhances the CLI reference documentation by automatically
displaying valid enum values in the "Default" column of flag tables,
eliminating the need to manually list these values in flag descriptions.
It also adds a CI step to verify that CLI reference docs stay in sync
with source code changes.

The core implementation uses reflection to extract enum values from
kingpin flags and formats them as "(valid: `value1`, `value2`, ...)".
All CLI source files have been updated to remove duplicate enum value
lists from flag help text, as these are now automatically rendered.

A new 'cli-docs-up-to-date' Makefile target and corresponding GitHub
Actions workflow job ensure that any changes to CLI flags are reflected
in the generated documentation.

Example output:
Before: |`--format`|`yaml`|Output format, 'yaml', 'json', or 'text'|
After:  |`--format`|`yaml` (valid: `yaml`, `json`, `text`)|Output format.|

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2026-05-08 13:53:15 +00:00
Erik Tate c9ab2aa609 updating deduplication when listing resources to work only within scope boundaries when listing kube clusters (#66339) 2026-05-06 13:32:30 +00:00
Brian Joerger cd592ffddc Fix test not setting expiration for access request. (#66415) 2026-05-05 22:45:05 +00:00
Nibras Ohin 168ce07554 feat: Added basic setup for database access support via vnet (#65298)
* feat: added vnet support for database

* feat: handling some edge cases with db key

* minor improvements and tests

* feat: improve database certificate reissuance and enhance error handling in notifications

* splitting out teleport connect changes to separate pr

* refactor for DRY

* feat: added enforcement to get db-user from wire protocol for supported group of dbs

* added tests

* feat: added vnet filter logic to filter on vnet dns hash from status

* chore: removed db username as not supporting it now

* chore: added protocol validation

* chore: updating on pr comments

* chore: streamline fqdn resoluiont for db and better logging on db name conflict

* chore: simplify db resolution logic by handling multiple matches
2026-05-05 17:41:27 +00:00
Dan Upton 71e8c9a40d Add tsh delegation create-session command (#65029)
* Add test helper for authenticating user

* Add `CreateDelegationSession` RPC

* Add `tsh delegation create-session` command

* Apply login state before checking resource access

* Set max TTL on delegation sessions

* Make `TestBuildCreateDelegationSessionRequest` table-driven

* Prevent sub-delegation for now

* Pass `allowReuse = false` when performing MFA ceremony

* Fix test error message assertion

* Honor the `DisallowReissue` flag

* Use `ttl` variable instead of calling `GetTtl`
2026-05-05 16:17:50 +00:00
Tiago Silva 6fc31cb2db sessionsearch[28]: add resource property filters to tctl recordings search (#66428)
Expose SSH, Kubernetes, and database-specific resource property filters on
`tctl recordings search`, and map them into the session search
ResourceProperties oneof.

Reject mixed resource property variants in a single search request, since the
API accepts only one ResourceProperties variant at a time.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2026-05-05 12:09:02 +00:00
STeve (Xin) Huang 221c16885b VNet HTTP/LLM support: routing and app handler (#65146)
* VNet HTTP/LLM support: routing and app handler

* reject all browser requests

* address pr comments

* fix test after merging master
2026-05-04 16:00:25 +00:00
Alan Parra fbd2c0dc28 Set the force flag for CA overrides on "tctl create -f" (#66334) 2026-05-04 14:11:56 +00:00
Krzysztof Skrzętnicki af2bb1c236 Azure VM support for tctl discovery nodes command (#66288)
* use `DurationVar` for `--last` flag

* use `omitzero` on `Expiry` to actually omit zero time

* `tctl discover nodes`: add Azure VM support

* add `--cloud` filter flag

* add `t.Parallel()` to tests
2026-05-04 13:33:23 +00:00
Cam HutchisonandCam Hutchison 432428fc57 fips: Rename IsBoringBinary to IsFIPSBuild throughout (#66346)
* fips: Rename IsBoringBinary to IsFIPSBuild throughout

Rename the function and method `IsBoringBinary` to `IsFIPSBuild`
throughout the code base and change references to boringcrypto to
fips140 or similar. This is part of removing boringcrypto from the
build, replacing it with Go-native FIPS140.

There are still some references to "boring":
* The PingResponse message has a field IsBoring in authservice.proto.
  This cannot be changed without breaking source compatibility in api/
* The example in examples/teleport-usage has an explicit check for the
  boring package to set an AWS FIPS option. This will be changed when
  the actual change to Go-native FIPS is done.
* Rust references to boringsys - this is still used in Rust and will not
  be changed when using Go-native FIPS.
* The actual import of boring to use it. This will be changed when using
  Go-Native FIPS.

This rename is separate from the Go-native FIPS implementation so it can
be backported to keep the branches close, to avoid unnecessary
conflicts.

* fips: Add "crypto/tls/fipsonly" import for boring builds

Import the "crypto/tls/fipsonly" package when building in fips mode.
This import is also done in the Enterprise repo with some rename magic
so that the file the import is in only exists for fips builds. This was
necessary when boringcrypto was only available in a special branch of
the Go toolchain, but has not been necessary since Go 1.19 when
boringcrypto was brought into the proper toolchain.

Moving this here makes the enterprise makefile and fips build simpler.
There is no need to split this now.

The import causes TLS negotiation to reject non-FIPS140 ciphers.

---------

Co-authored-by: Cam Hutchison <camh@xdna.net>
2026-05-02 10:58:23 +00:00