Commit graph

15284 commits

Author SHA1 Message Date
Andrew Burke c4b2861f70
Show resources in Slack notification for access requests (#32887)
This change updates Slack notifications for resource-based access
requests to include the resources being requested.
2023-10-10 21:01:32 +00:00
Andrew Burke b10a8e7589
Make system roles case-insensitive in provision tokens (#33053)
This change makes system roles set in a provision token
case-insensitive.
2023-10-10 20:19:30 +00:00
dependabot[bot] 502ca40b65
Bump the go group in /api with 3 updates (#33243)
Bumps the go group in /api with 3 updates: [github.com/google/go-cmp](https://github.com/google/go-cmp), [golang.org/x/crypto](https://github.com/golang/crypto) and [golang.org/x/net](https://github.com/golang/net).


Updates `github.com/google/go-cmp` from 0.5.9 to 0.6.0
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.9...v0.6.0)

Updates `golang.org/x/crypto` from 0.13.0 to 0.14.0
- [Commits](https://github.com/golang/crypto/compare/v0.13.0...v0.14.0)

Updates `golang.org/x/net` from 0.15.0 to 0.17.0
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 20:12:07 +00:00
dependabot[bot] ccadcdf69b
Bump aws-actions/amazon-ecr-login from 1 to 2 (#33152)
Bumps [aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login) from 1 to 2.
- [Release notes](https://github.com/aws-actions/amazon-ecr-login/releases)
- [Changelog](https://github.com/aws-actions/amazon-ecr-login/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/amazon-ecr-login/compare/v1...v2)

---
updated-dependencies:
- dependency-name: aws-actions/amazon-ecr-login
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Walt <walt@goteleport.com>
2023-10-10 20:09:03 +00:00
Alan Parra 29fe50d3ac
chore: Bump Go to v1.21.3 (#33228)
* chore: Bump Go to 1.21.3

* Run `make dronegen`
2023-10-10 20:07:35 +00:00
rosstimothy 84e1be110a
Complete services.Users interface refactoring (#33233)
* Update e ref

* Complete services.Users interface refactoring

Removes temporary functions required to migrate the interface
without breaking e.

Closes #32949.
2023-10-10 19:56:42 +00:00
Forrest 53be85e4ff
fix watcher setup in oidc test (#33250) 2023-10-10 19:35:00 +00:00
dependabot[bot] 2ae02c45c7
Bump the go group with 26 updates (#33249)
Bumps the go group with 26 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/Azure/azure-sdk-for-go/sdk/azcore](https://github.com/Azure/azure-sdk-for-go) | `1.7.2` | `1.8.0` |
| [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) | `1.3.1` | `1.4.0` |
| [github.com/ClickHouse/clickhouse-go/v2](https://github.com/ClickHouse/clickhouse-go) | `2.14.1` | `2.14.2` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.45.19` | `1.45.24` |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.21.0` | `1.21.1` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.18.42` | `1.18.44` |
| [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) | `1.10.40` | `1.10.41` |
| [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) | `1.11.87` | `1.11.89` |
| [github.com/aws/aws-sdk-go-v2/service/athena](https://github.com/aws/aws-sdk-go-v2) | `1.31.6` | `1.31.7` |
| [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) | `1.122.0` | `1.124.0` |
| [github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect](https://github.com/aws/aws-sdk-go-v2) | `1.17.0` | `1.17.1` |
| [github.com/aws/aws-sdk-go-v2/service/ecs](https://github.com/aws/aws-sdk-go-v2) | `1.30.1` | `1.30.2` |
| [github.com/aws/aws-sdk-go-v2/service/glue](https://github.com/aws/aws-sdk-go-v2) | `1.62.0` | `1.62.1` |
| [github.com/aws/aws-sdk-go-v2/service/iam](https://github.com/aws/aws-sdk-go-v2) | `1.22.5` | `1.22.6` |
| [github.com/aws/aws-sdk-go-v2/service/rds](https://github.com/aws/aws-sdk-go-v2) | `1.54.0` | `1.55.2` |
| [github.com/aws/aws-sdk-go-v2/service/sns](https://github.com/aws/aws-sdk-go-v2) | `1.22.0` | `1.22.1` |
| [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) | `1.24.5` | `1.24.6` |
| [github.com/fsouza/fake-gcs-server](https://github.com/fsouza/fake-gcs-server) | `1.47.4` | `1.47.5` |
| [github.com/google/go-cmp](https://github.com/google/go-cmp) | `0.5.9` | `0.6.0` |
| [github.com/prometheus/client_model](https://github.com/prometheus/client_model) | `0.4.1-0.20230718164431-9a2bf3000d16` | `0.5.0` |
| [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) | `1.15.3` | `1.16.0` |
| [golang.org/x/mod](https://github.com/golang/mod) | `0.12.0` | `0.13.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.15.0` | `0.17.0` |
| [golang.org/x/oauth2](https://github.com/golang/oauth2) | `0.12.0` | `0.13.0` |
| [golang.org/x/sync](https://github.com/golang/sync) | `0.3.0` | `0.4.0` |
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.143.0` | `0.146.0` |


Updates `github.com/Azure/azure-sdk-for-go/sdk/azcore` from 1.7.2 to 1.8.0
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.7.2...sdk/azcore/v1.8.0)

Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.3.1 to 1.4.0
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.3.1...sdk/azcore/v1.4.0)

Updates `github.com/ClickHouse/clickhouse-go/v2` from 2.14.1 to 2.14.2
- [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.14.1...v2.14.2)

Updates `github.com/aws/aws-sdk-go` from 1.45.19 to 1.45.24
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.45.19...v1.45.24)

Updates `github.com/aws/aws-sdk-go-v2` from 1.21.0 to 1.21.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.18.42 to 1.18.44
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.44)

Updates `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue` from 1.10.40 to 1.10.41
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/feature/dynamodb/attributevalue/v1.10.40...feature/dynamodb/attributevalue/v1.10.41)

Updates `github.com/aws/aws-sdk-go-v2/feature/s3/manager` from 1.11.87 to 1.11.89
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/feature/s3/manager/v1.11.87...feature/s3/manager/v1.11.89)

Updates `github.com/aws/aws-sdk-go-v2/service/athena` from 1.31.6 to 1.31.7
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/athena/v1.31.6...service/athena/v1.31.7)

Updates `github.com/aws/aws-sdk-go-v2/service/ec2` from 1.122.0 to 1.124.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.122.0...service/ec2/v1.124.0)

Updates `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect` from 1.17.0 to 1.17.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.1/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.0...v1.17.1)

Updates `github.com/aws/aws-sdk-go-v2/service/ecs` from 1.30.1 to 1.30.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.30.1...service/s3/v1.30.2)

Updates `github.com/aws/aws-sdk-go-v2/service/glue` from 1.62.0 to 1.62.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.62.0...service/glue/v1.62.1)

Updates `github.com/aws/aws-sdk-go-v2/service/iam` from 1.22.5 to 1.22.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/fms/v1.22.5...service/fms/v1.22.6)

Updates `github.com/aws/aws-sdk-go-v2/service/rds` from 1.54.0 to 1.55.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.54.0...service/rds/v1.55.2)

Updates `github.com/aws/aws-sdk-go-v2/service/sns` from 1.22.0 to 1.22.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/eks/v1.22.1/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.22.0...service/eks/v1.22.1)

Updates `github.com/aws/aws-sdk-go-v2/service/sqs` from 1.24.5 to 1.24.6
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/fms/v1.24.5...service/fsx/v1.24.6)

Updates `github.com/fsouza/fake-gcs-server` from 1.47.4 to 1.47.5
- [Release notes](https://github.com/fsouza/fake-gcs-server/releases)
- [Commits](https://github.com/fsouza/fake-gcs-server/compare/v1.47.4...v1.47.5)

Updates `github.com/google/go-cmp` from 0.5.9 to 0.6.0
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.9...v0.6.0)

Updates `github.com/prometheus/client_model` from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](https://github.com/prometheus/client_model/commits/v0.5.0)

Updates `github.com/sashabaranov/go-openai` from 1.15.3 to 1.16.0
- [Release notes](https://github.com/sashabaranov/go-openai/releases)
- [Commits](https://github.com/sashabaranov/go-openai/compare/v1.15.3...v1.16.0)

Updates `golang.org/x/mod` from 0.12.0 to 0.13.0
- [Commits](https://github.com/golang/mod/compare/v0.12.0...v0.13.0)

Updates `golang.org/x/net` from 0.15.0 to 0.17.0
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

Updates `golang.org/x/oauth2` from 0.12.0 to 0.13.0
- [Commits](https://github.com/golang/oauth2/compare/v0.12.0...v0.13.0)

Updates `golang.org/x/sync` from 0.3.0 to 0.4.0
- [Commits](https://github.com/golang/sync/compare/v0.3.0...v0.4.0)

Updates `google.golang.org/api` from 0.143.0 to 0.146.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.143.0...v0.146.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azcore
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/ClickHouse/clickhouse-go/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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
  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/athena
  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/ec2instanceconnect
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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-patch
  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/fsouza/fake-gcs-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/prometheus/client_model
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/sashabaranov/go-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/mod
  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/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: google.golang.org/api
  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>
2023-10-10 19:27:46 +00:00
Nic Klaassen a635ce84ec
disable TestHSMDualAuthRotation (#33242) 2023-10-10 19:02:56 +00:00
Steven Martin 6434d2737e
docs: update networking ports (#33209)
* docs: update networking ports

* reword db and app connections

* updated language on exposing ports

* verbiage

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-10-10 18:20:08 +00:00
Alan Parra 29c5738d4a
chore: Bump /x/crypto to v0.14.0 and fix changes (#33169)
* Bump /x/crypto to v0.14.0

* Force ssh.MultiAlgorithmSigner to SHA-512
2023-10-10 18:13:44 +00:00
Paul Gottschling 4aeb9141d2
Fix title conflict (#33231)
Two docs pages have the title "Reference". Give both pages more specific
titles for the benefit of SEO.
2023-10-10 17:49:11 +00:00
Michael af6dd45e0b
Include Pinned Resources in User Preferences (#32009) 2023-10-10 17:42:32 +00:00
Andrew LeFevre bbd6701e22
Report exit code of rsync processes if they fail in TestWithRsync (#33175)
* report exit code of rsync processes if they fail

* use correct 't' when asserting

* Update tool/tsh/common/proxy_test.go

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

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-10-10 17:34:03 +00:00
rosstimothy 4f569a4a63
Prevent blank revisions from being read from the backend (#32871)
* Prevent blank revisions from being read from the backend

Overwrites any empty resource revisions with a placeholder value to
prevent any blank revisions from being provided to users.

* Prevent backend items with empty revisions

All resource revisions are now being set on a backend.Item before
persisting the item to the backend.
2023-10-10 16:56:34 +00:00
Tiago Silva 7001f24ecc
Add param extraContainers to teleport-cluster and teleport-kube-agent (#32953)
* Add param `extraContainers` to `teleport-cluster` and `teleport-kube-agent` (close #6832)

This allows to add side containers to Teleport and Teleport-Agent pods.

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

* fix unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Kseniya Shaydurova <kseniya.shaydurova@saritasa.com>
2023-10-10 16:25:05 +00:00
Steven Martin 0098f11c79
docs: role definition update (#32728)
* docs: update session resources

* adds instance, session_tracker and updates ssh_session
2023-10-10 16:16:03 +00:00
Zac Bergquist 6f654c05d1
Bring internal repo documentation up to date (#33101)
* Bring internal repo documentation up to date

* Update CONTRIBUTING.md

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

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2023-10-10 16:00:23 +00:00
Nic Klaassen f5e1194bc6
fix: typo in error check (#33090)
While working on https://github.com/gravitational/teleport/pull/32911 I
noticed the following broken error comparison, which would always log
because the error was always wrapped and never exactly matched
`http.ErrServerClosed`:

```
if err != nil && err != http.ErrServerClosed {
    log.Warningf("TLS server exited with error: %v.", err)
}
```

I tried to fix it with `errors.Is`, but unfortunately got the condition
inverted. This fixes the condition to match the original intended
behaviour. It's not useful to log `http.ErrServerClosed` errors because
that error is returned every time the server is manually closed.
2023-10-10 14:59:12 +00:00
rosstimothy b60ea81d54
Update users interface (#32987)
services.UsersService now takes a context and returns the user
from write operations as shown in the diff below. The bulk of the
changes are from modifying code to account for the additional
parameter and/or return value. Functional changes to better make
use of the new API will come in follow up PRs.

```diff
// UserGetter is responsible for getting users
type UserGetter interface {
	// GetUser returns a user by name
-	GetUser(user string, withSecrets bool) (types.User, error)
+	GetUser(ctx context.Context, user string, withSecrets bool) (types.User, error)
}

// UsersService is responsible for basic user management
type UsersService interface {
	UserGetter
	// CreateUser creates user, only if the user entry does not exist
-	CreateUser(user types.User) error
+	CreateUser(ctx context.Context, user types.User) (types.User, error)
	// UpdateUser updates an existing user.
-	UpdateUser(ctx context.Context, user types.User) error
+	UpdateUser(ctx context.Context, user types.User) (types.User, error)
	// UpdateAndSwapUser reads an existing user, runs `fn` against it and writes
	// the result to storage. Return `false` from `fn` to avoid storage changes.
	// Roughly equivalent to [GetUser] followed by [CompareAndSwapUser].
	// Returns the storage user.
	UpdateAndSwapUser(ctx context.Context, user string, withSecrets bool, fn func(types.User) (changed bool, err error)) (types.User, error)
	// UpsertUser updates parameters about user
-	UpsertUser(user types.User) error
+	UpsertUser(ctx context.Context, user types.User) (types.User, error)
	// CompareAndSwapUser updates an existing user, but fails if the user does
	// not match an expected backend value.
	CompareAndSwapUser(ctx context.Context, new, existing types.User) error
	// DeleteUser deletes a user with all the keys from the backend
	DeleteUser(ctx context.Context, user string) error
	// GetUsers returns a list of users registered with the local auth server
-	GetUsers(withSecrets bool) ([]types.User, error)
+	GetUsers(ctx context.Context, withSecrets bool) ([]types.User, error)
	// DeleteAllUsers deletes all users
-	DeleteAllUsers() error
+	DeleteAllUsers(ctx context.Context) error
}
```

Depends on gravitational/teleport.e#2346
Implements step 3 of #32949
2023-10-10 14:07:46 +00:00
Tiago Silva 4b34b89a7d
Fix Kubernetes agent updater helm chart reference to bool (#33111)
This PR fixes a problem where Kubernetes cannot transform the bool value
into a string.

```
Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal bool into Go struct field EnvVar.spec.template.spec.containers.env.value of type string
```

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2023-10-10 13:52:39 +00:00
STeve (Xin) Huang 434b9dc0f2
[docs] Attempt to clarify ElastiCache/MemoryDB auth methods (#33077)
* [docs] Clarify ElastiCache/MemoryDB auth methods

* review comments
2023-10-10 13:51:54 +00:00
Tiago Silva 27c90c7179
Fix tsh kube credentials when root cluster roles don't allow Kube access (#33014)
* Fix `tsh kube credentials` when root cluster roles don't allow Kube access

This PR fixes an edge case where an error message is printed to the
users without proper knowledge of the role mappings between root and
leaf clusters.

The user certificates include the `kubernetes_users` and
`kubernetes_groups` allowed in the root cluster but nothing prevents the
access to be sucessfull if the leaf cluster roles after the mapping
introduce the kubernetes principals.

This PR prevents tsh from failing when generating certificates for leaf
Kubernetes clusters.

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

* Update tool/tsh/common/kube.go

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

* add check to tsh proxy

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-10-10 13:30:45 +00:00
Rafał Cieślak fdf44c3ce6
Add execing into a pod to Connect test plan (#33206) 2023-10-10 13:12:48 +00:00
Edward Dowling 1428db0885
Update opsgenie docs (#32730)
* Update opsgenie docs

* Update config forScope for opsgenie plugin docs
2023-10-10 12:08:19 +00:00
Rafał Cieślak 971cadb9cb
Reword Troubleshooting section in Connect docs (#32293)
* Reword Troubleshooting section in Connect docs

* Point readers towards Open Logs Directory button

* Mention specific manifestations of partially unusable UI

* Update commands for removing tsh and app_state.json
2023-10-10 09:20:53 +00:00
Rafał Cieślak 26814c72aa
Add missing Connect My Computer docs commits from #32798 (#33151)
* Reduce instances of "just"

* agent lifecycle -> the lifecycle of the agent

* proxy version -> Teleport Proxy Service version

* Simplify sentence about local user requirement

* Add screenshots of Connect My Computer

* Update screenshots of Connect UI
2023-10-10 08:17:38 +00:00
Brian Joerger d2164a2b97
Revert #32918 and make privateKeyPolicyEnabled an optional field (#33173)
* Revert "Revert private key policy error handling in WebUI (#32918)"

This reverts commit 5e11bf5b49.

* Make privateKeyPolicyEnabled an optional field.
2023-10-10 01:15:09 +00:00
lsgunn-teleport 9fcaf7a880
Add server troubleshooting to left nav (#32989) 2023-10-09 22:24:15 +00:00
Lisa Kim 70de43e913
Fixes emitting wrong events for ec2 discover flow (#33176) 2023-10-09 22:13:29 +00:00
lsgunn-teleport 018430d445
Remove device trust relationship as an example of token:create permissions (#33159) 2023-10-09 20:03:14 +00:00
lsgunn-teleport 09bcc9d6ee
[buddy] docs: minor typos and improvements in the description of the Teleport Proxy Service (#33170)
* Minor typos

* Update docs/pages/architecture/proxy.mdx

* fix capitalization and hyphenation and make features more parallel

* fix identity typo

---------

Co-authored-by: Gabriel Petrovay <gabipetrovay@gmail.com>
2023-10-09 20:02:27 +00:00
Brian Joerger 5b850c9bfd
Extend handshake read deadline to allow signature operations that require user input to be completed (hardware key touch/pin). (#32921) 2023-10-09 19:14:38 +00:00
Brian Joerger 5e11bf5b49
Revert private key policy error handling in WebUI (#32918)
* Revert private key policy error handling in WebUI.

* Restore privateKeyPolicyEnabled field.
2023-10-09 18:59:46 +00:00
Brian Joerger 9cf6874b73
Fix flaky test TestParallelKnownHostsFileWrite by reducing contention for known host file lock. (#32938) 2023-10-09 18:47:42 +00:00
Tiago Silva 8f713013c0
Header Connection: close causes kubectl to fail exec (#33050)
* Header `Connection: close` causes `kubectl` to fail exec

The header `Connection: close` causes failure in kubetl when it upgrades
the connection to SPDY.

The `ReadTimeout` and `WriteTimeout` are known to cause problems to
Kubernetes watch streams.

Fixes #33020

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

* add unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2023-10-09 18:28:07 +00:00
Marco André Dinis 81faf9f5bc
Web: Add EC2 name when listing instances in Discover flow (#33064) 2023-10-09 18:07:55 +00:00
lsgunn-teleport 45e9733c05
join_sessions overrides the deny rule for sessions a user is allowed to join (#32991) 2023-10-09 17:34:30 +00:00
lsgunn-teleport f7edb03eb6
docs: Add Docker to partials and update the discord access request plugin (#32886)
* Add Docker to the access request plugin partial and Discord section

* Update another partial for Docker

* Restore variable to teleport.plugin.version

* Update docs/pages/includes/plugins/install-access-request.mdx

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-10-09 17:33:44 +00:00
rosstimothy 6874bc1844
Start migrating services.UserService to use context and return users (#32920)
* Start migrating services.Identity to use context and return users

Adds new variants of existing methods that are going to be updated
to support propagating context and return users from create, update
and upsert. This is an unfortunate step required because e utilizes
the interface for various functionality. In order to prevent breaking
builds, the temporary methods were added so that e can be converted
to them first, then oss can be updated to the new version of the
interface. Once that is done e will be converted and then the temp
methods will be removed.

* fix typos in comment

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

* fix: don't set metadata on existing item in CAS

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

* fix: gci

* fix: set resource id on update

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-10-09 17:11:39 +00:00
Zac Bergquist f097bb2737
Fix self-signed cert validity on macOS systems (#32698)
As per https://support.apple.com/en-in/HT210176:

> TLS server certificates must contain an ExtendedKeyUsage (EKU)
  extension containing the id-kp-serverAuth OID.

We were not specifying this EKU.

Validated by checking with the old self-signed certs:

    $ security verify-cert -c webproxy_cert.pem -p ssl -r webproxy_cert.pem
    Cert Verify Result: Invalid Extended Key Usage for policy

And then repeating the process after this change:

    $ security verify-cert -c webproxy_cert.pem -p ssl -r webproxy_cert.pem
    ...certificate verification successful.

Closes #32531
2023-10-09 17:03:43 +00:00
dependabot[bot] 446f6688f2
Bump the go group in /integrations/kube-agent-updater with 2 updates (#33118)
* Bump the go group in /integrations/kube-agent-updater with 2 updates

Bumps the go group in /integrations/kube-agent-updater with 2 updates: [github.com/docker/distribution](https://github.com/docker/distribution) and [golang.org/x/mod](https://github.com/golang/mod).


Updates `github.com/docker/distribution` from 2.8.2+incompatible to 2.8.3+incompatible
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.2...v2.8.3)

Updates `golang.org/x/mod` from 0.12.0 to 0.13.0
- [Commits](https://github.com/golang/mod/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

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

* Replaced deprecated import

---------

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>
2023-10-09 16:49:52 +00:00
dependabot[bot] afaf65ba77
Bump the go group in /assets/aws with 3 updates (#33127)
Bumps the go group in /assets/aws with 3 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2).


Updates `github.com/aws/aws-sdk-go-v2` from 1.21.0 to 1.21.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.0...v1.21.1)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.18.42 to 1.18.44
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.42...config/v1.18.44)

Updates `github.com/aws/aws-sdk-go-v2/service/ec2` from 1.122.0 to 1.124.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.122.0...service/ec2/v1.124.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  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/service/ec2
  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>
2023-10-09 16:27:40 +00:00
dependabot[bot] 65a36a9052
Bump the go group in /assets/backport with 1 update (#33119)
Bumps the go group in /assets/backport with 1 update: [golang.org/x/oauth2](https://github.com/golang/oauth2).

- [Commits](https://github.com/golang/oauth2/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  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>
2023-10-09 16:13:20 +00:00
dependabot[bot] e5ef9c829a
Bump the go group in /build.assets/tooling with 2 updates (#33115)
Bumps the go group in /build.assets/tooling with 2 updates: [golang.org/x/mod](https://github.com/golang/mod) and [golang.org/x/oauth2](https://github.com/golang/oauth2).


Updates `golang.org/x/mod` from 0.12.0 to 0.13.0
- [Commits](https://github.com/golang/mod/compare/v0.12.0...v0.13.0)

Updates `golang.org/x/oauth2` from 0.12.0 to 0.13.0
- [Commits](https://github.com/golang/oauth2/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: golang.org/x/oauth2
  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>
2023-10-09 16:10:45 +00:00
dependabot[bot] 7bfb36d253
Bump the rust group with 4 updates (#33120)
Bumps the rust group with 4 updates: [byteorder](https://github.com/BurntSushi/byteorder), [libc](https://github.com/rust-lang/libc), [num-derive](https://github.com/rust-num/num-derive) and [num-traits](https://github.com/rust-num/num-traits).


Updates `byteorder` from 1.4.3 to 1.5.0
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.4.3...1.5.0)

Updates `libc` from 0.2.148 to 0.2.149
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.148...0.2.149)

Updates `num-derive` from 0.4.0 to 0.4.1
- [Changelog](https://github.com/rust-num/num-derive/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-derive/compare/num-derive-0.4.0...num-derive-0.4.1)

Updates `num-traits` from 0.2.16 to 0.2.17
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.16...num-traits-0.2.17)

---
updated-dependencies:
- dependency-name: byteorder
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust
- dependency-name: num-derive
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust
- dependency-name: num-traits
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 16:06:30 +00:00
rosstimothy aee0839f0b
Add Create/Update/UpsertV2 RPCs for Auth Connectors (#32643)
Adds new RPCs which return the modified connector from write
operations. Server side and interface changes will be don in follow
up PRs to prevent breaking e. This is the first step in enforcing
optimistic locking for auth connectors.

Contributes to #30416.
2023-10-09 15:59:08 +00:00
Rafał Cieślak ae297dedac
Add support for gap prop to Button (#33142)
* Reformat buttons story away from using spacing on individual elements

* Add support for gap prop to Button
2023-10-09 14:59:29 +00:00
Steven Martin 6c166b85a0
docs: remove internal label listing (#33143) 2023-10-09 14:55:36 +00:00
Rafał Cieślak d21ae196e4
Add docs for Connect My Computer (#32798)
* Add docs for Connect My Computer

* Update Troubleshooting Connect My Computer header

This way it doesn't conflict with the general Troubleshooting header.

* Add troubleshooting section about expired token

* Expand section on agent not being visible in cluster

* Mention that logout removes the agent
2023-10-09 14:36:22 +00:00