Commit Graph
21436 Commits
Author SHA1 Message Date
Yassine Bounekhla 5b4dee8bd0 periodically create access list reminder notifications when needed (#51581) 2025-01-31 15:59:23 +00:00
Pawel Kopiczko a3150103ee Restore field order in UpdateIntegrationRequest proto (#51709)
* Restore field order in UpdateIntegrationRequest proto

Restore field order after https://github.com/gravitational/teleport/pull/51637. It turned out those
fields got to v17.

* Add temporary protobuf liter exception
2025-01-31 15:58:41 +00:00
rosstimothy 6fa487296a Convert lib/services to use aws-sdk-go-v2 (#51706)
There was only one usage of the legacy sdk, a call to arn.IsARN,
which has a direct replacement in the v2 arn package.
2025-01-31 15:53:33 +00:00
STeve (Xin) Huang 7b160600b8 Fix misaligned command usage for 'help' commands of Teleport binaries (#51660)
* Fix an issue command help is not aligned for help command

* align when unknown command/subcommand
2025-01-31 15:35:31 +00:00
Hugo Shaka a539832762 Ensure proxy version getter adds the leading 'v' (#51687) 2025-01-31 14:49:31 +00:00
rosstimothy 2c1280c0d5 Improve web ui host dialing for file transfers (#51447)
Converts web file transfers to use the same in process dialing that
web sessions use. This eliminates extra latency by avoiding an SSH
dial from the proxy to the proxy as a result of no longer using
client.TeleportClient to establish the connection to the target host.

Closes https://github.com/gravitational/teleport/issues/24419.
2025-01-31 14:09:27 +00:00
Bartosz Leper 797936d9e2 Support more fields in the role editor (#51458)
* Add more fields to the role editor

* Review
2025-01-31 14:00:13 +00:00
Steven Martin 38e28dd375 docs: update github integration (#51678) 2025-01-31 13:00:31 +00:00
Gabriel Corado 33dce48683 feat(usagereporter): add user agent to database session start usage event (#51591) 2025-01-31 12:54:45 +00:00
Edoardo Spadolini 724457ad34 Stable UNIX users: docs (#51662)
* Stable user UID addition to the host user creation guide

* tctl stable-unix-users-ls docs

* CAP resource reference

* auth service reference

* Uncomment defaulted field in fileconf

* Clarify conditions for stable uids
2025-01-31 11:43:10 +00:00
Steven Martin a20a7630eb update tsh github login command description (#51605) 2025-01-31 11:39:39 +00:00
rosstimothy 1edb69677b Convert examples/teleport-usage to aws-sdk-go-v2 (#51677)
* Convert examples/teleport-usage to aws-sdk-go-v2

* fix: apply fips to global config
2025-01-31 11:34:17 +00:00
Pawel Kopiczko 88e1cd402e Revert "Add temporary protobuf liter exception" (#51699)
This reverts commit 6fc264ae2c from PR #51637.
2025-01-31 09:35:23 +00:00
Marco Dinis f18259727d Allow Regions query when listing ECS Services (#51585)
Listing ECS Services requires an AWS Region.
Instead of guessing the AWS Regions, this PR allows the API Client to
send a list of AWS Regions which are used call the ECS APIs
2025-01-31 09:02:17 +00:00
rosstimothy 2f9bd2af8f Remove unused aws-sdk-go S3 metrics wrapper (#51674)
The wrapper is no longer used since all S3 code has been converted
to use aws-sdk-go-v2.
2025-01-30 23:42:28 +00:00
rosstimothy f2401d54c3 Stop using default aws http client in access plugins (#51683)
Updates the servicenow and opsgenie plugins to create an http
client manually like all other access plugins. In addition to
unifying client creation, this allows us to remove the dependency
on the legacy aws sdk.
2025-01-30 23:41:47 +00:00
Gavin Frazar ee119ea6d6 Remove remaining db and discovery AWS SDK imports (#51628)
This eliminates all remaining references to AWS SDK v1 in the
lib/srv/db/... and lib/srv/discovery/... packages.
Most of the changes are simply to remove dead code.
2025-01-30 23:06:09 +00:00
rosstimothy 32d2aa9515 Remove aws-sdk-go depdenency in bot tests (#51680)
The use of static credentials in the test was unnecessary and the
same result can be achieved using static strings.
2025-01-30 22:06:58 +00:00
Pawel Kopiczko a24fe3e258 Okta API: Remove unused fields and update docs (#51637)
* Okta API: Remove unused fields and update docs

* Add temporary protobuf liter exception
2025-01-30 20:46:15 +00:00
Gavin Frazar b69d49b2a2 Simplify lib/utils/aws (#51627)
This eliminates the SigningService in favor of a free function
SignRequest, which eliminates AWS credential loading and simplifies the
AWS utils package.
In the process of doing this refactor, the AWS app handler has been
changed to use AWS SDK v2 to load its credentials as well.
2025-01-30 20:14:45 +00:00
Vadym Popov e3c36a0dbf Remove timeout for TestUpdate (#51666) 2025-01-30 20:07:49 +00:00
Nic Klaassen c0b3e62f25 [vnet] refactor osconfig (#51577)
* [vnet] refactor osconfig

This PR refactors VNet's OS configuration code.
There is now a `osConfigurator` struct that runs the OS configuration
loop and calls out to a `targetOSConfigProvider` which determines the
current target OS configuration.
This `targetOSConfigProvider` can be implemented for the MacOS daemon
process by moving some of the existing code around.
In a following PR I will implement it for Windows which will call out to
the user process to get the current target OS configuration.

This PR doesn't really change any of the logic that runs on MacOS, it
just refactors things so that we can swap in a different implementation
for Windows.

FYI, after I get the Windows code fully working, I plan to migrate the
MacOS code to follow the new way Windows handles things, where the admin
process handles all networking and calls out to the user process for
everything that uses a Teleport client.
This will unify multiple codepaths and eliminate the
profileOSConfigProvider added here.

* fix lint on linux

* use ip-aware function to compute TUN address
2025-01-30 18:55:32 +00:00
Zac Bergquist f14c4c75aa Don't emit SSO failures to audit log for illegitimate requests (#51614)
SSO flows are initiated via unauthenticated APIs, so it's not uncommon
to see spam from security tools or malicious bots probing. If we can
tell that these are not legitimate SSO attempts then we avoid emitting
falures that clutter the audit log.
2025-01-30 18:01:56 +00:00
STeve (Xin) Huang 176488fa3b add MongoDB auto-user provisioning prereq (#49478)
* add MongoDB auto-user provisioning prereq

* try without Admonition
2025-01-30 17:52:51 +00:00
STeve (Xin) Huang f44af9b61d [docs] PostgreSQL auto-user provisioning guide minor edits (#48897)
* [docs] PostgreSQL auto-user provisioning guide minor edits

* remove admin option from rds_superuser and add note on admin option for each role
2025-01-30 17:52:43 +00:00
Brian Joerger f4514b4d34 Address todos. (#50417) 2025-01-30 17:40:46 +00:00
Paul Gottschling 7d042c15b4 Upgrade Vale in the prose check workflow (#51619) 2025-01-30 17:03:21 +00:00
Gavin Frazar 5fb00a4aee Migrate AWS session to SDK v2 (#51626)
Only DynamoDB and AWS MongoDB Atlas depended on GetAWSSession, and the
migration for these packages was trivial.
Since this was the last AWS method in lib/cloud/clients, the vast majority
of the changes are to remove dead code.
2025-01-30 16:51:33 +00:00
Marco Dinis 476c9e40f1 DiscoveryConfigStatus: update counters once per iteration (#51647)
DiscoveryService can process DiscoveryConfig matchers and will update
its Status field depending on the number of found resources.

Currently, it was updating them in real-time-ish: every time it found a
new resource, it would update the counter in memory and propagate that
change into the cluster shared storage.

However, this resulted in counters flutuating a lot and causing
confusion from the user's point of view (being at 0 every couple of
minutes).

Instead, this PR, ensures we update the values only once per iteration
cycle (happens at discovery_service.poll_interval - defaults to 5
miunutes).
This means we lose real-time observation of the counters, but we gain
stability on the values which should help UX.
2025-01-30 16:27:14 +00:00
rosstimothy a5131a09eb Add Audit Log tab to tctl top (#51620)
The new tab consumes `audit_failed_emit_events`,
`teleport_audit_stored_trimmed_events`, and
`teleport_audit_emitted_event_sizes` to help troubleshoot issues
related to audit log backends. The metrics are displayed in graphs
which illustrate the change in metrics over the sampling period.
2025-01-30 16:03:00 +00:00
Grzegorz Zdunek 937e4a9ac9 Redesign profile switcher (#51419)
* Add mapping of profile color to theme color

* Prepare UserIcon to display colors, make it slightly larger

* Rewrite single identity item to show icon and user/cluster in separate lines

* Render single cluster items in a list

* Add color picker

* Render active cluster separately, above inactive clusters

* Put the new identity components together

* Refactor `Identity` story, render the container component instead of "presentational" one

* Refresh startup page

* Minor style fixes

* Add comment about `dataVisualisationColors`

* Bring back the original styling of `StaticListItem`

* Make the pencil icon hoverable and clickable

* Increase min-width from 200 px to 300 px, simplify active cluster layout

* Show logout button when any part of `ListItem` is hovered

* Remove text from logout button, improve titles

* Pass correct index number to `AddClusterItem`

* Update comment for `focusGrabber`

* Use `useStoreSelector` correctly

* Improve accessibility of color picker

* Replace Pam icon with plus symbol

* Remove unnecessary optional chaining

* Align profile status error with user icon

* Add story for cluster connect panel

* Make user icon letter follow active theme

This was suggested by Kenny, and I think it looks good.

* Change gap from 11 px to 10 px

* Rename profile color -> workspace color
2025-01-30 15:48:05 +00:00
Grzegorz Zdunek 3b1c68947d Store profile color in workspace (#51417)
* Adjust workspace tests to accept persisted workspace type

* Store profile color in workspace

* Replace manual workspace creation in stories/tests with `addRootClusterWithDoc`

* Fix checking if all colors are taken

* Add DELETE IN comment

* `ProfileColor` -> `WorkspaceColor`

* Lint

* Prettier

* Add TODO about creating workspaces in `setActiveWorkspace`
2025-01-30 15:28:05 +00:00
Tiago Silva 0380866cb3 kube: fix transport being incorrectly cached by kube service (#51640)
PR #46899 introduced a subtle change in Kubernetes service behavior, where the direct transport—kube agent to Kubernetes API—is now cached for five hours.

This disrupts auto-discovery because tokens are only valid for 15 minutes, while the HTTP transport that applies them remains valid for five hours. As a result, the Kubernetes service continues using the same expired token for 4 hours and 45 minutes.

This PR resolves the issue by preventing token caching altogether.

Fixes #51639

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2025-01-30 14:51:51 +00:00
Tiago Silva 86773c1109 kube: fix race when unregistering kube cluster (#51641)
PR #51448 replaced the `x/exp/maps` with stdlib `maps` but there is a
subtle change, the `x/exp/maps` automatically collects the map values
when `maps.Values` and the stdlib package returns an iterator.
Since we were collecting the values under a lock, the iterator approach
doesn't held the lock during actual map range causing a datarace with
other code.

This PR fixes that by collecting the iterator values while holding the
lock.

Fixes #51572

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2025-01-30 14:51:47 +00:00
Noah Stride 9c5f8f7481 Track usage by BotInstanceID (#51540)
* Add BotInstanceActivitySupport to usage reporting

* Wire BotInstanceActivityReport into submitter

* Share userActivityLock

* Add test for bot instance

* TestBotInstanceActivityReportSplitting

* Use 15minute interval rather than hourly

* Switch to compound key for botInstanceActivity map

* ADjust lolck name
2025-01-30 13:28:07 +00:00
Stephen Levine ba65e79c6a [teleport-update] Add --overwrite flag to replace tarball installations (#51579)
* add --overwrite flag

* extra warning
2025-01-30 00:35:37 +00:00
Stephen Levine 6a8c0b5330 [teleport-update] Adjustments for SELinux (#51474)
* selinux fixes

* extra checks

* lint

* lint

* cleanup

* better cleanup

* fix rebase
2025-01-29 23:48:31 +00:00
rosstimothy b25252a39e Prevent reauthentication for tilde prefix expansion errors (#51464)
In https://github.com/gravitational/teleport/pull/24254 expansion
of tilde prefixes(i.e. `tsh scp CHANGELOG.md root@host:~foo/`) was
explicitly denied. However, because the error returned to the user
is a trace.BadParameter error the reauthentication logic kicks in
and attempts to resolve the issue with fresh credentials. This
error is now caught and wrapped in a NonRetryableError to prevent
the authentication logic from providing a weird UX.

Updates https://github.com/gravitational/teleport/issues/22886.
2025-01-29 22:48:01 +00:00
Zac Bergquist 08fcdd02af docs: update CA import instructions for HSMs (#51530)
Now that #51301 is merged, we have the ability to get all of the
active user CA certificates.
2025-01-29 22:20:58 +00:00
Gavin Frazar a9be7dbfbb Migrate AWS STS client to AWS SDK v2 (#51573) 2025-01-29 21:16:56 +00:00
Alan Parra 533202f18c fix: Randomly derive UUIDs from non-conformant session IDs (#51571)
* Tests event with non-UUID session ID

* Randomly derive UUIDs from non-conformant session IDs

* nit: Use "" instead of ``

* Link godoc references to Log.deriveSessionID

* Mention UUIDv5 for derived IDs

* Do not log the session ID

* Rename test helper, move truncateEvents out of it
2025-01-29 21:15:12 +00:00
Andrew Burke a67d70b436 OCI join - add proto and client (#51444)
This change adds protos, the client, and a bunch of boilerplate
for the Oracle join method.
2025-01-29 20:11:16 +00:00
Gavin Frazar 46c5e1901c Migrate AWS SecretsManager clients to AWS SDK v2 (#51150) 2025-01-29 20:04:36 +00:00
Zac Bergquist ac8640bfd1 docs: add a dedicated section to desktop LDAP discovery (#51515)
Closes #51485
2025-01-29 19:58:28 +00:00
Michael 7519724eaf Use updateRole only when roleDiffProps exist (#51603) 2025-01-29 18:19:38 +00:00
Edoardo Spadolini cc77fcebdf Stable UNIX users: functionality (#51200)
* wiring the API client through

* tctl stable-unix-users ls

* stable UID fallback for Teleport SSHD

* stable_unix_user.create event

* fix-license

* Require and test audit log message

* Add stable_unix_user_config to fileconf

* Avoid saying "fallback UID" in logs

* Avoid saying "fallback UID" in error messages

* Avoid racing writes in the mock emitter

* pnpm lint-fix

* fix lib/auth tests that broken during rebase
2025-01-29 18:15:57 +00:00
Tiago SilvaandGavin Frazar b61e70ea19 netiq: add plugin install prompt (#51502)
* netiq: add plugin install prompt

This PR adds the plugin prompt code to read the required parameters to
create the netiq plugin.

Part of https://github.com/gravitational/access-graph/issues/634

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add license

* Update netiq.go

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>

* Update netiq.go

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>

* Update netiq.go

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>

* handle review comments

* Apply suggestions from code review

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>

* Apply suggestions from code review

Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>

* consolidate prompt methods

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>
2025-01-29 17:57:26 +00:00
Krzysztof Skrzętnicki e42d2005fc fix panic in CheckSAMLEntityDescriptor (#51583) 2025-01-29 17:49:57 +00:00
Alan Parra 4400d8b91f Revert "fix: Take TTL into account when renewing sessions (#49732)" (#51592)
This reverts commit ec870e156a.
2025-01-29 16:39:10 +00:00
Alan Parra 3de02ce6a0 docs: Instruct WSL device trust users to use tsh.exe (#51551) 2025-01-29 16:35:54 +00:00