Commit Graph
19253 Commits
Author SHA1 Message Date
Andrew LeFevreandAndrew LeFevre ac9658cb6c don't allow empty database names or user names for Postgres connections (#45178)
* don't allow empty database names or user names for Postgres connections

* adopt postgres behavior when the database name is empty

---------

Co-authored-by: Andrew LeFevre <Andrew LeFevre>
2024-08-15 18:23:58 +00:00
Brian Joerger ed8c7e1254 Try next x11 display on permission denied. (#45484) 2024-08-15 18:11:40 +00:00
Paul Gottschling d11cc964d1 Fill in missing parentheses (#45511)
See the discussion of #43820 for context.
2024-08-15 18:10:25 +00:00
Zac Bergquist 8184a0d1dc web: fix consistent button use (#45532)
During the recent button redesign we intended to make the top right
button a border button as it's not the single primary action on the
page. We missed a few cases where we used wrapper components.

In addition, use title case consistently for these buttons.
2024-08-15 17:59:00 +00:00
Maxim Dietz 8fb974f464 fix: Don't prompt on leaving completed Discover Enroll flow (#45394)
* Check for `eventName` == `DiscoverEvent.Completed` on current step to
  determine whether to prompt on route change
2024-08-15 16:58:27 +00:00
Gus Rivera c1c08a5f34 Benchmarks Will Now Be Tested During CI (#44486)
* Adding flags for benchmarks in unit test CI

* Upping timeout for unit tests to accomodate benchmarks

* Fixing a typo

* Run benchmarks once

* Adding a makefile target for ci bench test

* Removing a stray quotation

* Compacting workflow

* Benchmarks now with nicer output

* Benchmarks back to their own step

* With error messages

* Adding pipefail to preserve exit code

* Using bash

* Simpler command and including e

* Separating benchmarks into its own workflow

* Fixing benchmarks workflow name

* Ignoring benchmarks that require root

* Updating to account for root and nonroot bench

* Cleaning up the benchmark workflows

* Bench requires test log dir to be created

* Excluding all BenchmarkRoot benchmarks from running

* Bumping benchGetNodes timeout duration to account for some jitter

* Fixing multiplexer benchmark by mirroring unit tests

* Remembered that skip exists

* Skipping BenchmarkGetMaxNodes due to flake

* Fixing formatting of summary

* Actually fixing summary

* Adding another newline

* Simplifying setup for mux listener

* Excluding BenchmarkRootExecCommand
2024-08-15 15:52:59 +00:00
Alan Parra b1b26f5a6c feat: Implement the WebAuthn credProps extension (#45252)
* Add credProps support to webauthn protos

* Update generated protos

* Implement the credProps extension
2024-08-15 13:28:19 +00:00
Noah StrideandPaul Gottschling 079f8065fb Mention modifying the role when configuring Workload Identity IP/DNS SANs (#45432)
* Mention modifying the role when configuring Workload Identity IP/DNS SANs

* Uncapitalize `role`

Co-authored-by: Paul Gottschling <[email protected]>

* Add more instructions about modifying the role

---------

Co-authored-by: Paul Gottschling <[email protected]>
2024-08-15 13:25:33 +00:00
Zac BergquistandCarlos Castro d80ab65401 tsh request ls truncate roles (#45496)
Signed-off-by: Zac Bergquist <[email protected]>
Co-authored-by: Carlos Castro <[email protected]>
2024-08-15 02:34:03 +00:00
Alan Parra fbc481770c chore: Bump Go toolchain to 1.23.0 (#45473)
* chore: Bump Go toolchain to 1.23.0

* Migrate to parquet-go/parquet-go v0.23.0

* Fix TestCustomEndpoint
2024-08-14 22:15:37 +00:00
Alan Parra 33489c41e9 fix: Update terraform docs (#45495)
* fix: Update terraform docs

* Trigger lint check on all relevant docs pages
2024-08-14 21:17:11 +00:00
Paul Gottschling ad3c3ce600 Fix prose linting issues in the changelog (#44969)
The changelog contains a number of inconsistencies with the rest of the
Teleport documentation. For example, while we have moved away from using
"Application Access", "Database Access" and so on in favor of describing
Teleport Access in a more integrated way, the changelog still uses the
outdated phrasing throughout. The changelog also fails to capitalize
Teleport capabilities such as Access Requests and Device Trust.

This change fixes prose linter errors in the changelog to make it more
consistent with the rest of the docs.
2024-08-14 21:12:50 +00:00
Paul Gottschling 933865d04c Remove /ver/ segments from Web UI docs links (#45474)
The Support component is the only Web UI component that renders docs
links that include the `/ver/` path segment. This change removes the
`/ver/` path segment from these links so they point to the default
version of the docs. The user can use the version dropdown within the
docs site to adjust the version. This change does not alter UTM
parameters.

With this change, we only need to manage redirects in the default
version of the docs site. This makes it less likely that users will
encounter 404 errors. And since the docs site only displays the current
version and previous two versions, link targets with the `/ver/` segment
will 404 in EOL Teleport versions. This change also prevents that
scenario.
2024-08-14 20:44:36 +00:00
Paul Gottschling 3ce48457ac Add config generation to Labels guide (#45450)
Closes #45368

Include instructions to generate a Teleport config that enables the SSH
Service, which is the service that the guide assumes a user has enabled.
2024-08-14 20:32:29 +00:00
rosstimothy c9f9f12353 Fix race in TestAgentMetadata (#45491)
Closes #45490
2024-08-14 20:09:58 +00:00
Gus Luxton 9929379438 docs: Clarify language around outbound IPs used (#45486)
* docs: Clarify language around outbound IPs used

* Not agent

* Why is this so hard
2024-08-14 19:09:03 +00:00
Maxim Dietz c6bb8bde17 feat: Show external link icon on unguided discover resource tiles (#45335)
* Show `ExternalLinkIcon` on unguided discover resource tiles to make more evident they link out to docs

* Make guided discover resource tiles buttons, add focus styling
2024-08-14 18:11:50 +00:00
Andrew Burke cdab219511 Remove unused access request functions (#45348) 2024-08-14 17:10:17 +00:00
Paul Gottschling 8ff2e532d8 Organize the Infrastructure as Code section (#45269)
- Rename misleadingly named pages related to managing Login Rules with
  IaC tools.
- Organize guides into thematic subdirectories. Currently, the
  Infrastructure as Code section includes all guides on one level, which
  makes it difficult to navigate.
2024-08-14 16:08:19 +00:00
Gabriel Corado a9df5e948d Enable debug service on default config (#45464)
* feat(servicecfg): enable debug service on default config

* test(tsh): disable debug service on tsh testing to avoid long path error
2024-08-14 15:06:15 +00:00
Alan Parra dfbbba60ff chore: Bump golangci-lint to v1.60.1 (#45469)
* chore: Bump golangci-lint to v1.60.1

* Fix new golangci-lint offenders

* Fix api/ lint offenders
2024-08-14 14:46:57 +00:00
Zac Bergquist 7a7ecc8e04 storybook: respect VITE_HTTPS_CERT and VITE_HTTPS_KEY (#45437)
At some point, we started looking for certs hard-coded locations
and stopped respecting the VITE_HTTPS_CERT and VITE_HTTPS_KEY
variables.

This commit restores the original behavior as documented in
web/README.md.
2024-08-14 14:24:45 +00:00
Taras 63c63b8ce3 docs: fix join token links in config reference comments (#45165) 2024-08-14 13:58:13 +00:00
Steven MartinandSteven Martin 766f63a403 docs: update session_tracker reference (#45449)
* docs: include k8s in session_tracker reference

* docs: update session.participants verbiage

* docs: update verbiage for session_tracker.participants

---------

Co-authored-by: Steven Martin <[email protected]>
2024-08-14 13:16:40 +00:00
Noah Stride 4eefb33aaa Workload Identity: Support Envoy SDS API (#43958)
* Start hacking on Workload Identity SDS API support

* Actually generate from SVIDs/Trustbundle

* Support for envoy "special meaning" resource names

* Add minimum version enforcement

* Simplify handling of clustername

* Start working on StreamSecrets RPC

* Extract response generation helper

* Log request

* Implemnt SDS versioning/nonce checking

* Handle renewal of SDS certs

* Refactor for ease of testing

* Start writing tests for SDS functionality

* Add E2E tests

* Fix test

* go mod tidy

* Appease linter

* Update go.mod

* Fix test with characters that windows dislikes
2024-08-14 11:42:12 +00:00
Tiago Silva 54eb30534b fix secretscanner package name typo (#45441) 2024-08-14 07:54:30 +00:00
Zac Bergquist 95201b8af3 Improve the output of tsh sessions ls (#44496)
- Rename "hostname" to target, which now includes the OS-user for SSH
  sessions and a more accurate description of the target for other
  kinds of sessions.
- Remove the "login" column, as this info is now included in the
  "target" column.
- Humanize the created time rather than showing a UTC timestamp.
  The tsh sessions ls command is most commonly used to get the ID
  of a session you want to join, so people are looking for clues
  as to which session is the right one, they don't need precise UTC
  timestamps.
- Remove the "command" column, as it's typically only set for
  non-interactive sessions. Note: the command will be placed in
  the "address" column for kube sessions.

Closes #42253
2024-08-13 22:01:34 +00:00
Brian JoergerandSakshyam Shah d26ca00120 Add teleport networking subprocess for port/agent/x11 forwarding (#43756)
* Add networking subprocess for port and agent forwarding.

* Remove extraneous x11 forwarding logic.

* Add x11 forwarding to the networking subprocess.

* Fix lint.

* Try create host user before starting networking process.

* Resolve comments

* Fix networking process memory leak.

* Run networking subprocess as root but change to user login after PAM call.

* Update agent forwarding socket dir permissions.

* Handle networking requests synchronously to maintain the current PAM context.

* Use user environment in networking process.

* Fix issue with PAM thread state being locked to the main goroutine; Clean up homeDir logic; Fix PAM thread state for xauth commands.

* Selectively handle some networking requests in goroutines.

* Address comments.

* Use an interrupt signal to trigger graceful exit in the networking subprocess.

* Cleanup unix sockets from the child namespace.

* Address comments.

* Remove extraneous network forwarding socket validation.

* Fix tests and lint.

* Re-add networking process done channel to avoid deadlocks on reading unix sockets passed to a dead process.

* Remove broken test.

* Address comments.

* Cleanup; remove unused child error file.

* - Explicility list file paths to clean up at the end of the networking process.
- Use terminate FD instead of interrupt to signal the process to exit.
- Log errors from the parent process.
- Read networking request response without goroutine.

* Cleanup.

* Make request socket a stream.

* Remove extraneious Chmod.

* Send request level error to request conn.

* Don't unlink unix sockets from the parent process.

* Read full error message from stream.

* Remove remaining logs in child process.

* Fix typos.

* web: support SAML resource deletion in unified resources view (#44311)

* update SAML app edit mechanism to accomodate both edit and delete functions

* use user saml idp access to disable menu actions

* add comment to ResourceActionButton props

* refactor: SamlAppActionContext to edit and delete Saml application

* address review comments

* Add networking process tests to replace old tests.

* Don't close remote file descriptor before the child process has a chance to connect to it.

* Fix lint; skip broken test.

* Disable broken test and restore older test to cover for it.

* Remove unused agent forwarding test.

* Fix lint, replace broken test.

* Fix old test that used testify/require in goroutine.

* Close request context immediately to avoid deadlock (extended timeout) on reading from the closed process.

---------

Co-authored-by: Sakshyam Shah <[email protected]>
2024-08-13 21:59:39 +00:00
rosstimothy 8d12347ec1 Populate tls.Config.NextProtos for teleport specific ALPNs (#43473)
* Populate tls.Config.NextProtos for teleport specific ALPNs

Any alpnproxy.HandlerDesc that forwards TLS or provides its own
tls.Config is responsible for setting the tls.Config.NextProtos so
that the negotiated ALPN is returned to clients. In all other cases
the proxy web tls.Config is used which populates the next protos
with _all_ supported ALPN protocols. All of the existing places
that the default tls.Config was being overridden were supplying
the NextProtos. This updates them to populate the NextProtos with
the correct values and updates the commentary on alpnproxy.HandlerDecs
to indicate that NextProtos should be set if not using the default
tls.Config.

Fixes #41500.

* fix: add test that validates negotiated protocols
2024-08-13 19:41:13 +00:00
Gus Luxton d2b76a0235 docs: Add screenshots for troubleshooting device trust in web UI (#45380)
* docs: Add screenshots for troubleshooting device trust in web UI

* Wording

* Updates from code review

* Typos

* Typos
2024-08-13 18:05:35 +00:00
Anton Miniailo 5bb36de906 Check if integration is present when deciding if we should setup access entry. (#45354)
This was causing permissions problem, integration didn't have required "eks:DescribeAccessEntry" permissions that
was used to setup access entry. But we don't need it in case of integration-based auto-discovery.
2024-08-13 17:54:49 +00:00
Nic Klaassen 6eb6b981b3 Split user keys for k8s access (#44779)
* split user keys for k8s access

* remove unnecessary loop

* prevent race when reading/writing key/cert pairs

* reuse RSA keys

* single file for kube key and cert

* update comment with file layout
2024-08-13 17:41:33 +00:00
Michael b6068bbc05 Update user invite logo (#45433)
This PR removes more traces of the old logo and updates the user invite
page to use the correct logo per version
2024-08-13 17:41:13 +00:00
Nic Klaassen b5df678e22 improve error when proxy has untrusted HTTPS cert (#45344) 2024-08-13 16:11:50 +00:00
Forrest fb967d8a93 improve loadtest watch cmd (#44844) 2024-08-13 15:52:20 +00:00
Alan ParraandPaul Gottschling 7086f7a126 Document passkey "upgrade" behavior (#45254)
* Document passkey "upgrade" behavior

* Grammar/capitalization

Co-authored-by: Paul Gottschling <[email protected]>

---------

Co-authored-by: Paul Gottschling <[email protected]>
2024-08-13 14:59:54 +00:00
Zac Bergquist db827bfd4e Fix the Okta SSO guide (#45346)
It looks like the guide intends for you to set up two Okta groups
(okta-dev and okta-admin) that map to Teleport roles.

The Teleport roles that the guide refers to are incorrect though.
For the okta-dev group, the guide has to create a "dev" role, but
then configures an SSO connector to assign you the preset "access"
role and the "dev" role goes unused.

Additionally, the okta-admin group refers to an "admin" role, but the
SSO connector that you set up maps users to the "editor" role.

Correct the guide to properly use the "dev" role that it asks you to
create and to replace mentions of "admin" with "editor".

Closes #28660
2024-08-13 14:39:27 +00:00
Steven MartinandSteven Martin 524a3c6181 update referring to local users in tctl (#45204)
Co-authored-by: Steven Martin <[email protected]>
2024-08-13 14:35:23 +00:00
Michael d54eb78568 Fix empty join token state (#45413)
Empty join token responses would show an error instead of an empty list
message
2024-08-13 14:13:55 +00:00
Anton Miniailo 6628b35861 Fix error reporting for EKS enrollment in Discover UI. (#45404) 2024-08-13 14:01:02 +00:00
Steven MartinandSteven Martin dd2261b70d docs: rfd spellfixes (#45403)
Co-authored-by: Steven Martin <[email protected]>
2024-08-13 13:50:53 +00:00
Grzegorz Zdunek ca05dd139d Show a warning in tsh when connecting to a too old cluster (#43461)
* `MeetsVersion` -> `MeetsMinVersion`

* Add `MeetsMaxVersion`

* Show a warning if tsh version is newer than server

* Replace new usages of `utils.CheckVersion` with `utils.CheckMinVersion`
2024-08-13 09:31:38 +00:00
Noah Stride 120c07981c Fix Machine ID Onboarding UI (#45305)
* Fix tbot onboarding flow in UI

* Fix Machine ID bot onboarding
2024-08-13 08:48:39 +00:00
Alan Parra 368de67fae Drop unnecessary key.SetBackupFlags from test (#45396) 2024-08-13 07:24:46 +00:00
Paul Gottschling 2518243c04 Add a "generated" note to Helm ref partials (#45030)
Closes #44951

Indicate that Helm reference partials were generated and provide the
command to regenerate them.
2024-08-12 23:23:15 +00:00
Forrest 983da44252 heartbeat slightly more frequently on disruption (#44715) 2024-08-12 23:06:52 +00:00
Paul Gottschling c0cadb38b0 Simplify the edition name linter (#45155)
Instead of "Teleport Enterprise Cloud", recommend a consistent value.
Previously, the linter's recommendation was more subject to
interpretation.
2024-08-12 22:06:57 +00:00
Forrest 28fc7a7113 ensure event handler starts loading next batch in background (#45171)
* ensure event handler starts loading next batch while current batch is being processed

* go mod tidy
2024-08-12 21:13:15 +00:00
Alan Parra fc695291b4 feat: Backfill WebauthnDevice.ResidentKey field (#45222)
* Test key "upgrade" during passwordless logins

* feat: Backfill WebauthnDevice.ResidentKey field
2024-08-12 20:35:36 +00:00
Steven MartinandPaul Gottschling 24567621f6 docs: include GCP web console with cloud APIs (#45386)
* docs: include GCP web console with cloud apis

* docs: update gcp console ref

Co-authored-by: Paul Gottschling <[email protected]>

---------

Co-authored-by: Paul Gottschling <[email protected]>
2024-08-12 20:02:48 +00:00