Commit graph

13978 commits

Author SHA1 Message Date
Jakub Nyckowski fa785847ec
Fix panic when fetching user preferences (#28751)
* Fix panic when fetching user preferences

Closes https://github.com/gravitational/teleport/issues/28740

* Prevent overwriting mismatched types in user preferences

* Add error handling to user preferences service

* GCI imports

* Refactor user preferences test and logic

This commit updates the approach for comparing equality in user preferences test. It introduces the use of the "go-cmp" library which provides more flexibility in handling comparison of struct elements, thus helping to catch any unexpected changes that could be overlooked with the standard equality checking. We also revised the logic to handle default preferences by overwriting values for better efficiency and readability, also removing unnecessary checking and merging of values.

* Add comments to overwriteValues method in userpreferences.go

Added detailed comments to better explain the overwriteValues function in userpreferences.go file. The comments clarify how the function uses proto.Ranges to iterate over fields and only overwrite non-nil/empty fields.

* Apply some magic to preferences test

* Change the import to avoid go.mod changed and match our other imports
2023-07-11 21:02:18 +00:00
Brian Joerger 5c9501235e
Refactor Gateway Cert Reissuer and tshd events client (#28782)
* - Move tshd events client into the daemon service.

- Replace gatway cert reissuer with a more reusable retryWithRelogin
method.

* Resolve comments.
2023-07-11 20:50:16 +00:00
Zac Bergquist 80f74172d3
desktop access: clean up error handling (#28958)
In several places we were effectively wrapping the same error twice.
This resulted in an error message that was duplicated and hard to read.

Also improve our handling of LDAP timeouts by:
1. Increase the LDAP request timeout to 45s
2. Retrying LDAP connections sooner if we detect a timeout error
   (this allows Teleport to recover quicker)
2023-07-11 20:15:49 +00:00
Paul Gottschling 7fbff06259
Document backend_write_requests_total (#28897)
Fixes #10925

The backend_write_requests_total metric was missing from the metrics
reference. This change documents the metric using its Prometheus help
text.
2023-07-11 20:08:35 +00:00
Steven Martin 7efb6635b3
include endpoint_url parameter for tctl sso configure github (#28842)
* include endpoint_url parameter for tctl sso configure github

* add api-endpoint-url paramter

* unify GitHub endpoint descriptions
2023-07-11 20:05:33 +00:00
Brian Joerger 1b73bafca8
Fix headless authentication matching logic for watcher (#28843)
* Fix headless authentication matching logic for watcher and add test.

* Move hasWatchPermissionForKind to a separate function.

* Clean up hasWatchPermissionForKind.

* Cleanup test code with suggestions from review.
2023-07-11 20:05:17 +00:00
Andrew LeFevre d4b3afe9a1
split recording session events and emitting audit events (#27873)
* split recording session events and emitting audit events

This is a refactor of how audit events and session events are handled.
Previously, all events were emitted using the same interface,
api/types/events.Emitter. This lead to event-related code getting to be
very confusing, as it was often unclear whether a given event was being
recorded as a session event and emitted as an audit event, or only one
of the two. Naturally, a few bugs arose due to this.

To simplify event handling, a separate interface for recording session
events has been created. A api/types/events.Recorder should now only be
used to record session events, and an Emitter should now only be used to
emit audit events. Instead of using a confusing TeeWriter that would
transparently (and confusingly, given its name) hold a few event types
that only belonged in session recordings, callers can now explicitly
record and/or emit an event when necessary.

* ensure e build won't break
2023-07-11 19:53:33 +00:00
Tiago Silva b8118731cf
Fix listing servers when creating a new lock via webui (#28950)
This PR fixes the property `value` used by Servers when listing
connected nodes. The value was incorrectly switched from `node` to
`server_id` by mistake which crashed the list of Servers.

This regression was introduced in #27395.

Fixes #28948
2023-07-11 17:58:59 +00:00
Andrew Burke 9ee7e5774f
Fix Azure join for identities across resource groups (#28927)
This change fixes a bug in the Azure join method where a VM's identity can't be
verified if it's in a different resource group from its managed identity.
2023-07-11 17:27:02 +00:00
Alan Parra 9d7f553bf3
Add usage-based feature values for Device Trust (#28919)
* Add DeviceTrustFeature to Auth protos

* Update generated protos

* Add DeviceTrustFeature to modules.Features
2023-07-11 17:25:00 +00:00
Jakub Nyckowski f13cd935a9
Set lower temperature to ChatGPT calls (#28793)
Updated the ChatCompletionRequest in the agent model to include temperature parameter. The temperature parameter controls the randomness of the AI's responses, making the model more conservative and focused with a lower value. In this case, the temperature is set to 0.3 to produce more focused and consistent results. Default is 1.0. Max is 2.0.
2023-07-11 17:20:08 +00:00
Alex McGrath 3fff0bdbbf
Dont allow cloud tenants to update certain cluster networking config fields (#28634)
* Dont allow cloud tenants to update certain cluster networking fields

* resolve comments

* remove fmt.Sprintf
2023-07-11 16:11:51 +00:00
Rafał Cieślak 732ad92d5f
tctl alerts ack: Make --reason optional (#28939)
This fixes `tctl alerts ack ls` which used to not work due to the reasons
described in the comment.

Providing a reason is still required. The only difference is that instead
of having the CLI fail immediately if the flag is missing, the CLI will
issue a request to the cluster which will fail due to a missing reason.
2023-07-11 14:49:28 +00:00
Gabriel Corado caacc54696
feat(dbcmd): add sqlcmd support (#28918) 2023-07-11 12:42:59 +00:00
Bartosz Leper 800e79b113
Add an audit event for creating provisioning tokens (#28769)
* Add a provision token creation event on the backend

* Support provision token creation audit event on frontend

* Modify the deprecated GenerateToken function

Also:
* Add some missing tests.
* Add error logging in emitTokenEvent().
* Fix lint errors.

* Fix import order

* Address review comments

* Fix final review comments, add docs

* Fix the broken test

* Revert "Fix the broken test"

This reverts commit e1b8d2e640.

* Properly fix emitting duplicated events
2023-07-11 12:21:26 +00:00
Sakshyam Shah 072519b3e2
supports newline and whitespace in motd: (#28747)
dquote> - renders vertical scrollbar for longer message
dquote> - caps width to 600px, height to 500px
2023-07-11 11:06:21 +00:00
Edoardo Spadolini 49a1812478
Add ProxyGroup support to reverse tunnels (#27574)
* Set and distribute proxy group ID and generation

* Replace proxy tracker with a proxygroup-aware one

* Eager proxy deletion

* godocs

* restore and update tracker_test

* Mixed workload test with proxy groups

* limit connectionCount if there's fewer proxies

* package docs

* use ints for the generation

* Explicitly zero out the Atoi return value on error

* Check TELEPORT_UNSTABLE_PROXYGROUP_GEN at startup

It's now required to be empty or a valid uint64

* Pointer receivers for discoveryRequest, add docs

* track docs

* expand and document lease field names

* remove proxy deletion via gossip

* Poll the tracker

* restore TestAgentPoolConnectionCount

* Improve and deflake tracker tests

* Update track package docs

* Update cannotLease docs

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>

* docs for TryAcquire

* TODO for logging

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
2023-07-11 07:46:01 +00:00
Roman Tkachenko 841cbbfb35
Remove preview from several features (#28924)
* Remove preview from several features

* Fix

* Update oracle-self-hosted.mdx
2023-07-11 00:32:27 +00:00
Roman Tkachenko 345fdd4729
Mention agentless in the OpenSSH guide for better SEO (#28749)
* Mention agentless in the OpenSSH guide for better SEO

* Apply suggestions from code review

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

---------

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
2023-07-10 20:31:36 +00:00
Brian Joerger 8a13de3ef9
Fix ssh env var parsing by checking after cf.AuthConnector is guaranteed to be set. (#27970) 2023-07-10 17:29:04 +00:00
Brendan O'Halloran 10db9e781c
add Athena URL parameter to configure AWS region (#28073)
* add Athena URL parameter to configure AWS region

Signed-off-by: Brendan O'Halloran <brendan.ohalloran@goteleport.com>

* add tests for region param

* Update lib/events/athena/athena.go

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* gofmt

Signed-off-by: Brendan O'Halloran <brendan.ohalloran@goteleport.com>

---------

Signed-off-by: Brendan O'Halloran <brendan.ohalloran@goteleport.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2023-07-10 16:49:21 +00:00
Ryan Clark 116c5dab06
[Assist] Only parse messages from Assist as markdown (#28899)
* Only parse messages from Assist as markdown

* Move markdown into a separate component & disable images

* Update Markdown.tsx
2023-07-10 16:33:36 +00:00
Rafał Cieślak 2003088382
tctl alert ls: Always show alert ID (#28808) 2023-07-10 16:09:49 +00:00
Lisa Kim f6938613d2
WebDiscover: Finish auto deploy screen (iam configure script) (#28621)
* Define the return type

* Add endpoint for config script

* Store the entire integration object instead of just the name

* Build the correct script string, renames, emit event

* Enable auto deploy as default

* Fix script endpoint and update story

* Add regex check, update story

* Touch ups, add test

* Address CR

* Remove sudo from bash command

* Make into ui friendly object
2023-07-10 15:09:03 +00:00
dependabot-batcher[bot] c6529af658
Batched Dependabot updates (#28863)
* Bump @grpc/grpc-js from 1.6.7 to 1.8.8

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.6.7 to 1.8.8.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.6.7...@grpc/grpc-js@1.8.8)

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:development
...

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

* Bump google.golang.org/grpc from 1.43.0 to 1.53.0 in /examples/go-client

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

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

* Bump google.golang.org/grpc in /examples/desktop-registration

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

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

* Bump tough-cookie from 4.1.2 to 4.1.3

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

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

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

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

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

* Bump github.com/sashabaranov/go-openai from 1.12.0 to 1.13.0

Bumps [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/sashabaranov/go-openai/releases)
- [Commits](https://github.com/sashabaranov/go-openai/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/sashabaranov/go-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump k8s.io/apiextensions-apiserver from 0.27.2 to 0.27.3

Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.27.2 to 0.27.3.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump github.com/bufbuild/connect-go from 1.7.0 to 1.9.0

Bumps [github.com/bufbuild/connect-go](https://github.com/bufbuild/connect-go) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/bufbuild/connect-go/releases)
- [Commits](https://github.com/bufbuild/connect-go/compare/v1.7.0...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/bufbuild/connect-go
  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/service/sqs from 1.22.0 to 1.23.2

Bumps [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) from 1.22.0 to 1.23.2.
- [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.22.0...service/ecs/v1.23.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  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/service/glue from 1.53.0 to 1.54.0

Bumps [github.com/aws/aws-sdk-go-v2/service/glue](https://github.com/aws/aws-sdk-go-v2) from 1.53.0 to 1.54.0.
- [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/ec2/v1.53.0...service/ec2/v1.54.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/glue
  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/service/s3 from 1.35.0 to 1.36.0

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.35.0 to 1.36.0.
- [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.35.0...service/s3/v1.36.0)

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

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

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 in /assets/backport

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

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

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

* Bump cloud.google.com/go/iam from 1.1.0 to 1.1.1

Bumps [cloud.google.com/go/iam](https://github.com/googleapis/google-cloud-go) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/dlp/v1.1.0...iam/v1.1.1)

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

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

* Bump google.golang.org/grpc from 1.56.1 to 1.56.2 in /api

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.1 to 1.56.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.1...v1.56.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 in /build.assets/tooling

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  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/service/ec2 in /assets/aws

Bumps [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) from 1.102.0 to 1.103.0.
- [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/ec2/v1.102.0...service/ec2/v1.103.0)

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

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

* go mod tidy

* make grpc

---------

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: Tim Ross <tim.ross@goteleport.com>
2023-07-10 15:07:46 +00:00
Alan Parra 64625c893d
chore: Bump Buf to v1.23.1 (#28816)
Update to latest version.

* https://github.com/bufbuild/buf/releases/tag/v1.23.1
* https://github.com/bufbuild/buf/releases/tag/v1.23.0
2023-07-10 14:53:03 +00:00
Tiago Silva 4da3e820ad
Deduplicate resources for tsh request search when replicas>1 (#28661)
When the number of replicas of a resource is bigger than 1 - i.e.
`kube_cluster`, `app`, `db` - `tsh request search` printed
all the registered resources instead of ignoring the repeated rows.

This PR excludes the repeated resource ids from the table and request
command.

Before:
```
$ tsh request search --kind kube_cluster
Name       Hostname Labels                                                             Resource ID
---------- -------- ------------------------------------------------------------------ -----------------------------------
local               env=tiago                                                          /tele.local/kube_cluster/local
my-cluster          teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster
my-cluster          teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster
my-cluster          teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster

To request access to these resources, run
> tsh request create --resource /tele.local/kube_cluster/local --resource /tele.local/kube_cluster/my-cluster --resource /tele.local/kube_cluster/my-cluster --resource /tele.local/kube_cluster/my-cluster \
    --reason <request reason>

```

After:

```
$ tsh request search --kind kube_cluster
Name       Hostname Labels                                                             Resource ID
---------- -------- ------------------------------------------------------------------ -----------------------------------
local               env=tiago                                                          /tele.local/kube_cluster/local
my-cluster          teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster

To request access to these resources, run
> tsh request create --resource /tele.local/kube_cluster/local --resource /tele.local/kube_cluster/my-cluster \
    --reason <request reason>

```
2023-07-10 13:55:55 +00:00
Noah Stride 6122933e68
Machine ID: Add guides to the Enroll Integration page (#28646)
* First pass at adding buttons to the integrations page

* Add analytics events for clicking Machine ID enrollment tiles

* Run prettier

* Fix eslint complaints

* Push fixed icons

* Flatten the styling for the Jenkins logo

* Rearrange machine ID title code

* Remove logs from event processing

* Switch to coloured gitLab icon

* Use GitLabs proper name for CI/Cd

* Fix imports

* Further adjustments from PR

---------

Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>
2023-07-10 13:27:52 +00:00
Gus Luxton 63a229f88a
docs: Add clarification on event types in enhanced recording mode (#28648)
* docs: Add clarification on event types in enhanced recording mode

* Whitelist webvictim in spellcheck

* Change users to alice
2023-07-10 13:04:58 +00:00
Paul Gottschling b036fa0dd4
Add more details about specifying a CA pin (#27731)
* Add more details about specifying a CA pin

Closes #9946

The CA pin is the only Teleport configuration field where we have not
yet documented the possibility of specifying a value using a file path.
This change includes this information, as well as the (also
undocumented) fact that you can specify a list of CA pins. Also updates
the docs path that the CA pin reference links to.

* Respond to zmb3 feedback

* Respond to lsgunn-teleport feedback
2023-07-10 13:04:32 +00:00
STeve (Xin) Huang a86283e261
Connect Kube gateway part 1: lib/teleterm/gateway (#28312)
* Connect Kube gateway part 1: lib/teleterm/gateway

* fix lint

* move IsDB/IsKube to resource URI

* address review comments

* config dir

* use ProfileDir instead of ConfigDir

* remove NewKubeForwardProxyWithListener
2023-07-10 12:58:23 +00:00
Noah Stride f2b52bf2c0
Add IDToken attributes to GCP join audit event (#28673)
* Add GCP joining support to tbot

* Comment SPAG

* Fix imports

* Actually fix imports

* Add IDToken attributes to GCP join audit event
2023-07-10 09:09:23 +00:00
Marco André Dinis 554c057b4d
DeployService: use correct version when auto-upgrades are enabled (#28810) 2023-07-10 06:45:05 +00:00
Forrest 628d77f6bb
rework instance hbs to be more scalable and to track upgraders (#27895) 2023-07-08 02:15:56 +00:00
Jakub Nyckowski 141e806e69
Report failures if Windows build fails (#28349) 2023-07-07 23:58:50 +00:00
Bernard Kim eed2fa44dc
docs: bump cloud to 13.2.0 (#28776) 2023-07-07 21:22:45 +00:00
Rafał Cieślak 08275910af
teleport-connect.mdx: Fix typo (you with -> you wish) (#28819) 2023-07-07 18:17:07 +00:00
Isaiah Becker-Mayer e830901e78
Makes custom CORS logic a middleware (#28755)
* Makes custom cors logic middleware

* Cors -> CORS
2023-07-07 16:45:38 +00:00
Alex Fornuto c565681607
typo correction (#28767) 2023-07-07 16:37:17 +00:00
Justinas Stankevičius f71c2484e0
Assist: mark individual nodes as finished (#28477)
* Mark nodes as done when command finishes in Assist

* Split Close/CloseWithPayload

* Expect a close message before the summary in test

* Remediate confusing type usage in test

`Envelope` is the outer layer used (in protobuf format)
for execution / terminal sessions.

Meanwhile `outEnvelope` is the inner layer
used (in JSON) spefically with assist (execution),
when outer envelope is of "raw" type

Using `Envelope` where decoding `outEnvelope` in tests
previously worked "by accident" due to matching field names

* Assert that server ID is set in the close message

* Refactor command execution logic and adjust WebSocket handling

This commit changes how command execution and WebSocket handling are performed in the code. Instead of manually managing session close signals and command execution notifications via WebSocket, we have wrapped it into more easily manageable form.

Changed parts: assist and websocket libraries, test and several components of 'teleport'.

Why:
This allows cleaner command management and error handling, leading to more reliable and maintainable application. Also made code more readable and easy to understand. Made WebSocket more precise with its handling to prevent cases where stale or incorrect data might interrupt the session.

Details:
Instead of sending a close signal after all commands have been executed, we now send individual session end updates for each command. Sessions no longer remain active unnecessarily.

Message handling in command execution has been refactored for better error propagation.

All these changes were also adjusted and reflected in the associated test cases.
Also, names and types of various data structures are edited to reflect their actual usage.

* Change ServerID to NodeID to improve code consistency

This commit replaces occurrences of `ServerID` with `NodeID` across several files.
`ServerID` was misleading and causing confusion as it was serving as an identifier for nodes, so to improve comprehension and consistency in the codebase, all instances of `ServerID` have been replaced with `NodeID`. Tests have also been updated to reflect this change.

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-07-07 16:24:55 +00:00
Steven Martin b255e2fb40
docs: openssh instructions updates (#28824) 2023-07-07 16:02:14 +00:00
Paul Gottschling 6ae0e8676e
Add redirects introduced by docs reorganization (#28731)
PR #27703 rearranged some docs pages without adding redirects. This
change corrects the missing redirects.
2023-07-07 14:51:47 +00:00
Paul Schisa 0062b2feb5
Update keep_alive comments auth-service.yaml (#28813)
based on conversations internally, adding more clarity around keep alive to indicate it affects reverse tunnel connections as well

4e3c3bb728/lib/reversetunnel/agentpool.go (L744)
2023-07-07 14:50:23 +00:00
Travis Rodgers 49dad3ac16
removed cloud warning (#28804) 2023-07-07 14:19:19 +00:00
Michael Wilson 2e4f325ac2
Access list backend service and marshal/unmarshal. (#28718)
* Access list backend service and marshal/unmarshal.

The access list backend service and marshaling/unmarshaling functions have
been implemented. This will allow for CRUD operations for access lists.

* Test audit marshal/unmarshal.

* Fix configuration typo.

* GCI.

* Add in access list marshaling test.

* Remove unused header parse.
2023-07-07 14:19:06 +00:00
Tiago Silva f8c75a043d
Fix tsh kube credentials lock when no-login is required (#28435)
This PR moves the creation of the `lock` file right before the login
call is attempted instead of creating it for any call.

This fixes a problem where we create the lock file even if no login is
required which limits the number of parallel kubectl invocations.
2023-07-07 11:34:12 +00:00
Anton Miniailo 0f60bf2846
[Docs] Add missing 'resources' config field to application service docs (#28753)
* Add missing 'resources' config field to application service docs

* Update docs/pages/includes/config-reference/app-service.yaml

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

* Improve dynamic apps description

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

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-07-07 08:07:07 +00:00
Marco André Dinis 7ccb7ef891
DeployService: auto upsert IAM Join Token (#28537)
* DeployService: auto upsert IAM Join Token

When using the DeployService, the deployed services (database service
only for now) will join the Teleport Cluster using the IAM Join Method.

In order to do so, we require an IAM Token that allows the AWS Account
ID and ARN of the assumed-role.
Instead of asking the user to create it, we do it for them.

This PR creates or updates the IAM Join Token.

* AccountID is optional when calling DeployService

* dry code when upserting the token
2023-07-06 19:31:44 +00:00
fheinecke 90e93e3dfe
Increased the gh-trigger-workflow polling period (#28779) 2023-07-06 19:31:24 +00:00
lsgunn-teleport 8928ddc86d
Minor wording change (#28721) 2023-07-06 18:48:53 +00:00