Commit graph

13981 commits

Author SHA1 Message Date
Bartosz Leper aed52bbf2f
Make it official which browsers we aim to be compatible with (#29053) 2023-07-18 21:21:50 +00:00
Edoardo Spadolini 45e1df013e
RFD 0140 - Azure Blob Storage session storage (#28667)
* RFD 0140 - Azure Blob Storage session storage

* Update approvers
2023-07-18 20:32:13 +00:00
Edoardo Spadolini 8f4fc6578e
RFD 0138 - Postgres backend storage (#28355)
* RFD 0138 - Postgres backend storage

* DeleteRange is fine in a single tx

* required engineering approvers

* delete_batch_size is no longer a tunable

* Address comments

* Use a BRIN index for event creation time

Co-Authored-By: Anton Miniailo <anton@goteleport.com>

* Update approvers

* Switch event_data to bytea

* Go back to json for event_data

* Move non-postgres audit params to the fragment

This matches what we do for azsessions

---------

Co-authored-by: Anton Miniailo <anton@goteleport.com>
2023-07-18 20:30:28 +00:00
Michael Wilson 98e918e911
Remove access list gRPC service from OSS, introduce owner/member checks. (#29238)
* Remove access list gRPC service from OSS, introduce owner/member checks.

The access list gRPC service has been removed from the OSS version of
Teleport. Additionally, methods for checking owner/member access to
access lists have been added, which will be used for determining finer
grained access to access lists by members and owners of access lists.

Additionally, access lists have been added to the editor preset. A small
modification has been added to the authz.AuthorizeWithVerbs to allow
follow on checks in the event of an access denied.

* GCI.

* Revert permissions.go change.
2023-07-18 20:01:53 +00:00
Tiago Silva 8c433e539c
Fix proxy protocol support for Kube access flow (#29268)
This PR allows enabling/disabling the support for proxy protocol in Kubernetes access flow.
2023-07-18 19:16:42 +00:00
Tiago Silva 7b49931edb
Prevent creating Kube resources forbidden by kubernetes_resources (#29248)
* Prevent creating Kube resources forbidden by `kubernetes_resources`

This PR prevents users from creating resources that their user is
forbidden to access.

This requires parsing the request body to extract the resource name.

Fixes #29245

* Update lib/kube/proxy/forwarder.go

Co-authored-by: Michael Wilson <mike@mdwn.dev>

---------

Co-authored-by: Michael Wilson <mike@mdwn.dev>
2023-07-18 18:54:26 +00:00
Ryan Clark 60f9ca359a
[Assist] Add initial components for access requests (#28907)
* Add initial components for access requests

* Run prettier

* Remove unused variables
2023-07-18 18:41:24 +00:00
public-renovate-gha[bot] 7824ab17d9
Update Teleport API (#28589)
* Update Teleport API

* go mod tidy

---------

Co-authored-by: public-renovate-gha[bot] <135069952+public-renovate-gha[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
Co-authored-by: Nic Klaassen <nic@goteleport.com>
2023-07-18 18:29:15 +00:00
Gavin Frazar 5c12e45eb1
update discovery labels (#28917)
* update discovery labels and name overrides

* move all labels into api/types/constants.go
* add name override labels for GKE and AKS that are allowed tag names in
  GCP and Azure

* fix kubernetes typos

* support legacy and cloud-agnostic name override labels for AWS

* fix tests

* add tests for creating kube clusters from cloud kube clusters

* fix linter
2023-07-18 18:17:46 +00:00
Isaiah Becker-Mayer dea4bde339
replaces unsafe.Pointer(&slice[0]) with unsafe.SliceData(slice) (#28625)
* replaces unsafe.Pointer(&slice[0]) with unsafe.SliceData(slice)

* Adds utils.UnsafeSliceData
which converts the unsafe.SliceData edge case which returns a sketchy
"a non-nil pointer to an unspecified memory address" to an error.
2023-07-18 17:39:06 +00:00
Michael Wilson d9ea2061d7
Add the AccessList to the cache. (#29119)
* Add the AccessList to the cache.

The AccessList has been added into the cache. The AccessList resource
and its supporting resources had to be moved back into api for this so that
it can be properly referenced in api/client/events.go, which is necessary
for cache propagation.

* Address remaining lib/types references.

* Add in additional test to events_test.go.

* GCI.

* Add back in client wrapper so that the cache will work properly.

* Traits ToProto order is deterministic.

* Add in compile time access list client check.
2023-07-18 15:29:22 +00:00
Steven Martin 33479cebbd
docs: update github sso instructions for self-hosted to use new parameters (#29155) 2023-07-18 15:25:20 +00:00
Alan Parra fa6a298220
Record os_build_supplemental in the DeviceProfile (#29229)
* Record os_build_supplemental in the DeviceProfile

* Update generated protos

* Convert new resource fields
2023-07-18 13:50:31 +00:00
Alex McGrath 5523f152d3
Update the automatic user creation RFD for a new option to specify UID/GID when creating host users (#28940)
* mention new option to specify uid/gid when creating host users

* Update for including only traits in the user resource
2023-07-18 13:49:25 +00:00
Alex McGrath 2bb3bbbd8a
Add billing_mode option to the DynamoDB backend so pay_per_request or provisioned billing can be configured (#27674)
* Add on demand mode to the dynamodb backend

* Resolve comments, CheckAndSetDefaults

* Set on_demand to true by default and add a test

* Set read/write capacity units to zero and disable autoscaling if on_demand is true

* Resolve comments

* Replace on_demand with a billing_mode enum

* Ignore on demand mode if the table is being created or already exists

* rename to use pay_per_request instead of on_demand

* fix missing table case, resolve comments
2023-07-18 11:42:35 +00:00
Tobiasz Heller 040ec6d3b2
athenamigration: add validation on dry-run (#29193) 2023-07-18 10:29:14 +00:00
Trent Clarke c519c51378
Fix certbot installation in AMI (#29104)
Moves the `certbot` symlink to the location expected by the `systemd`
units.
2023-07-18 00:33:22 +00:00
STeve (Xin) Huang ed8d212812
fix flaky teleterm daemon test (#29218) 2023-07-18 00:00:33 +00:00
dependabot-batcher[bot] b0a787021b
Batched Dependabot updates (#29181)
* Bump semver from 5.7.1 to 5.7.2

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

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

* Bump github.com/crewjam/saml in /examples/access-plugin-minimal

Bumps [github.com/crewjam/saml](https://github.com/crewjam/saml) from 0.4.12 to 0.4.13.
- [Commits](https://github.com/crewjam/saml/compare/v0.4.12...v0.4.13)

---
updated-dependencies:
- dependency-name: github.com/crewjam/saml
  dependency-type: indirect
...

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

* Bump github.com/aws/aws-sdk-go-v2/config in /assets/aws

Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.27 to 1.18.28.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.27...config/v1.18.28)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump github.com/okta/okta-sdk-golang/v2 from 2.18.0 to 2.20.0

Bumps [github.com/okta/okta-sdk-golang/v2](https://github.com/okta/okta-sdk-golang) from 2.18.0 to 2.20.0.
- [Release notes](https://github.com/okta/okta-sdk-golang/releases)
- [Changelog](https://github.com/okta/okta-sdk-golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/okta/okta-sdk-golang/compare/v2.18.0...v2.20.0)

---
updated-dependencies:
- dependency-name: github.com/okta/okta-sdk-golang/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump golang.org/x/mod from 0.10.0 to 0.12.0

Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.10.0 to 0.12.0.
- [Commits](https://github.com/golang/mod/compare/v0.10.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump cloud.google.com/go/container from 1.22.1 to 1.23.0

Bumps [cloud.google.com/go/container](https://github.com/googleapis/google-cloud-go) from 1.22.1 to 1.23.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.22.1...pubsub/v1.23.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/container
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump github.com/aws/aws-sdk-go-v2/config from 1.18.27 to 1.18.28

Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.18.27 to 1.18.28.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.27...config/v1.18.28)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.6.0 to 1.7.0

Bumps [github.com/Azure/azure-sdk-for-go/sdk/azcore](https://github.com/Azure/azure-sdk-for-go) from 1.6.0 to 1.7.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.6.0...sdk/azcore/v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azcore
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump github.com/bradleyfalzon/ghinstallation/v2 in /build.assets/tooling

Bumps [github.com/bradleyfalzon/ghinstallation/v2](https://github.com/bradleyfalzon/ghinstallation) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/bradleyfalzon/ghinstallation/releases)
- [Commits](https://github.com/bradleyfalzon/ghinstallation/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/bradleyfalzon/ghinstallation/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump go.opentelemetry.io/proto/otlp from 0.20.0 to 1.0.0 in /api

Bumps [go.opentelemetry.io/proto/otlp](https://github.com/open-telemetry/opentelemetry-proto-go) from 0.20.0 to 1.0.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-proto-go/releases)
- [Commits](https://github.com/open-telemetry/opentelemetry-proto-go/compare/v0.20.0...v1.0.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/proto/otlp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-batcher[bot] <122306277+dependabot-batcher[bot]@users.noreply.github.com>
Co-authored-by: Nic Klaassen <nic@goteleport.com>
2023-07-17 23:31:42 +00:00
Gavin Frazar 4f6e9949df
update config reference docs (#29226) 2023-07-17 23:11:15 +00:00
Gabriel Corado 696b418f67
refactor(services): skip ad validation for rds proxy mssql (#28563) 2023-07-17 21:59:09 +00:00
dependabot[bot] 3497d5b02c
Bump github.com/aws/aws-sdk-go-v2/service/dynamodb from 1.20.0 to 1.20.1 (#29168)
Bumps [github.com/aws/aws-sdk-go-v2/service/dynamodb](https://github.com/aws/aws-sdk-go-v2) from 1.20.0 to 1.20.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.20.0...service/ecs/v1.20.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/dynamodb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 21:24:06 +00:00
dependabot[bot] db6bfb50fd
Bump github.com/aws/aws-sdk-go-v2/service/ecs from 1.28.0 to 1.28.1 (#29169)
Bumps [github.com/aws/aws-sdk-go-v2/service/ecs](https://github.com/aws/aws-sdk-go-v2) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.28.0...service/ecs/v1.28.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ecs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 20:52:51 +00:00
Steven Martin 287a68c0b7
provide warning on tsh sso login with Teleport user specified (#29203)
* provide warning on sso login with Teleport user specified

* verbiage update

* update verbiage

* Update output and comments

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

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-07-17 20:22:15 +00:00
dependabot[bot] d1e8002b62
Bump github.com/aws/aws-sdk-go-v2/service/sns from 1.20.13 to 1.20.14 (#29175)
Bumps [github.com/aws/aws-sdk-go-v2/service/sns](https://github.com/aws/aws-sdk-go-v2) from 1.20.13 to 1.20.14.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/emr/v1.20.13...service/emr/v1.20.14)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 20:14:30 +00:00
Zac Bergquist 245e5d831e
Remove deprecated HTTP endpoints from auth API (#29201)
These were replaced with gRPC equivalents a couple of releases ago.
2023-07-17 19:32:46 +00:00
Alan Parra 586a08f871
Define the GetDevicesUsage RPC (#29089)
* Define the GetDevicesUsage RPC

* s/devices limits/device limits/

* Update generated protos
2023-07-17 19:01:38 +00:00
dependabot[bot] e615732568
Bump github.com/aws/aws-sdk-go-v2/credentials from 1.13.26 to 1.13.27 (#29172)
Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.13.26 to 1.13.27.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.13.26...credentials/v1.13.27)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 18:59:34 +00:00
public-renovate-gha[bot] c5b61af0d1
chore(deps): update build assets - tooling (#29182)
Co-authored-by: public-renovate-gha[bot] <135069952+public-renovate-gha[bot]@users.noreply.github.com>
2023-07-17 18:09:01 +00:00
public-renovate-gha[bot] 20bbbaa9c3
fix(deps): update assets - aws (#29185)
Co-authored-by: public-renovate-gha[bot] <135069952+public-renovate-gha[bot]@users.noreply.github.com>
2023-07-17 18:08:59 +00:00
dependabot[bot] 6083f80bde
Bump github.com/aws/aws-sdk-go from 1.44.280 to 1.44.300 (#29174)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.280 to 1.44.300.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.280...v1.44.300)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 18:08:35 +00:00
Alan Parra 4a3bf8408e
Allow custom enroll token expiration time (#29070)
* Allow custom enroll token expiration time

* Update generated protos
2023-07-17 17:29:24 +00:00
Tiago Silva f880c294b3
Fix reference to azure identity in GCP app (#29197)
This PR fixes a typo on our Google Cloud guide that incorrectly refers
to the azure identity format instead of GCP format.
2023-07-17 16:37:29 +00:00
Michael Wilson 983e0cc611
Support non-gogo objects for auth service events. (#29056)
* Support non-gogo objects for auth service events.

Auth service events will now support non-gogo objects. This was done by
generating the events and associated objects with regular go protobuf
instead of gogo and then correcting the code for the differences in
code generation.

* Correct lock copying in event protobuf.

* Temporarily ignore event.proto in buf breaking.

* Attempt to keep buf breaking from breaking.

* Remove comment.

* Rename gproto to googleproto.

* Rename api/client/proto import to authpb and googleproto to proto.

* Correct comment, add in test exercising proto.Equal.

* GCI.

* Events test actually does work.
2023-07-17 15:32:03 +00:00
teleport-post-release-automation[bot] 000cc84699
[auto] Update AMI IDs for 13.2.2 (#29200)
Co-authored-by: GitHub <noreply@github.com>
2023-07-17 14:59:27 +00:00
Forrest a84681a8e4
upgrader monitoring and alerts (#28951)
* add rate limit stream helper

* upgrader metrics & alert

* add docs for discovering upgrade enroll prospects

* update prehod protos

* Update docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx

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

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-07-17 14:42:27 +00:00
STeve (Xin) Huang 336518e0b5
Connect Kube gateway part 2: command provider (#28920)
* Connect Kube gateway part 2: command provider

* gateway.Database and gateway.Kube interface

* remove cmd.ProviderManager and fix integration test

* revert cluster.RootClusterName change for now as profile may not have key
2023-07-17 13:11:30 +00:00
Tiago Silva 47530e1fd8
Grant access to resources inside a namespace when kind=namespace (#29047)
This PR corrects the behavior of handling namespaces for Kubernetes
per-Resource RBAC.

The new behavior allows accessing the resources withing the namespace
`someNamespace` if a rule `kind: namespace, name: someNamespace` is
defined for `kubernetes_resources`.

It also allows users to see namespaces (list, get or watch requests)  if
they have other resources defined for the namepsace without requiring
explicit rules for `kind:namespace, name: someNamespace`.

As an example:
```yaml
allow:
  kubernetes_resources:
  - kind: namespace
    name: someNamespace
  - kind: pod
    namespace: otherNamespace
    name: *

```

Reads as: the user has access to everything in namespace someNamespace
AND to pods in otherNamespace.

```
$ kubectl get ns
someNamespace
otherNamespace
```

Pods:
```
$ kubectl get pods -n someNamespace
pod1
pod2
$ kubectl get pods -n otherNamespace
pod3
pod4
```

Other resources:
```
$ kubectl get secret -n someNamespace
secret1
secret2
$ kubectl get secret -n otherNamespace
REQUEST IS DENIED
```
2023-07-17 11:37:38 +00:00
Marco André Dinis 883cf1aeda
AWS DBs Heartbeat: return IAM status (#28952) 2023-07-17 11:36:06 +00:00
Noah Stride b1cc56cb28
Machine ID: TBot v14 documentation changes (#27460)
* Get started on V14 tbot changes

* Update applications.mdx for new config format

* Rearrange databases guide

* Flesh out guidance on migration

* Fill out more of configuration.mdx page

* Add more verbose config explanations

* Add more output documentation

* Use common include file

* Tweak descriptions for destination types

* Rewrite docs for directory dest

* Update language used in Architecture guide

* Add principals to ssh_host docs

* Fix mispelt ssh_host output type

* Update other guides with config v2

* Add version warning to guides re: v2 config

* Add guidance on migration failure

* Remove reference to Application Access/Database Access

* Use database server rather than database service

* Reword for clarity and conciseness

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Rename common-output-config.mdx

* Reflow and change title in upgrade guide

* Remove scoped configs

* Apply suggestions from code review

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* Apply suggestions from code review

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* Apply suggestions from code review

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* Use code block for example command

* Dont use list for definitions

* Use full name of ACL

* Add brief description of outputs field

* Fix up host certificate guide

* Reflow FAQ

* Specify fields that need replacing in jenkins guide

* Clarify "join token" in database joining docs

---------

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-07-17 09:49:17 +00:00
Trent Clarke 9c9503fcda
[Docs] Adds section on installing AMIs. (#28056)
* [Docs] Adds section on installing AMIs.

* Teach CSpell about STIG

* Update docs/pages/installation.mdx

Co-authored-by: Steven Martin <steven@goteleport.com>

* Adds links to AMI examples

* reqord

* linter

---------

Co-authored-by: Steven Martin <steven@goteleport.com>
2023-07-17 01:47:29 +00:00
Michael Wilson 2c27a77931
Use the devbox install action, update devbox packages. (#28616)
The devbox install action will be used instead of our custom devbox install.
This will ensure caching is used, speeding up this process.

Additionally, the following have been updated:

- buf -> 1.23.1.
- go -> 1.20.5
- clang -> 14.0.6

Finally, packages have been migrated to regular devbox syntax where possible.
2023-07-14 23:58:13 +00:00
Gavin Frazar 2b2de5c6be
update tsh db resource selection (#28505)
* update tsh db resource selection

* add --labels and --query to tsh db subcommands
* tsh db [login | logout | env | config | connect]
* tsh proxy db

* add hasPrefix to predicate lang

* add teleport.dev/discovered-name
* print "discovered name" of databases discovered by discovery service,
  which is the name of the database resource in the cloud, when using
  tsh db ls without --verbose flag. This avoids printing verbose
  uniquely identifying names when discovery service is updated to append
  a uniquely identify suffix to discovered databases in AWS/Azure/GCP.
* tsh db ls --verbose ignores the label
* fix db connect string in tsh db ls

* select database by prefix, labels, and/or query predicate.
* chooses active database by exact match if the "prefix" matches exactly
  and no labels/predicate is given.
* logout of a subset of databases with tsh db logout.
* print an "ambiguous match" error if prefix/labels/query matches
  multiple databases where one is required.
* move all --labels cli flags to cf.Labels from cf.UserHost

* update tsh db tests
    * speedup slow tsh db tests
    * postgres/mysql profile respect home dir
    * rename test cases for consistency
    * test database listing uses discovered-name
    * test login/env/config/logout with prefix/label/predicate selectors
    * test active db filtering logic

* fix tests broken by merge
2023-07-14 23:41:32 +00:00
lsgunn-teleport 8862431d89
Fix lint warning, make these unordered lists (#29086)
* Fix lint warning, make these unordered lists

* Change numbered steps, make a couple of edits

* Update the versions mentioned in the upgrade sequence

* Changed to bullets because these aren't discrete steps in the traditional sense

* Remove extra lines

* Fix lint issue
2023-07-14 22:53:13 +00:00
Andrew Burke da64b0c9f1
Add discovery-side label reconciler (#27476)
This change adds a service to the auth server that periodically iterates through
stored ServerInfos and updates the labels of associated SSH servers over their
inventory control stream.
2023-07-14 22:01:23 +00:00
Jakub Nyckowski 7bfe300611
Reduce embedding period to 20 minutes (#29146)
The embedding period in the service code was previously set to 1 hour. This change reduces it to 20 minutes, in order to allow the embedding routines to run more frequently for better UX - people won't need to wait an hour to use Assist after a node is added.
2023-07-14 18:58:32 +00:00
Paul Gottschling 5cf2fa504f
Use the examples directory for example plugin code (#23255)
* Use the examples directory for example plugin code

Also edit the Access Request plugin API guide to use this directory,
rather than having the reader copy/paste individual code snippets. This
makes the guide easier to follow, and users will have a compilable
example before they proceed through the guide.

* Run make fix-license

* Run make fix-imports

* Fix spelling

* Run go mod tidy

* Extract Access Request plugin example to partials

This way, we can reuse the actual program in the Access Request plugin
API guide and avoid unintended discrepancies and drift.

* Use types.Events.NewWatcher instead of watcherjob

Need to test this out, but it compiles

* Remove outdated information

- Types that are no longer reachable via public interfaces
- The description of the demo implementation that used the old
  `watcherjob` package

* Update text to reflect new `run` logic

* Make the example program more modular

Respond to Joerger feedback

* Respond to alexfornuto feedback

* Apply suggestions from code review

Co-authored-by: Brian Joerger <bjoerger@goteleport.com>

* Respond to zmb3 feedback

- Split up "types.go". Reserve a single file for configuration values so
  these are visible in a single place within the guide.
- Return an error on an unsuccessful HTTP request when creating or
  updating a row
- Simplify requestStates lookup
- Clearly mark values that a user must change
- Update the text of the guide to match changes to the program

* Spell fixes

* Respond to zmb3 feedback

---------

Co-authored-by: Brian Joerger <bjoerger@goteleport.com>
2023-07-14 18:53:35 +00:00
Alex Fornuto 0d0699877e
Docs: Refresh Azure AD SSO Guide (#29012)
* remove focus on SSH, formatting

* optimize images

* update azure ad SSO guide

* Update docs/pages/access-controls/sso/azuread.mdx

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

* Apply suggestions from code review

Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>

* linting

* reformat headers and numbered steps

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: lsgunn-teleport <136391445+lsgunn-teleport@users.noreply.github.com>
2023-07-14 15:59:41 +00:00
Grzegorz Zdunek c999082b1c
Connect My Computer: Downloading the agent (#28698)
* Move `compareSemVers` function to `shared`

* Set correct `sessionData` path when the app is initialized

* Add `sessionDataDir`, `tempDataDir` and `agentBinaryPath` to `RuntimeSettings`

* Add `downloadAgent`

* Add a download step to CMC setup

* Escape spaces in the agent path only when used in a command

* Run prettier

* Change `sessionData` path for Windows too

* Improve comments

* Rename `AGENT_VERSION` to `CONNECT_CMC_AGENT_VERSION`

* Inspect HTTP status of the download response before using it

* Move `tar-fs` and `@types/tar-fs` to regular deps

* Switch to `execFile`

* Rename `isAgentAlreadyDownloaded` and `BinaryParams`

* Grammar fix

* Remove state from `FileDownloader`

* Remove custom check for the save path

* Deprecate old `compareSemVers` export instead of removing it

* Use vX.Y.Z format

* Improve comment

* Log fetch error and throw an error with status code

* Do not modify process.env in tests

* Add `ConnectMyComputerService`

* Fix comment and log message

* Run setup only when all statuses are ''

* Revert unintentionally removed comment

* Remove logger line

* Share the same promise across multiple callers

* Remove temp file

* Prettier

* Put CMC temp file in a directory

* Simplify `sharePromise` signature

* Rename `binaryName` to `tarballName`

* Use a correct path for cache on Linux
2023-07-14 15:47:28 +00:00
Grzegorz Zdunek 1a4e9ba88a
Allow relative file URIs to sqlite (#29124)
* Allow relative file URI to `sqlite`

* Add tests
2023-07-14 15:22:32 +00:00