Commit Graph
517 Commits
Author SHA1 Message Date
STeve (Xin) Huang 5cabb533a5 TLS Routing native WebSocket connection upgrade support (#36343)
* TLS routing connection upgrade using native websocket

* update ut in api

* lib/web/UT update

* fix typo, lint and race

* deal with subprotocol negotiation

* review comments round 1

* fix lint?

* add UT and address some other comments

* add env var to toggle mode

* fix lint
2024-02-12 18:04:01 +00:00
Brian Joerger b60e7a7a1f Hardware Key settings (#37727)
* Add hardware key settings to cluster auth preference.

* Parse HardwareKey auth settings from configuration file.

* Add GetRequireKnownSerialNumber method to AuthPrefence type.

* Add deprecation logic for authpref.PIVSlot, following the logic set out
in #16034.

* Address comments.
2024-02-08 20:59:00 +00:00
STeve (Xin) Huang e192ad386e Propagate user-agent from GRPC for cert.create events (#37726)
* Add user-agent to cert.create event

* fix tctl and minor stuff

* fix integration test
2024-02-08 20:39:43 +00:00
Alan Parra 57d3b43f6a Add the deprecated option GenerateUserSingleUseCerts (#37724)
* Deprecate the GenerateUserSingleUseCerts RPC

* Update generated protos
2024-02-02 19:18:44 +00:00
rosstimothy b7318b5c7e Enable errorlint via golangci-lint (#37669)
Adds the new linter and configures it to prevent direct error
comparisions and type assertions in favor of errors.Is and errors.As.
All current violations caught by the linter have been updated
accordingly.
2024-02-02 15:59:24 +00:00
Noah Stride 8c824ddd3b Remove deprecated Bot API methods (#37636)
* Remove deprecated Bot API methods

* Fix tests using deprecated RPC

* Fix more tests for legacy
2024-02-01 16:15:54 +00:00
Alan Parra 0013681f22 chore: Remove deprecated MFA streaming methods (#37589)
* Remove deprecated MFA streaming methods

* Drop the newMFADeviceFields.totpSecret field

* Hollow out / remove proto messages

* Update generated protos

* Remove unused method

* Simplify createRegisterChallenge logic

* Remove client methods
2024-02-01 14:15:36 +00:00
Alan Parra 5347e4e727 chore: Remove the deprecated GenerateUserSingleUseCerts method (#37601)
* Remove the deprecated GenerateUserSingleUseCerts method

* nit: Don't capture traces on guard errors

* Drop client methods

* Remove usages of SingleUseUserCert

* Hollow out / remove deprecated proto messages

* Update generated protos

* Remove unused method
2024-01-31 22:10:47 +00:00
Alan Parra 446505674b chore: Remove the AuthenticationSettings.DeviceTrustDisabled field (#37595) 2024-01-31 18:56:38 +00:00
Tiago Silva d71b48f9b5 Correct gRPC handler name StreamUnstructuredSessionEvents (#37580)
This PR fixes the name of the gRPC method
`StreamUnstructuredSessionEvents` from
`StreamUnstructuredSessionEventsServer` to the correct version. This
typo was introduced during the original review and was never detected
because clients implemented a fallback mechanism to old
`StreamSessionEvents` api.

This PR also partially reverts commit
386e63c584 so v15 clients can still
connect to v14 clusters.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-01-31 11:05:01 +00:00
Brian Joerger 6a5a151809 Refactor admin MFA ceremony - don't create an MFA challenge the client can't solve (#37367)
* Refactor MFA ceremony logic to avoid creating challenges when the client has no way to solve it.

* Add client-side ErrMFANotSupported for better MFA ceremony error handling.
2024-01-29 18:38:25 +00:00
Edoardo Spadolini b5512bf418 Unblock Read and Write when closing a grpc transport Conn (#37343) 2024-01-26 17:22:29 +00:00
Marco André Dinis 876362b0b1 AWSOIDC: Compute Proxy's Endpoint for issuing a token (#37253)
* AWSOIDC: Compute Proxy's Endpoint for issuing a token

Instead of receiving the issuer URL as param, use the internal state of
the proxies to fetch the public endpoint.

This deprecates the field so that old clients can still talk to the
AuthServer, but their Issuer param is ignored.

* Add single param for cached resources

* use cache for everything except keystore
2024-01-26 13:35:16 +00:00
Brian Joerger e7d91bf30f Remove unused admin action name from IsMFARequiredRequest_AdminAction (#37102)
* Remove unused admin action name from IsMFARequiredRequest_AdminAction.

* Reserve field name.
2024-01-24 19:51:05 +00:00
Justinas Stankevičius 9bcde33d49 Add Teleport Policy feature (#37013)
* Add Teleport Policy feature flag

* Add Policy feature to License

* Make `Policy` field a structure

To accomodate potential future parameters
2024-01-24 17:03:42 +00:00
Trent Clarke b537ebad14 SCIM API types and service definitions (#36623)
This PR icludes supporting changes for the implementation of SCIM provisioning
Teleport Enterprise.

This change includes:
 * A protobuf description of the SCIM service, allowing generic resource CRUD
   operations
 * Generated files for same
 * Internal abstractons for the SCIM GRPC service
 * Hooks to allow Teleport Enterprise to override the default
   "Not Implemented" GRPC service.
2024-01-24 06:18:19 +00:00
Brian Joerger 1db61a6a81 Client MFA Ceremony refactor (#36996)
* Refactor MFA prompt logic for the API client to enable various MFA
ceremony use cases.

* Address comments.
2024-01-23 01:16:18 +00:00
Brian Joerger 248db09355 Extend IsMFARequired check to admin actions (#36785)
* Add admin action target for IsMFARequiredRequest in proto file.

* Implement IsMFARequired for admin actions.

* Add admin action option web.isMFARequired; Add IsMFARequired check to web.createAuthenticateChallenge.

* Add IsMFARequiredResponse type for typescript.

* Address comments.
2024-01-19 20:10:42 +00:00
Brian Joerger 73b9ccd498 Pass MFA challenge extensions to CreateAuthenticateChallenge requests. (#36783) 2024-01-19 02:16:21 +00:00
Alan Parra 96defc6065 fix: Do not attempt relogin on remote BadParameter errors (#36866)
* fix: Do not attempt relogin on trace.BadParameterError

* Special case remote errors in IsErrorResolvableWithRelogin

* Do not wrap Recv EOF errors

* Fix various tests

* Use errors.Is to check for io.EOF
2024-01-18 21:15:58 +00:00
Brian Joerger 6353c3ac16 Migrate RotateExternalCertAuthority to gRPC (#36540)
* Add RotateExternalCertAuthority to gRPC TrustService.

* Add server implemenation.

* Mark deprecated HTTP endpoint for deletion.

* Add client implementation and HTTP fallback.

* Address comments.

* Limit RotateExternalCertAuthority to internal services explicitly.

* Add RBAC tests for RotateExternalCertAuthority.

* Remove outdated test.
2024-01-18 21:14:37 +00:00
Brian Joerger 88152574bf Scoped WebAuthn: MFAChallengeExtension proto message (#36665)
* Add mfa challenge extensions to proto file.

* Resolve comments; move new proto messages to separate proto file; nomenclature adjustments.

* Use gogoproto for mfa.proto to interface with authservice.proto.

* Ellaborate on ChallengeExtensions required field comment.
2024-01-17 18:39:36 +00:00
Gavin Frazar 5c568bbe07 split database CA into server/client CAs (#35949)
* split database CA into server/client CAs

* update migration logging
    * include auth component in migrations
    * debug log when skipping db client ca migration
* update tctl auth sign for cockroachdb
* update tctl auth sign for oracle
* set ExtKeyUsage for DB certs
    * clientAuth for DB Client CA
    * serverAuth for DB Server CA
* inject filter for pre-v14.3.1 clients
* inject a filter instead of dropping events in grpcserver
* add DatabaseClientCA type

* debug log when skipping filter injection

* update CA filter injection version check func name and doc
2024-01-14 23:53:24 +00:00
Brian Joerger 73f4dc71cc Migrate RotateCertAuthority to gRPC (#36536)
* Add RotateCertAuthority to gRPC TrustService.

* Add gRPC server implementation.

* Move RotateRequest type to api/types.

* Mark deprecated HTTP rotate endpoint for deletion.

* Add client implemenation and HTTP fallback.
2024-01-11 17:44:40 +00:00
STeve (Xin) Huang 9402a41245 Added support to select database roles from tsh. (#35867)
* Support selecting db roles.

* add active roles in tsh db ls

* add select db role ut

* add a warning when connecting to older version

* review comments

* chnage slices import

* --db-roles to --db-role

* fix ut
2024-01-10 02:47:02 +00:00
Noah StrideandAlan Parra 8480371bd6 Fix DynamicIdentityFileCreds being incompatible with L7 Loadbalancers (#36411)
* DynamicIdentityFileCreds should correctly provide TLS root CAs to ALPN handshake

* Fix bug involving multiple credentials

* Add test case covering CA Cert Pool

* Update api/client/credentials_test.go

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

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-01-09 19:00:46 +00:00
Tiago Silva 386e63c584 API: Remove fallback support for SearchUnstructuredEvents and StreamUnstructuredSessionEvents (#36413)
This PR removes the fallback introduced in Teleport 13 to deal with
servers that do not support the new `UnstructureEvents` grpc service
introduced in Teleport 13.

Once Teleport 15 is released, we no longer need to maintain Teleport 12
so this code can be removed.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-01-08 18:42:31 +00:00
Michael Wilson 913cc67c9e Add access lists, members, and reviews to cache. (#36020)
* Add access lists, members, and reviews to cache.

Access lists, members, and reviews have been added to the cache. To do this,
I have created a simple backend that doesn't perform the validation that is
performed by the main access list backend and only implements a subset of
actions that are needed by the cache.

To support this, I've added in new gRPC methods:
ListAllAccessListMembers and ListAllAccessListReviews. These do not lock
any access lists and additionally do not perform any implicit or dynamic
members, but just simply return the full list of all members and reviews
so that these endpoints can be used to populate the cache.

The general thought here that, since the order of cache events cannot be
guaranteed, we'll rely on the auth server to perform the proper backend
validation and use a simplified backend that simply sees if the items
are present in the cache. If so, we'll return them.

I've had to update a few protos to support this. While I was here, I
fixed a bug in the access list gRPC client where the call tolist of reviews
was not supplying the access list name. Additionally, the user login
state generator will now use the cached access list values.

* Move simple backend to lib/services/simple

* Update to reflect new generic function signatures.
2024-01-05 14:48:44 +00:00
99db7d3652 Bump the go group with 21 updates (#36163)
* Bump the go group with 21 updates

Bumps the go group with 21 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/ClickHouse/clickhouse-go/v2](https://github.com/ClickHouse/clickhouse-go) | `2.16.0` | `2.17.1` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.49.4` | `1.49.13` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.26.1` | `1.26.2` |
| [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) | `1.12.12` | `1.12.13` |
| [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) | `1.15.7` | `1.15.9` |
| [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) | `1.141.0` | `1.142.0` |
| [github.com/aws/aws-sdk-go-v2/service/ecs](https://github.com/aws/aws-sdk-go-v2) | `1.35.5` | `1.35.6` |
| [github.com/aws/aws-sdk-go-v2/service/glue](https://github.com/aws/aws-sdk-go-v2) | `1.72.4` | `1.73.0` |
| [github.com/aws/aws-sdk-go-v2/service/iam](https://github.com/aws/aws-sdk-go-v2) | `1.28.5` | `1.28.6` |
| [github.com/aws/aws-sdk-go-v2/service/rds](https://github.com/aws/aws-sdk-go-v2) | `1.64.6` | `1.66.1` |
| [github.com/aws/aws-sdk-go-v2/service/sns](https://github.com/aws/aws-sdk-go-v2) | `1.26.5` | `1.26.6` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.29.5` | `1.29.6` |
| [github.com/charmbracelet/bubbles](https://github.com/charmbracelet/bubbles) | `0.16.1` | `0.17.1` |
| [github.com/fsouza/fake-gcs-server](https://github.com/fsouza/fake-gcs-server) | `1.47.6` | `1.47.7` |
| [github.com/go-logr/logr](https://github.com/go-logr/logr) | `1.3.0` | `1.4.1` |
| [github.com/go-resty/resty/v2](https://github.com/go-resty/resty) | `2.10.0` | `2.11.0` |
| [github.com/go-webauthn/webauthn](https://github.com/go-webauthn/webauthn) | `0.9.4` | `0.10.0` |
| [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) | `1.17.0` | `1.18.0` |
| [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) | `1.7.6` | `1.8.0` |
| [google.golang.org/grpc](https://github.com/grpc/grpc-go) | `1.60.0` | `1.60.1` |
| google.golang.org/protobuf | `1.31.0` | `1.32.0` |


Updates `github.com/ClickHouse/clickhouse-go/v2` from 2.16.0 to 2.17.1
- [Release notes](https://github.com/ClickHouse/clickhouse-go/releases)
- [Changelog](https://github.com/ClickHouse/clickhouse-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ClickHouse/clickhouse-go/compare/v2.16.0...v2.17.1)

Updates `github.com/aws/aws-sdk-go` from 1.49.4 to 1.49.13
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.49.4...v1.49.13)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.26.1 to 1.26.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.26.1...config/v1.26.2)

Updates `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue` from 1.12.12 to 1.12.13
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.12.12...credentials/v1.12.13)

Updates `github.com/aws/aws-sdk-go-v2/feature/s3/manager` from 1.15.7 to 1.15.9
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/config/v1.15.9/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.15.7...config/v1.15.9)

Updates `github.com/aws/aws-sdk-go-v2/service/ec2` from 1.141.0 to 1.142.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.141.0...service/ec2/v1.142.0)

Updates `github.com/aws/aws-sdk-go-v2/service/ecs` from 1.35.5 to 1.35.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ecs/v1.35.5...service/ecs/v1.35.6)

Updates `github.com/aws/aws-sdk-go-v2/service/glue` from 1.72.4 to 1.73.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/ec2/v1.73.0/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/glue/v1.72.4...service/ec2/v1.73.0)

Updates `github.com/aws/aws-sdk-go-v2/service/iam` from 1.28.5 to 1.28.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/emr/v1.28.5...service/emr/v1.28.6)

Updates `github.com/aws/aws-sdk-go-v2/service/rds` from 1.64.6 to 1.66.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/rds/v1.64.6...service/rds/v1.66.1)

Updates `github.com/aws/aws-sdk-go-v2/service/sns` from 1.26.5 to 1.26.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.26.5...service/s3/v1.26.6)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.29.5 to 1.29.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.29.5...service/s3/v1.29.6)

Updates `github.com/charmbracelet/bubbles` from 0.16.1 to 0.17.1
- [Release notes](https://github.com/charmbracelet/bubbles/releases)
- [Commits](https://github.com/charmbracelet/bubbles/compare/v0.16.1...v0.17.1)

Updates `github.com/fsouza/fake-gcs-server` from 1.47.6 to 1.47.7
- [Release notes](https://github.com/fsouza/fake-gcs-server/releases)
- [Commits](https://github.com/fsouza/fake-gcs-server/compare/v1.47.6...v1.47.7)

Updates `github.com/go-logr/logr` from 1.3.0 to 1.4.1
- [Release notes](https://github.com/go-logr/logr/releases)
- [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-logr/logr/compare/v1.3.0...v1.4.1)

Updates `github.com/go-resty/resty/v2` from 2.10.0 to 2.11.0
- [Release notes](https://github.com/go-resty/resty/releases)
- [Commits](https://github.com/go-resty/resty/compare/v2.10.0...v2.11.0)

Updates `github.com/go-webauthn/webauthn` from 0.9.4 to 0.10.0
- [Release notes](https://github.com/go-webauthn/webauthn/releases)
- [Commits](https://github.com/go-webauthn/webauthn/compare/v0.9.4...v0.10.0)

Updates `github.com/prometheus/client_golang` from 1.17.0 to 1.18.0
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

Updates `github.com/sigstore/sigstore` from 1.7.6 to 1.8.0
- [Release notes](https://github.com/sigstore/sigstore/releases)
- [Commits](https://github.com/sigstore/sigstore/compare/v1.7.6...v1.8.0)

Updates `google.golang.org/grpc` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.60.0...v1.60.1)

Updates `google.golang.org/protobuf` from 1.31.0 to 1.32.0

---
updated-dependencies:
- dependency-name: github.com/ClickHouse/clickhouse-go/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ec2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ecs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/glue
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/iam
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/rds
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sns
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/charmbracelet/bubbles
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/fsouza/fake-gcs-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/go-logr/logr
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/go-resty/resty/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/go-webauthn/webauthn
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/sigstore/sigstore
  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
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

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

* make grpc

* dependency-review: Allow resty's `GHSA-xwh9-gc39-5298` due to no fix available

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
Co-authored-by: Mike Jensen <mike.jensen@goteleport.com>
2024-01-02 21:08:49 +00:00
Zac Bergquist 5753264917 Go 1.21 cleanup (#36044)
- Use min/max builtins over custom funcs
- Leverage sync.OnceValue instead of hand-rolled impl
2023-12-27 16:13:14 +00:00
e3191b0054 Machine ID: Introduce BotService (#35441)
* Start sketching out BotService handler impl

* Allow bots to be created without roles

* Fix up tests

* Add warning about adding a role to the bot

* Improve resource type handling

* Update tool/tctl/common/bots_command.go

Co-authored-by: Tim Buckley <tim@goteleport.com>

* Fix godoc for client

* Explain ordering for bot resource application

* Record CreatedBy for bot users

* Don't display traits with zero length values

* Preserve json style output for `tctl bots add`

* Unbreak tests broken by CreatedBy changes

* Clarify deprecation/deletion

* Improve error message when no proxies

* An -> a

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

* Further clarify GoDoc

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

* Remove redundant case statements

* Remove unused import

* Use `slices`

---------

Co-authored-by: Tim Buckley <tim@goteleport.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-12-21 12:00:12 +00:00
Lisa Kim 36b3deab6e Lift legacy check for Access List and Access Monitoring (#35702)
* Revert "Restrict IGS flag check to usage based plans only (#35431)"

This reverts commit 31e1715532.

* Update test

* Pass access request monthly limit to webconfig

* Fix typo
2023-12-21 01:45:16 +00:00
Zac Bergquist 44a6bb1933 Use pkg slices from the standard library (#35905)
Prefer the stdlib version of the experimental package.
Includes a depguard update to prevent future regressions,
as well as an e-ref update to appease depguard.

Generated with:

    $ gofmt -w -r '"golang.org/x/exp/slices" -> "slices"' . && \
        make fix-imports
2023-12-19 23:06:53 +00:00
rosstimothy 9be0b678c3 Add latency diagnostic to tsh (#35679)
The new `tsh latency` command allows visualizing latency to
resources in real time. Currently, supported is limited to SSH
instances, but may be extended to anything that implements a
`latency.Pinger` to support other protocols in the future.
2023-12-19 20:55:17 +00:00
Grzegorz ZdunekandJakub Nyckowski 32e87b2779 Expose GetSuggestedAccessLists in AccessListClient (#35714)
* Expose `GetSuggestedAccessLists` in `AccessListClient`

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>

* Fix typo

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-12-18 15:33:23 +00:00
Alan Parra 796a9a3d4d fix: Update TLS and SSH certificate proto comments (#35722)
* fix: Update TLS and SSH certificate proto comments

* Update generated protos
2023-12-14 17:39:25 +00:00
451d3de0c2 Add initial future assume role to access requests (#35257)
* Add initial future assume role to access requests

* Add assume time on to tsh request show

* Update tool/tsh/common/tsh.go

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>

* Rename assume-time to assume start time

* Fix tctl request assume-start-time to work when not set

* Add check to check request assumeStartTime is not far in the future

* Add example formats examples to assume-start-time flag

* Omit empty assum_start_time field when serializing access requests

* Update lib/auth/auth.go

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

* Rename MaxAssumeStartTime to MaxAssumeStartDuration

---------

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-12-14 16:31:13 +00:00
Lisa Kim ba2bdb9d66 Define access monitoring max range limit field (#35241)
* Define max report range limit fields

* Add feature limits to web ui config
2023-12-05 20:28:55 +00:00
Bernard KimandMarco André Dinis 6a7369d809 Include upgrader version in metrics and inventory (#35188)
* Add external upgrader version to proto message

* Inlcude upgrader version in metrics and inventory

* Include TELEPORT_EXT_UPGRADER_VERSION in deployment

* whitespace

* Include upgrader version in inventory ls

* Small docs change

* Use teleport-upgrade version if available

* Normalize version

* Address feedback

* Revert e

* Update lib/automaticupgrades/config.go

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

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
2023-12-05 19:20:09 +00:00
rosstimothy 85c29d1cf4 Implement and use UpsertOIDCConnectorV2 (#35144)
While the api client already had support for the new upsert method
it was unimplemented server side and would always fallback to the
legacy UpsertOIDCConnector RPC. This implements the RPC handler
and updates the signature of UpsertOIDCConnector to return the
upserted connector in the same manner that Create and Update do.
2023-12-01 19:22:41 +00:00
Lisa Kim 6eaf5eaf55 Web: Audit use of isUsageBasedBilling flag (#35172)
* Add team and igs flag to web config

* Use isTeam and igs flag in TeleportContext

* Update ButtonLockedFeature

* Update IntegrationTiles

* Update Sessions

* Update Support

* Fix grammar

* Add clarifying comment on isUsageBasedBilling flag
2023-12-01 18:01:27 +00:00
Lisa Kim ee32982679 Add ProductType to features and add IGS checks with access request verify limit (#35075)
* Add product type to features and define feature limit helpers

* Add IGS check with access request monhtly verify

* Move limit getters to enterprise

* Simplify product type conversion

* Add clarifying comment
2023-11-30 22:04:48 +00:00
rosstimothy 88bb9cfd96 Implement and use UpsertSAMLConnectorV2 (#35208)
While the api client already had support for the new upsert method
it was unimplemented server side and would always fallback to the
legacy UpsertSAMLConnector RPC. This implements the RPC handler
and updates the signature of UpsertSAMLConnector to return the
upserted connector in the same manner that Create and Update do.
2023-11-30 19:09:44 +00:00
Nic Klaassenandrosstimothy d14ce0b958 fix: tctl create should not upsert EAS without -f (#35166)
* fix: `tctl create` should not upsert EAS without -f

This commit adds a CreateDraftExternalAuditStorage RPC that will be used by
tctl when called without the -f flag, to avoid overwriting the current
draft without -f.

* update messaged

* remove draft prefix from message

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

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2023-11-30 16:51:29 +00:00
rosstimothy b2bc325703 Implement and use UpsertGithubConnectorV2 (#35132)
While the api client already had support for the new upsert method
it was unimplemented server side and would always fallback to the
legeacy UpsertGithubConnector RPC. This implements the RPC handler
and updates the signature of UpsertGithubConnector to return the
upserted connector in the same manner that Create and Update do.
2023-11-30 15:01:40 +00:00
Noah Stride 634de05c42 Remove Dialer(client.Config) from Credential interface (#34833)
* Remove `Dialer(client.Config)` from Credential interface

* Re-add support for address-less configuration

* Only use profile address if none are explicitly provided

* Try all methods with credential provided address

* Fall back to address from credential

* Remove log message

* Adjust log message

* Spell explicitly correctly

* Formalize CredentialsWithDefaultAddrs interface

* GetDefaultAddrs -> DefaultAddrs
2023-11-29 08:43:07 +00:00
Brian Joerger f3feb7fa12 Add WebAuthn support for admin actions in the WebUI (#34814)
* Add WebAuthn support for admin actions in the WebUI.

* Resolve comments; Use async/await.

* Resolve comments.

* Re-add universal mfa parsing logic to the web server.

* Fix lint.

* Address comments.

* Incorporate suggested changes.

* Fix lint.
2023-11-28 19:14:03 +00:00
Nic Klaassen ee00b17f04 External Audit Storage: rename from ExternalCloudAudit (part 3) (#34962)
* External Audit Storage: rename from ExternalCloudAudit (part 3)

* update e to latest master
2023-11-27 21:19:44 +00:00
Nic Klaassen a3318979ed External Audit Storage: rename from ExternalCloudAudit (part 1) (#34961)
* External Audit Storage: rename from ExternalCloudAudit (part 1)

* fix buf-breaking lint

* remove unused event
2023-11-27 19:02:52 +00:00
Lisa Kim 6ade117e9a Adds IGS related fields to feature, module, and license objects (#34868)
* Revert "Deprecate field AdvancedAccessWorkflows to AccessRequest.Enabled (#34792)"

This reverts commit 79d1a5d16e.

* Add IGS related fields to features and modules

* Boiler plate for enabling access monitoring through modules

* Add IGS related license fields

* Use access monitoring feature flag instead

* Fix test

* Add backwards comp without deprecating field

* Address CR

* Address CR
2023-11-27 18:22:49 +00:00