Commit Graph
1653 Commits
Author SHA1 Message Date
Alan Parra c106c41a72 chore: Bump opentelemetry modules (#41017) 2024-04-29 18:53:23 +00:00
Michael d129b1d3c7 Include requiresRequest flag for searchAsRoles requests (#40328) 2024-04-29 17:21:43 +00:00
Grzegorz Zdunek 1f574976b5 Fix roles filtering (#40994) 2024-04-29 13:29:37 +00:00
Marco André Dinis 0ab0909367 Use HandshakeContext instead of Handshake for TLS Connections set up (#40588) 2024-04-29 07:31:31 +00:00
Jakub Nyckowski f0a16af531 Introduce Access Graph EventsStreamV2 (#40807)
* Introduce Access Graph EventsStreamV2

A new GRPC method EventsStreamV2 is introduced. The new method allows returning responses from the Access Graph.
The new API is required by crown jewel implementation. The new API will be used to emit audit events from the access graph.

* Add new fields to Event protobuf for better tracking

Added two new fields, AffectedResourceName and AffectedResourceSource, to the Event protobuf. These additions allow for a more detailed and efficient tracking of changes and their sources, improving overall monitoring and event handling.

* Add AccessPathChanged event and update service file

A new proto file, events.proto, has been added to define the AccessPathChanged event, detailing changes in access paths. The access_graph_service.proto has been updated to use this new event instead of the legacy one. The relevant changes are also reflected in the generated Go file, access_graph_service.pb.go.

* Missing files
2024-04-26 17:37:29 +00:00
Brian Joerger 12c7689df5 Refactor GenerateUserCerts to create App Sessions (#39970)
* Add CreateAppSessionFromReq.

* Deprecate passing route_to_app.session_id in cert requests.

* Automatically create app sessions for app cert requests.

* Deprecate client use of CreateAppSession for app cert requests.

* Fix affected tests.

* Use traits and roles from existing user certificate for app sessions.

* Fix app access integration tests.

* go mod tidy.

* Fix TestTCP.

* Fix TestALPNSNIProxyAppAccess.

* Revert "go mod tidy."

This reverts commit cc6caa2485.
2024-04-25 05:13:55 +00:00
Tiago Silva 9e01397c27 Add Gitlab Plugin boilerplate code (#40713)
This PR introduces the proto and compiled proto changes required to
implement an Access Graph Gitlab plugin.

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

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-24 17:09:08 +00:00
Alan Parra 80140bebbd Issue cert.create events during device authentication (#40848)
* Add DeviceExtensions to the events.Identity proto

* Update generated protos

* Issue cert.create events during device authentication
2024-04-24 14:19:21 +00:00
Marek Smoliński 3d4f24a173 Allow for Okta Assignments with empty targets (#40517)
* Allow for Okta Assigments with empty targets

* Rebuild
2024-04-24 12:07:34 +00:00
Zac Bergquist 8cd1c429f5 Fix up some poor wording (#40832)
Closes #40294
Closes #39172
2024-04-23 22:01:41 +00:00
Nic Klaassen ef0f92d010 fix: prevent deleting AWS OIDC integration used by EAS (#40630)
* fix: prevent deleting AWS OIDC integration used by EAS

The External Audit Storage feature for Teleport Cloud depends on an AWS
OIDC integration to exist in order to get credentials for the customer
AWS account.
It's currently possible for a customer to delete the AWS OIDC
integration referenced by the EAS configuration, leading to the EAS
integration breaking and the Auth service crashing the next time it's
started up.

This commit prevents deleting an AWS OIDC integration currently
referenced by and EAS integration, and prevents creating an EAS
integration referencing an unknown AWS OIDC integration.

* use PreDeleteCheck instead of calling EAS service

* reorder tests and add missing cleanup

* create integrations svc on the fly

* switch to AtomicWrite

* set revision of returned resources

* deprecate gRPC DeleteAllIntegrations and use more general cacheMode
2024-04-23 21:22:16 +00:00
rosstimothy 29430d699f Migrate Connect to use client.ClusterClient instead of client.ProxyClient (#40562)
Updates #38239.
2024-04-23 13:39:06 +00:00
Noah StrideandAlan Parra 038bff1d64 Add clientside elements of TPM joining (#40647)
* Add clientside elements of TPM joining

* Update lib/auth/register.go

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

* Update api/client/joinservice.go

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

* Update lib/auth/register.go

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

* Tidy up RegisterUsingTPMMethod method

* Add default case

* Rename CheckAndSetDefaults to validate

* Add basic success test for JoinServiceClient_RegisterUsingTPMMethod

* Add final touches to client joinservice test

* Add license header to joinservice_test.go

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-04-23 11:19:15 +00:00
Tiago Silva 4c337d1a7f Add AccessGraphPlugin system role (#40714)
This PR introduces the `AccessGraphPlugin` system role used by Access
Graph plugins to access the Auth server API and Access Graph api.

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

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-23 09:43:45 +00:00
Brian Joerger 19f85b1343 Don't let users watch Web Sessions with secrets (#39588)
* Don't watch web sessions with secrets by default; Deny users from watching web session secrets.

* Add backwards compatibility logic for old proxies

Fallback to web session permissions for users watching with secrets

Fix uncaught merge conflict

* CopyWithoutSecrets without proto.Clone to avoid gogoproto issue.

* Revert WebSession.CopyWithoutSecrets rename and instead add special case in fanoutv2.go since WebSessions can not implement ResourceWithSecrets without affecting upstream consumers negatively.

* Address slice iteration comment.
2024-04-22 22:45:05 +00:00
STeve (Xin) Huang 26bdf3d0b7 Fix an issue tsh db ls shows one entry per db server instead of db name (#40784) 2024-04-22 20:21:40 +00:00
Grzegorz Zdunek 22a3389152 Correctly filter out system roles (#40545)
* Correctly filter out system roles

* Move `SkipSystemRoles` check above `SearchKeywords` check

* Add tests
2024-04-22 10:04:26 +00:00
Edoardo Spadolini 52bc80b0c8 Connector circuit breaker metrics (#40729)
* Fix time.After in joinserver

* Log failed cluster joins

* Instrument teleport instance connector breakers

* Address comments, fix nil panic
2024-04-22 09:11:58 +00:00
Jakub Nyckowski 06d92b4303 Add CrownJewel GRPC service and related messages (#40656)
* Add CrownJewel GRPC service and related messages

This commit introduces the CrownJewel service, along with its corresponding request and response messages. The changes include new proto definitions for creating, getting, updating, and deleting CrownJewels. Functions for pagination are also introduced for the GetCrownJewels method. This new service will provide methods to manage critical resources considered 'CrownJewels' for the organization.

* Update TeleportMatcher labels to use TeleportLabel

This update changes the previous map data type of 'labels' in TeleportMatcher to use TeleportLabel, allowing for more flexibility. Also, the TeleportLabel message is created with 'key' and 'values' attributes in the api/proto/teleport directory. This new structure complements the changes made in crownjewel.pb.go.

* Update label and tag value types in crownjewel.proto and crownjewel.pb.go

This commit changes the value types of labels and tags in crownjewel.proto and crownjewel.pb.go. Instead of using google.protobuf.StringValue, the label now uses simple strings for values, and a list of google.protobuf.StringValue for the tag values.

* RFD 153

* Rename CrownJewels proto messages

Updated protobuf message naming for consistency and clarity. The GetCrownJewelsRequest and GetCrownJewelsResponse were renamed to ListCrownJewelsRequest and ListCrownJewelsResponse respectively. This change better reflects their functionality.

* Rename CrownJewels proto messages

Updated protobuf message naming for consistency and clarity. The GetCrownJewelsRequest and GetCrownJewelsResponse were renamed to ListCrownJewelsRequest and ListCrownJewelsResponse respectively. This change better reflects their functionality.

* Update import and label reference in teleport's crownjewel.proto

This commit replaces the TeleportLabel message defined within the crownjewel.proto with an import from label.proto. It refers to labels under the namespace teleport.label.v1, improving modularity and reducing code duplication.
2024-04-19 17:03:35 +00:00
Noah Stride 0bd99702a1 Switch existing error reporting for tracing to use new helper (#40662)
* Switch existing trace error reporting to use `apitracing.EndSpan`

* Add deferred trace error reports to tbot

* Optimize for @espadolini limited horizontal editor length
2024-04-19 14:45:39 +00:00
Tiago Silva ec57cd5a67 Uniform equal function names to IsEqual (#40441)
* Uniform equal function names to `IsEqual`

Our API doesn't define any naming or characteristics for object
comparison functions like `IsEqual`. Checks rely on using
`services.CompareResources` that has some coverage but doesn't cover all
resources otherwise it fallsback to expensive `cmp.Equal` comparison.

This PR moves the `IsEqual` interface to `api` so we can ensure objects
satisfy the same interface required by `services.CompareResources`.

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

* handle review comments

* keep  equal

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-19 09:22:43 +00:00
Forrest 82281e1191 route based on match quality score (#40559) 2024-04-18 23:02:26 +00:00
Edoardo Spadolini e96f103954 Fix some gRPC-tunneled connections (#40632)
* Fix some gRPC-tunneled connections

* Fix tests checking the return value of dial()
2024-04-18 16:11:00 +00:00
Alan Parra 8b8773e7fa Update web_session_id description in DeviceMetadata (#40637)
* Update web_session_id description in DeviceMetadata

* Update generated protos
2024-04-18 07:06:06 +00:00
Noah Stride 955f86ba3e Thread context.Context through auth.Register and add OTel Tracing (#40597)
* Wire context.Context into `auth/register.go`

* Thread `context.Context` through `auth.Register` and add tracing

* Unwrap error before recording it in the span
2024-04-17 17:19:07 +00:00
9062d62aff Add access monitoring rules cache and tctl interactions (#40218)
* Add access monitoring rules cache and tctl interactions

* Swap access monitoring rules collections to use upsert

* Update accessmonitoringrules cache test

* Readd missing err check

* Update lib/auth/grpcserver.go

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>

* Update lib/auth/grpcserver.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Update tool/tctl/common/resource_command.go

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>

* Add tctl isForced behaviour for access monitoring rules

* Add missing methods to cache interface for access monitoring rules

* Add info messages to tctl commands for accessmonitoring rule edits

* Add missing user message for forced rule creation

* Appease linter

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-04-17 13:05:01 +00:00
Marco André Dinis 851b0d8fdf DiscoveryService: prevent EICE Node duplication (#40220)
* DiscoveryService: exclusive worker per Discovery Group

This PR ensures only one DiscoveryService is running per DiscoveryGroup.
It does so using a SemaphoreLock.

This should prevent any duplicate API calls and also prevent duplicate
resources on Teleport side.

* improve eice server name and releaseGroupLockFn init

* review pt2

* improve error handling

* re-organize lock acquire

* improve eice node name handling

* simplify lock on discovery group

* Remove lock logic and rely on node name to prevent dups

* improve test comment

* change comment about skipping nodes
2024-04-15 13:24:33 +00:00
Trent Clarke 2be9025558 Fix overwritten ACL member values during Sync & SCIM push (#40454)
* Fix overwritten member values

* test fixup

* refactor for readability

* Addess review feedback

* Preserve "AddedBy"

* Make preserving metadata the default behaviour

* fix cache tests

* Replace custom validation with calls to `CheckAndSetDefaults()`

* Commentary on metadata preservation

* Test Fixup
2024-04-15 06:48:52 +00:00
Noah Stride c8f13946a8 Fix tpm joining protobuf oneof (#40514)
* Fix tpm joining protobuf oneof

* See if Buf will allow me to reuse the indexes outside of oneof

* Regen protos

* Tactical renaming

* Update CRDs
2024-04-12 19:16:44 +00:00
dependabot[bot]andAlan Parra 9677ccd874 Bump the go group in /api with 3 updates (#40423)
* Bump the go group in /api with 3 updates

Bumps the go group in /api with 3 updates: [go.opentelemetry.io/proto/otlp](https://github.com/open-telemetry/opentelemetry-proto-go), [golang.org/x/net](https://github.com/golang/net) and [google.golang.org/grpc](https://github.com/grpc/grpc-go).


Updates `go.opentelemetry.io/proto/otlp` from 1.1.0 to 1.2.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-proto-go/releases)
- [Commits](https://github.com/open-telemetry/opentelemetry-proto-go/compare/v1.1.0...v1.2.0)

Updates `golang.org/x/net` from 0.23.0 to 0.24.0
- [Commits](https://github.com/golang/net/compare/v0.23.0...v0.24.0)

Updates `google.golang.org/grpc` from 1.63.0 to 1.63.2
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.63.0...v1.63.2)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/proto/otlp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>

* Tidy root module

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-04-11 13:04:36 +00:00
Tiago Silva 502879a5fe DiscoveryConfig: Update status after each run (#40267)
* DiscoveryConfig: Update status after each run

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

* add unit tests

* drop method by reducing interface area

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-10 17:18:58 +00:00
Ryan ClarkandRafał Cieślak f13fee902b Support redirecting to TAG on first login (#40156)
* Support redirecting to TAG on first login

* Update api/proto/teleport/userpreferences/v1/access_graph.proto

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

* Add support for highlighting a navigation item

* Add godoc

* Re-run make grpc

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2024-04-10 13:22:20 +00:00
Bartosz Leper 06fce3f449 Keep track of whether the user has a real password set (#39576)
* Keep track of whether the user has a real password set

* lint

* Some comments

* Fix TestCreateResources

* Fix e/ link

* Review

* Review

* Review

* Use early return on error in DeletePassword

* Fix the broken teleterm test
2024-04-10 10:28:05 +00:00
rosstimothy 33d47c041e Correctly propagate windows desktop logins in GetUnifiedResourcePage (#40359)
The conversion from a proto.PaginatedResource to a types.EnrichedResource
inadvertently omitted setting logins for windows desktops. A new
test, TestGetUnifiedResourcesWithLogins, was added to validate that
if logins are provided by the server that they are passed along in
the enriched resource.

Closes #40340
2024-04-09 16:26:15 +00:00
rosstimothy ad26913c71 Load appropriate TLS config for clusters (#40293)
Updates the proxy.Client to allow loading specific tls.Config for
individual clusters. This prevents issues when trying to access
leaf resources via the root cluster if WithAllCAs is not set.
2024-04-09 16:02:28 +00:00
Noah Stride 0590d724c5 Add Protos for TPM Joining (#40307)
* Add protos for TPM joining

* Add `*proto.UnimplementedJoinServiceServer` to `JoinServiceGRPCServer`

* Update CRDs
2024-04-09 12:26:27 +00:00
Tiago Silva 71fbd21401 GoDerive: Generate Equal stubs for DiscoveryConfig object. (#40255)
This PR generates the stubs for `DiscoveryConfig.Equal` function based
on goderive code generation.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-08 14:51:39 +00:00
Tiago Silva 86fcaecb37 DiscoveryConfig: Implement UpdateDiscoveryConfigStatus handler (#40215)
* DiscoveryConfig: Implement `UpdateDiscoveryConfigStatus` handler

This PR implements
`/teleport.discoveryconfig.v1.DiscoveryConfigService/UpdateDiscoveryConfigStatus`
grpc method

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

* fix name typo

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-08 14:13:09 +00:00
dependabot[bot]androsstimothy f12073946a Bump the go group in /api with 13 updates (#40278)
Bumps the go group in /api with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.49.0` | `0.50.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.49.0` | `0.50.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/metric](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [golang.org/x/crypto](https://github.com/golang/crypto) | `0.21.0` | `0.22.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.22.0` | `0.23.0` |
| [golang.org/x/term](https://github.com/golang/term) | `0.18.0` | `0.19.0` |
| [google.golang.org/genproto/googleapis/rpc](https://github.com/googleapis/go-genproto) | `0.0.0-20240325164216-beb30f47624b` | `0.0.0-20240401170217-c3f982113cda` |
| [google.golang.org/grpc](https://github.com/grpc/grpc-go) | `1.62.1` | `1.63.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.49.0 to 0.50.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.49.0...zpages/v0.50.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.49.0 to 0.50.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.49.0...zpages/v0.50.0)

Updates `go.opentelemetry.io/otel` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/metric` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/trace` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `golang.org/x/crypto` from 0.21.0 to 0.22.0
- [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.22.0)

Updates `golang.org/x/net` from 0.22.0 to 0.23.0
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0)

Updates `golang.org/x/term` from 0.18.0 to 0.19.0
- [Commits](https://github.com/golang/term/compare/v0.18.0...v0.19.0)

Updates `google.golang.org/genproto/googleapis/rpc` from 0.0.0-20240325164216-beb30f47624b to 0.0.0-20240401170217-c3f982113cda
- [Commits](https://github.com/googleapis/go-genproto/commits)

Updates `google.golang.org/grpc` from 1.62.1 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.62.1...v1.63.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/metric
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: google.golang.org/genproto/googleapis/rpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-04-08 13:59:28 +00:00
Andrew Burke d0a68fd824 Add automatic role access requests (#39003)
* Add automatic role requests

This change adds the optioin to automatically make a role access request
during tsh ssh instead of a resource access request.

* Speed up TestSSHAccessRequest
2024-04-05 19:40:35 +00:00
Michael Wilson a72d02d873 Introduce role friendly name labels and frontend utilities. (#40113)
* Introduce role friendly name labels and frontend utilities.

Role friendly name labels and frontend utilities have been introduced.

* Remove unneeded sort function.
2024-04-05 12:40:40 +00:00
Tiago Silva 4494729e48 DiscoveryConfig: Add status field to report discovered objects and errors (#40136)
* DiscoveryConfig: Add `status` field to report discovered objects and
errors

This PR introduces a `status` field into the `discovery_config` protobuf
spec to report status and metrics about the resources discovered for
each `discovery_config` spec.

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

* add last_sync_time

* fix typo

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-05 10:28:40 +00:00
5c930ca9a5 Fix flaky test TestProxySSHJumpHost (#40052)
* Use testServer.MakeTestServer to fix issue with parallel runs using the same ports.

* Add deprecation comments for test server helpers outside of tools/teleport/testenv.

* Update tool/teleport/testenv/test_server.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Disable SSH resumption

Enable LoadAllCAs

Update comments

* Prevent context.Canceled from being wrapped across transport stream

trail doesn't properly handle conversions to and from errors that
are context.Canceled which results in code paths trying to evaluate
errors.Is(err, context.Canceled) failing. The error recevied is
an interceptors.RemoteError, which wraps a trace.TraceErr, which
contains a status.Status with codes.Canceled. To work around this
until trail is updated the server half of the stream was updated
to return an io.EOF if if encouters a canceled error.

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
2024-04-04 21:20:30 +00:00
Krzysztof SkrzętnickiandAnton Miniailo 24021556c4 Implement persistence for database_object resource (#39756)
* Implement persistence for database_object resource

* Split monolithic service test

* Add `t.Parallel()` to the tests

* lint fix

* Update copyright year

Co-authored-by: Anton Miniailo <anton@goteleport.com>

* `make grpc`

---------

Co-authored-by: Anton Miniailo <anton@goteleport.com>
2024-04-03 08:28:11 +00:00
Brian Joerger baf030253f Move types.NewWebSessionRequest to lib/auth/sessions.go. (#39742)
Move related methods to lib/auth/sessions.go.
2024-04-02 18:41:24 +00:00
Alan Parra f33c3f6eb5 Add device trust "token move check" protos (#40097)
* Add DeviceConfirmationToken and ConfirmDeviceWebAuthentication

* Add DeviceConfirmationToken to TerminalService

* Rename cluster_uri to root_cluster_uri

* Update generated protos
2024-04-02 17:49:07 +00:00
Tiago Silvaandrosstimothy 8681546401 Add conditional update methods for AccessList and AccessListMembers (#40036)
* Add conditional update methods for `AccessList` and `AccessListMembers`

This PR adds two new methods for conditinally update an AccessList and
AccessListMember resources to avoid overriding changed resources.

This is a preparation for a ineligible status reconciler.

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

* Update lib/services/simple/access_list.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* handle review comments and drop copy methods

* simplify code

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-04-02 16:52:55 +00:00
Edward Dowlingandrosstimothy 2a08180e99 Add access monitoring rules services and backend (#39143)
* Add access monitoring rules backend

* Add missing service implementations for access monitoring rules

* Add missing struct tags to access monitoring rules

* Simplify toProto and fromProto for access monitoring rules

* Remove simple/access_monitoring_rules

* Use backend service adapter for access monitoring rules service

* Remove unused logger from access monitoring rules service

* Use cache for ListAccessMonitoringRules

* Add tests for access monitoring rules local backend

* Add tests for access monitoring rules service

* Fix import order

* Update lib/services/local/access_monitoring_rules.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Update lib/services/local/access_monitoring_rules.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Add checks to validate AccessMonitoringRules

* Update lib/services/access_monitoring_rules.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Update lib/services/access_monitoring_rules.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Remove unused deleteAll method from access monitoing rules service

* Update accessMonitoringRules cache interface to be more restrictive

* Update access monitoring rules tests to not deprecated methods

* Appease linter

* Fix import order in access monitoring rules test

* Fix import order in access monitoring rules test

* Remove remaining no generated access monitoring rules definitions

* Remove remaining uses of access monitoring rules conv

* Remove unused imports

* Remove use of removed convert package in tests

* Remove access monitoring rules interface assertion

* Remove unused import

* Fix access monitoring rule service test

* Appease linter

* Appease linter

* Appease linter

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-04-02 15:51:17 +00:00
Noah StrideandEdoardo Spadolini 8209d4daea Migrate RemoteClusters CRUD to gRPC (#38671)
* Add protos for PresenceService and RemoteCluster CRUD

* Add service skeleton for presence service

* Add bodies for all methods

* Hook up to new backend methods

* Add presence service to auth grpc server

* Add fallback functions to call old http endpoints

* Fix tests for DeleteAllRemoteClusters

* Remove bad rebase file

* Update proto to remove Create

* Remove unused create grpc handler

* Add Patch support to Update gRPC

* Fix method missing from interface

* Add test for GetRemoteCluster

* Add test for ListRemoteClusters

* Add test for DeleteRemoteCluster

* Add tests for TestUpdateRemoteCluster

* Appease linter

* Fix GetRemoteCluster test

* Update lib/auth/httpfallback.go

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

* Update api/client/client.go

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

* Update lib/auth/httpfallback.go

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

* Fix reference to trace.Component

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2024-04-02 11:24:33 +00:00
Forrest 06ac626868 user filtering (#39844) 2024-04-01 21:19:55 +00:00