Commit Graph
20781 Commits
Author SHA1 Message Date
rosstimothy f8bfc867c6 Bump azure dependencies to latest versions (#49970)
# Updates

- github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v3 -> v6
- github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2 -> v3
- github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v2 -> v6
2024-12-10 14:05:29 +00:00
Steven Martin f10b154c73 docs: update integrations image (#49954) 2024-12-10 14:02:19 +00:00
Paul Gottschling e7a16ccf8c Fix Vale warnings in the Access Monitoring guide (#49958) 2024-12-10 13:25:48 +00:00
Trent Clarke 4abb0f4c8d Fixes IC Account Assignment role matcher (#49977)
* Fixes IC Account Assignment role matcher

Fixes issue where the IC Account Assignment role matcher constructor created
the wrong type of Role Matcher, meaning that the any Account Assignment would match
as long as the account matched, regardless of the Permission set.

* tests
2024-12-10 11:40:51 +00:00
Noah Stride 904d4f99e6 Workload ID: Add WorkloadIdentity CRUD gRPC Service (#49639)
* Add WorkloadIdentity store and cache

* Add WorkloadIdentity CRUD service
2024-12-10 10:34:14 +00:00
Bartosz Leper 7252e1ce16 Add the options panel to role editor (#49801)
* Add admin rule tab to the role editor

Also tightens some constraints about standard role editor conformance.

* Add a way to delete an admin rule

* Add the options panel to role editor

* Review

* Review
2024-12-10 09:46:28 +00:00
c6e46e3262 Workload ID: Add WorkloadIdentity local service and cache config (#49942)
* Add WorkloadIdentity store and cache

* Update lib/services/local/workload_identity.go

Co-authored-by: Edward Dowling <EdwardDowling@users.noreply.github.com>

* Update lib/services/local/workload_identity.go

Co-authored-by: Edward Dowling <EdwardDowling@users.noreply.github.com>

* Update lib/cache/resource_workload_identity.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

---------

Co-authored-by: Edward Dowling <EdwardDowling@users.noreply.github.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2024-12-10 09:22:09 +00:00
teleport-post-release-automation[bot]andGitHub 7c1efaf389 [auto] Update AMI IDs for 17.0.4 (#49861)
Co-authored-by: GitHub <noreply@github.com>
2024-12-10 02:51:16 +00:00
marieandRafał Cieślak b929674c30 docs: update images for master and v17 (#48824)
* updated images for master and v17

* image and link edits

* image updates

* image updates - arch

* image updates - desktop and k8 diagrams

* updated UI screengrabs post-feedback

* updated UI screengrabs - desktop

* updated UI screengrabs post-feedback

* move image to correct path

* restoring connect-my-computer-setup

* replacing missed images

* replacing missed images

* a few more image changes

* a few more image changes

* image updates - post feedback

* Update docs/pages/admin-guides/access-controls/sso/github-sso.mdx

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* empty ref - image was removed

* empty ref - image was removed

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2024-12-10 02:00:31 +00:00
rosstimothy 6c51c4e1b2 Filter while paging in GetByVMID (#49968)
This updates GetByVMID, used by azure joining, to filter by id for
each page of vms instead of filtering after accumulating _all_ vms
in memory first. While this does reduce memory consumption, the listing
process is still suboptimal in that _all_ instances in a subscription
are retrieved in response to _every_ join request.
2024-12-10 00:52:16 +00:00
Brian Joerger 4677873a27 WebUI MFA methods refactor (#49679)
* Replace fetchWebAuthnChallenge with getChallenge.

* Replace getWebauthnResponse with getMfaChallengeResponse.

* Update getMfaChallengeResponse to take DeviceType and otp code.

* lint fix.

* Fix tests.

* Fix lint.
2024-12-10 00:40:36 +00:00
Nic Klaassen 986bad7fdf chore: restructure vnet for windows support (#49921)
* chore: restructure vnet for windows support

In preparation for adding Windows support to VNet, I have restructured
the package/file structure a bit in a way that I think makes more sense
and narrows the scope of OS-specific code.

I also unexported some identifiers that did not need to be exported, in
an attempt to make it more clear what is actually called from outside
the vnet package.

This commit does not make any functional changes except for adding the
hidden `tsh vnet` and `tsh vnet-admin-setup` commands on windows that
will just return errors.

* fix renames in comments

* switch reexec to escalate

* fix-imports
2024-12-09 22:51:24 +00:00
rosstimothy 622e5782a6 Consistently use logutils.TypeAttr (#49948)
When converting to slog there have been various mechanisms used
to include an objects type in a slog attribute to replace %T from
a logrus message. This unifies all type attribute to use
logutils.typeAttr instead of calling reflect/fmt directly. The former
ensures that the type is only calculated if the message is going
to be logged.
2024-12-09 21:10:59 +00:00
Przemko Robakowski a5f93646f8 Update IronRDP (#49483)
* Fix most compilation errors

* Fix all compilation errors

* Fix all compilation errors in webassmbly

* lint

* dependency review

* update picky deps

* update deps

* dependency review

* lint
2024-12-09 21:04:36 +00:00
Brian Joerger 21cdf9e1d1 WebUI MFA types refactor (#49678)
* Unify mfa types.

* Move DeviceUsage to mfa/types.

* Refactor mfa options and move to services/mfa.

* Lint fix.

* Fix mfa challenge json.

* Add MFA Option constants.

* Fix lint; Fix test.

* Address comments.

* Add license.
2024-12-09 20:57:12 +00:00
Michael 2de9255eea Update e (#49955) 2024-12-09 20:47:28 +00:00
Paul Gottschling b975c0e5f5 Correct Vale lint errors in partials (#49798)
One edge case is the `structure.architecture-h2` warning in
`docs/pages/includes/database-access/rds-proxy.mdx`. This is technically
correct, since the "How it works" section is before the "Prerequisites"
section. We can determine whether this is a bug to fix in a separate
change.
2024-12-09 19:50:55 +00:00
rosstimothy b69896850f Convert lib/srv/transport to use slog (#49914) 2024-12-09 19:42:15 +00:00
Paul Gottschling c117df3097 Fix Vale warnings in the Google Cloud KMS guide (#49911) 2024-12-09 19:12:20 +00:00
Gus Rivera 26dacb4d86 Updating OS Package metadata: license and description (#49793)
* Updating OS Package metadata: license and description

* Adding community license to tarball

* Updating build-package to include license for OSS package metadata

* Fixing some interpolation errors

* Removing unecessary line

* Cleaning up the metadata formatting
2024-12-09 19:00:37 +00:00
Hugo ShakaandAlan Parra 4aad389b05 Fix flaky TestAgentRolloutController (#49886)
* Fix falky TestAgentRolloutController

* switch to real clock + increase Eventually timeout

* Make reconciliation period a parameter + add TELEPORT_UNSTABLE env var

* Update lib/service/service_test.go

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Apply suggestions from code review

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Remove env var

* lint

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-12-09 18:38:17 +00:00
Zac Bergquist 373d34bdc2 docs: mention LSA protection (#49729)
The Teleport package that is installed for RDP access as local
Windows users is not signed by Microsoft and therefore will not
load on systems with LSA protection enabled.

Updates gravitational/teleport.e#5615
2024-12-09 18:34:50 +00:00
Bartosz Leper 02141ca95c Add admin rule tab to the role editor (#49764)
* Add admin rule tab to the role editor

Also tightens some constraints about standard role editor conformance.

* Add a way to delete an admin rule

* Review
2024-12-09 17:48:38 +00:00
Gavin Frazar 3208c3d338 migrate tsh common to aws sdk v2 (#49449)
* add AWS SDK v2 migration utils package

* migrate tool/tsh/common to AWS SDK v2

* adapt AWSAccessMiddleware to AWS SDK v2
2024-12-09 17:42:23 +00:00
David BosleeandZac Bergquist 02cadb4c14 auth: fix cluster init deadlock (#49638)
* auth: fix cluster init deadlock

If the bootstrapped resources are created but a failure occurs later
in the cluster init process subsequent runs of the cluster initialization
will fail due to the existing bootstrap resources.

* add test for new behavior

* add test for cluster init failures recovery

* Update lib/services/local/resource_test.go

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* reorder assertion values

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2024-12-09 17:18:36 +00:00
Rafał Cieślak f497513c54 Surface target ports in tsh and Connect (#49688)
* tsh: Print target ports when returning multi-port apps

* Add TCP ports to App message in lib/teleterm

* Connect: Add port selector for multi-port TCP apps

* Add controls to ActionButtons story

* Add control for rendering lots of menu items in ActionButtons story

* Include target port in VNet modals and notifications in Connect

* Empty commit to trigger CI
2024-12-09 16:05:16 +00:00
Michael b91395a715 Hide review box if user cannot review access requests (#49785)
oss counterpart for
https://github.com/gravitational/teleport.e/pull/5628

This adds some testing to the view as well as the equivalent to the web
solution for Connect. Connect was missing the [recently
added](https://github.com/gravitational/teleport/pull/48536)
`ReviewRequests` field in the user ACL, so I added it here.

Because this is handled in the tsh code, we don't have to worry about
backward compatibility here for Connect right?
2024-12-09 14:25:56 +00:00
Rafał Cieślak 331938daf7 Add label and separators for Menu (#49625)
* Rewrite MenuList to TypeScript

* Rewrite design/Menu story to TypeScript

* Refactor MenuLogin story

* Add label and separator for MenuItem sections

* Add proper types for anchor and transform origin

* Fix rendering MenuLogin with a long list of items (#49626)
2024-12-09 14:07:46 +00:00
Alan Parra 57e1345aa3 fix: Respect the --no-allow-passwordless flag (#49899) 2024-12-09 13:25:34 +00:00
Trent Clarke 10925bbaae Add Identity Center Account Assignments to Unified Resource Cache (#49580)
Adds Identity Center Account Assignments to the Unified resource cache
so they can be requested in access requests.

Unfortunately we can't just include an `identitycenterv1.AccountAssignment`
directly in the resource cache ListResources output because the legacy
protobuf codegen used for the authservice and the new codegen used for
identitycenter/v1 produce incompatible serialization code, so resulting
generated code does not compile.

To get around this issue, this change introduces a parallel (and slightly
simplified) definition of an IdentityCenterAccountAssignment in the authservice
protobuf spec to act as the wire format for this type. The cached
`identitycenterv1.AccountAssignment` resources are copied into a
`proto.IdentityCenterAccountAssignment` on a cache read.

Includes:
 - adding resources to cache
 - adding account assignment paginated resource
 - account assignment role condition matching for RBAC
2024-12-09 12:02:36 +00:00
Grzegorz Zdunek e2f3daf524 Convert dialog to authorize web session to regular tab and handle expired certs (#49754)
* Add `AddMetadataToRetryableError` to `AuthenticateWebDevice`

* Add a document for web session authorization

* Replace `AuthenticateWebDevice` modal with the document

* Remove dot from anchor

* Move more logic to `authorizeAndCloseDocument`

* Add a comment about `canAuthorize`

* Filter out documents before restoring session

* Add a comment about `processedRedirectUri`

* Restore filtering out documents before saving them on disk

* Fix test

* Refer to Teleport Connect instead of 'the app'
2024-12-09 11:53:20 +00:00
Steven Martin 0feb6fea7c update WebSocket logging reference (#49924) 2024-12-09 02:36:27 +00:00
Hugo Shaka 58459199d9 autoupdate: reconcile rollout status and add strategy interface (#49735)
* autoupdate: reconcile rollout status and add strategy interface

* fix missing constants + add license

* lint

* fix proto field id
2024-12-06 22:00:01 +00:00
Zac Bergquist c117c705d1 postrelease: prefer the Go version in go.mod's toolchain directive (#49891)
The go tool will automatically remove the toolchain directive if it
happens to be the same as the go directive. This means in order to
reliably get the version of Go that is used to build, we need to first
check the toolchain directive, and fall back to the go directive only
if the toolchain is not specified.

Additionally, the toolchain directive is prefixed with "go", so we
need to strip that to get consistent output.
2024-12-06 20:40:31 +00:00
rosstimothy 607d998fd6 Convert lib/srv/forward to use slog (#49827) 2024-12-06 19:17:21 +00:00
rosstimothy ca04ea36ce Prevent races counting missed heartbeats (#49882)
Increments the `heartbeatsMissedByAuth` gauge directly instead of
keeping a local count and setting the gauge once. This fixes a
race caught in https://github.com/gravitational/teleport/actions/runs/11828850190/job/32959672995?pr=48949.

```
==================
WARNING: DATA RACE
Write at 0x00c003857da8 by goroutine 48258:
  github.com/gravitational/teleport/lib/auth.(*Server).runPeriodicOperations.func3.1()
      /__w/teleport/teleport/lib/auth/auth.go:1471 +0x84
  github.com/gravitational/teleport/lib/services.(*UnifiedResourceCache).getRange.func1.1()
      /__w/teleport/teleport/lib/services/unified_resource.go:239 +0x14d
  github.com/google/btree.(*node[go.shape.*uint8]).iterate()
      /go/pkg/mod/github.com/google/btree@v1.1.3/btree_generic.go:522 +0x62c
  github.com/google/btree.(*BTreeG[go.shape.*uint8]).AscendRange()
      /go/pkg/mod/github.com/google/btree@v1.1.3/btree_generic.go:752 +0x104
  github.com/google/btree.(*BTreeG[*github.com/gravitational/teleport/lib/services.item]).AscendRange-fm()
      <autogenerated>:1 +0x58
  github.com/gravitational/teleport/lib/services.(*UnifiedResourceCache).getRange.func1()
      /__w/teleport/teleport/lib/services/unified_resource.go:230 +0x7a8
  github.com/gravitational/teleport/lib/services.(*UnifiedResourceCache).read()
      /__w/teleport/teleport/lib/services/unified_resource.go:591 +0x2ad
  github.com/gravitational/teleport/lib/services.(*UnifiedResourceCache).getRange()
      /__w/teleport/teleport/lib/services/unified_resource.go:215 +0x2d9
  github.com/gravitational/teleport/lib/services.(*UnifiedResourceCache).IterateUnifiedResources()
      /__w/teleport/teleport/lib/services/unified_resource.go:288 +0xe6
  github.com/gravitational/teleport/lib/auth.(*Server).runPeriodicOperations.func3()
      /__w/teleport/teleport/lib/auth/auth.go:1464 +0x237

Previous read at 0x00c003857da8 by goroutine 48219:
  github.com/gravitational/teleport/lib/auth.(*Server).runPeriodicOperations.func3()
      /__w/teleport/teleport/lib/auth/auth.go:1489 +0x2d2

Goroutine 48258 (running) created at:
  github.com/gravitational/teleport/lib/auth.(*Server).runPeriodicOperations()
      /__w/teleport/teleport/lib/auth/auth.go:1460 +0xf9e
  github.com/gravitational/teleport/lib/auth.initCluster.gowrap1()
      /__w/teleport/teleport/lib/auth/init.go:594 +0x33

Goroutine 48219 (finished) created at:
  github.com/gravitational/teleport/lib/auth.(*Server).runPeriodicOperations()
      /__w/teleport/teleport/lib/auth/auth.go:1460 +0xf9e
  github.com/gravitational/teleport/lib/auth.initCluster.gowrap1()
      /__w/teleport/teleport/lib/auth/init.go:594 +0x33
==================
```
2024-12-06 19:16:11 +00:00
Michael eea82924f2 Disable file transfer buttons if user lacks permissions (#49892)
This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
2024-12-06 19:14:30 +00:00
Alan Parra 8f4e8c94fa Suggest enabling PROXY protocol in DTW troubleshooting (#49791)
* Suggest enabling PROXY protocol in DTW troubleshooting

* Mention audit as a source of information for errors

* Mention solutions for both L7 and L4 LBs

* Link X-Forwarded-For to config references
2024-12-06 18:50:25 +00:00
rosstimothy 17f493a13a Convert lib/srv/regular to use slog (#49792)
This starts the transition of our SSH servers to use slog. The
regular.Server has been converted to use slog, though there
are still various logs emitted via the srv.ServerContext from the
server which use logrus.
2024-12-06 18:35:42 +00:00
Stephen Levine 51b278aa99 Extended binary validations (#49748) 2024-12-06 17:37:24 +00:00
Guillaume J. Charmes 58a6fe7173 Emit port-forward event only the first time, add port-forward-end event. Include cluster and pod metadta in event. (#49109) 2024-12-06 17:31:54 +00:00
rosstimothy da9ed65f7d Attempt to reduce flakiness of integration tests (#49850)
Closes #47156.

All of the tests suffering from issues dialing hosts, and failing
with a `failed to dial target host` error were incorrectly waiting
for nodes to become visible before establishing connections. The
main culprit for most of the failures was `waitForNodesToRegister`,
though a few tests had a very similar hand rolled variant, which
incorrectly returned when the nodes appeard in Auth. However, since
the Proxy is the one performing dialing, they should have waited
for the nodes to appear in the Proxy.

To resolve, `waitForNodesToRegister` and all hand rolled equivalents
have been removed in favor of `(TeleInstance) WaitForNodeCount` which
correctly uses the `CachingAccessPoint` of the RemoteSite instead
of `GetClient`. Additionally, `helpers.WaitForNodeCount` was updated
to validate that the node watcher used for routing in the Proxy
also contained the expected number of nodes.
2024-12-06 16:46:43 +00:00
Hugo Shaka 3e3e464c8c Fix flaky TestAutoUpdateAgentShouldUpdate (#49883)
* Fix flaky TestAutoUpdateAgentShouldUpdate

* Update lib/web/apiserver_ping_test.go

* Update lib/web/autoupdate_common_test.go
2024-12-06 16:42:58 +00:00
rosstimothy 460ac5ea3b Use builtin tracing machinery of aws-sdk-go-v2 (#49826)
Replaces the use of go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws
with the tracing support now provided directly by the aws sdk.
See https://github.com/aws/aws-sdk-go-v2/discussions/2810 for more
details.

Some additional aws clients were also updated to include tracing
support.
2024-12-06 14:41:33 +00:00
rosstimothy 1bed1ad376 Prevent panicing if license expiry is not populated (#49844)
Panic was caught by a customer running 16.4.9

http: panic serving [2a13:5947:111:20::1c86:2e30]:49995: runtime error: invalid memory address or nil pointer dereference
goroutine 597943 [running]:
net/http.(*conn).serve.func1()
    net/http/server.go:1903 +0xbe
panic({0x556eb28d1e60?, 0x556eb95ef2d0?})
    runtime/panic.go:770 +0x132
github.com/gravitational/teleport/lib/web.(*Handler).getUserContext(0xc002599408, {0xc002599408?, 0xc00bb18b40?}, 0xc00f4859e0, {0x1?, 0x1?, 0xc00bb18b40?}, 0xc00bb18b40, {0x556eb3eeb8f8, 0xc001af2f20})
    github.com/gravitational/teleport/lib/web/apiserver.go:1230 +0x6ef
github.com/gravitational/teleport/lib/web.(*Handler).bindDefaultEndpoints.(*Handler).WithClusterAuth.func50({0x556eb3ea4940, 0xc00d6158c0}, 0xc00f4859e0, {0xc00d615920, 0x1, 0x3})
2024-12-06 14:27:05 +00:00
Paul Gottschling c1f26268ac Fix Vale warnings in the Session Recording guide (#49846)
This docs page is tied for the highest number of Vale warnings by page.
2024-12-06 13:47:22 +00:00
Noah Stride 7a3fce975a Workload ID: Add Protos for WorkloadIdentity resource, CRUD and events (#49650)
* Add protos for resource and resource svc

* Add field for encoding the created/updated workloadidentity in audit
events

* Remove redundant package qualifier

* Add UpsertWorkloadIdentity

* Appease linter

* Add TrimToMaxSize implementation
2024-12-06 11:42:44 +00:00
Rafał Cieślak e5a318ae24 Deflake teleport/Welcome/Welcome.test.tsx (#49870) 2024-12-06 11:39:25 +00:00
Marco Dinis 6827ae1663 Integration Discovery Rules: endpoint that returns all the rules (#49514)
* Integration Discovery Rules: endpoint that returns all the rules

This PR adds a new endpoint that returns all the discovery rules that
exist for a given Integration.

It will include what was the last time the rule was used to fetch
resources, so that users can see stale rules and act upon it.

The endpoint supports filtering by the resource type to ensure the UI
only requests a subset of the rules, depending on the screen the user is
visiting (eg, EC2, RDS or EKS).

* use discovery rule
2024-12-06 09:00:30 +00:00
Marco Dinis 979418a1ae AWS OIDC: add aws account id as label to AWS App (#49693)
* AWS OIDC: add aws account id as label to AWS App

We were not setting any labels in the AWS App when using the Discover
Flow for a given AWS OIDC integration.

This is a bad practice because this means that users must have
`app_labels: *:*` in order to access this particular app.
This is not recommended because it grants access to every app.

This PR changes this so that the account id can be used to gate access.

* fix test
2024-12-06 08:43:03 +00:00