Commit graph

15124 commits

Author SHA1 Message Date
fheinecke d858a14cde
Removed deb/RPM publishing to legacy deb/rpm repos (#32172) 2023-09-20 19:29:08 +00:00
rosstimothy 7dcce25065
Validate SAMLIdPServiceProviders ACS endpoints (#32218)
Enforces that all ACS endpoints are HTTPS to prevent any
XSS attacks. To allow admins to interogate any existing resources
which may be impacted validation only happens on create and update
but not get. All usages of SAMLIdPServiceProviders within teleport
follow all internal retrievals with a call to
services.ValidateAssertionConsumerServicesEndpoint in order to
subvert invalid ACS endpoints.
2023-09-20 19:15:53 +00:00
Tiago Silva 73967adc6b
Add proxy_protocol setting to teleport-cluster chart (#32184)
This PR adds a configuration option that allows users to configure the
`proxy_protocol` setting to improve security.

Docs: https://goteleport.com/docs/ver/14.x/management/security/proxy-protocol/

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2023-09-20 19:09:28 +00:00
Krzysztof Skrzętnicki d4fca31ace
Verify expected token properties in WithProvisionTokenAuth. (#32213)
The token must have join method "token" and be non-expired.
2023-09-20 19:06:28 +00:00
Alex McGrath d8e05dd3ae
Manually create the users HOME rather than letting useradd do it (#32207)
Test that CreateHomeDirectory does not follow symlinks

resolve comments

add our own recursive directory copy

Resolve comments

Fix for "Manually create the users HOME rather than letting useradd do it"
2023-09-20 19:06:10 +00:00
Edoardo Spadolini 336e185581
ci: clarify failure on go mod tidy (#32205)
This PR updates the name of the step that checks that there's no changes to `go.mod` and `go.sum` after a `go mod tidy` to make it more obvious what the issue is.
2023-09-20 18:54:18 +00:00
Lisa Kim 9d2c2cbc1f
Add access list to default allow editor preset role (#32229) 2023-09-20 18:45:12 +00:00
Hugo Shaka 89916fcd3a
convert go's zero time into protobuf zero's time (#32135)
* convert go's zero time into protobuf zero's time

* Update api/types/header/convert/v1/header.go

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

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-09-20 18:38:26 +00:00
Paul Gottschling 9d8356e33c
Fix variable in Azure AD docs (#32049)
Fixes #25090

An earlier change to this page clarified URL values to assign when
setting up an Azure AD connector, but left a malformed `Var` component.
This change fixes the `Var` component.
2023-09-20 18:32:07 +00:00
Paul Gottschling c254d8f12d
Add systemd instructions to the Jamf Pro guide (#32047)
Fixes #31353

Include instructions to write the join token for the Jamf service to a
file, name the file within the Teleport configuration, then start the
`teleport` service via systemd.
2023-09-20 18:31:46 +00:00
Edoardo Spadolini 0c527aa37c
Omit WithError for "proxy already claimed" (#32057)
* Omit WithError for "proxy already claimed"

* address comments

* fix test

* fix inaccurate comment
2023-09-20 18:23:59 +00:00
Steven Martin 912198442f
docs: include postgresql in ha docs (#32194) 2023-09-20 18:19:15 +00:00
Edoardo Spadolini 97a8526168
pgbk: specify the schema name in wal2json's add-tables (#32197)
* Ignore schema and table from wal2json

* Qualify add-tables with the correct schema
2023-09-20 18:17:54 +00:00
rosstimothy 73a3e68c66
Stop implicitly loading global tsh config on Windows (#32221)
To avoid security issues caused by a possible lack of file system
permissions on Windows tsh only loads global config if the path
to the file is explicitly provided in the TELEPORT_GLOBAL_TSH_CONFIG
environment variable.
2023-09-20 18:16:56 +00:00
Walt 4a657b5cdf
Bump helm/kind-action from 1.5.0 to 1.8.0 (#31993)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.5.0 to 1.8.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.5.0...v1.8.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...
2023-09-20 18:14:06 +00:00
Paul Gottschling 732b9bbf58
Remove unused images from the docs (#32164)
Used the following command to find unused images. This lists all image
files in the docs and, for each image, searches all docs pages for
references to the image file (which include the `/img` path segment but
usually not `docs`). If there are no matches, it prints the image file
name:

```bash
$ find docs/img -name "*.png" | sed -E "s|docs/(.*)|\1|" | xargs -I{} bash -c '
grep -qR "{}" docs/pages; if [ $? -ne 0 ]; then echo {}; fi'
```

Also fixes a minor linter error that did not come up in earlier commits.
2023-09-20 18:12:08 +00:00
Tobiasz Heller eb00fdd2b0
docs: add warning about athena usage with exporter (#32121) 2023-09-20 18:09:09 +00:00
Roman Tkachenko e12792baa6
Bump node to 18.18.0 (#32227) 2023-09-20 17:56:12 +00:00
rosstimothy 22f28130ab
Prevent zombie sessions being left behind for web sessions (#32141)
The ssh session was not being closed for web sessions which resulted
in zombie sessions being left around until the ssh service was
restarted. TestTerminal was updated to assert that the session
tracker eventually transitions to the terminated state when the
client terminates the web socket.

Fixes #32120
2023-09-20 13:45:55 +00:00
Michael Wilson a6c4e3bb2f
Leave access intact if access list has not been reviewed by review date. (#31950)
Access lists will now leave access intact for members even if the access
list hasn't been reviewed by the next audit date. Revoking access on a
missed audit review may be too disruptive. This may be restored at a
later date by adding in options to access lists to control behavior.
2023-09-20 12:52:37 +00:00
Krzysztof Skrzętnicki 55f93c2be7
Execute time-bound graceful shutdowns on SIGINT/SIGTERM. (#31869)
* Execute time-bound graceful shutdowns on SIGINT/SIGTERM.

We introduce a delay of up to 3 seconds into the "immediate shutdown"
path. If the graceful shutdown doesn't complete within this time, the process
will exit anyway.

* Run `process.Shutdown()` in separate goroutine, to account for possible bugs.

* Support TELEPORT_UNSTABLE_SHUTDOWN_TIMEOUT env var.

* Extract `getShutdownTimeout`, add tests.

* Update lib/service/signals.go

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

* Remove untrappable SIGKILL to reduce confusion.

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-09-20 09:21:46 +00:00
Lisa Kim e48d0b99d5
Update e (#32176) 2023-09-20 02:38:31 +00:00
Edoardo Spadolini a79d70459f
pgbk: conditional operations and revisions (#32043)
* pgbk: conditional operations and revisions

* Fix tests

* Fix ConditionalUpdate error return
2023-09-20 00:19:49 +00:00
Anton Miniailo aeaefa11be
Add documentation for proxy_protocol setting. (#32134)
* Add documentation for `proxy_protocol` setting.

* Improve wording.

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

* Improve wording.

Co-authored-by: Roman Tkachenko <roman@goteleport.com>

* Improve wording.

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

* Improve wording.

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

* Imrove wording.

* Improve wording.

* Add example of a PROXY protocol header.

* Don't mention 'unspecified` mode as a possible value for `proxy_protocol` setting

* Add security section

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2023-09-19 23:09:16 +00:00
Przemko Robakowski 1e23f70e29
Add docs for non-AD desktop access for OSS users (#31915)
* Add docs for non-AD desktop access for OSS users

* Add docs for non-AD desktop access for OSS users

* Update docs/pages/desktop-access/getting-started.mdx

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

* Update docs/pages/desktop-access/getting-started.mdx

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

* Update docs/pages/desktop-access/getting-started.mdx

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

* Update getting-started.mdx

* Move docs to top

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-09-19 23:05:55 +00:00
Michael Wilson b87a2c9853
Remove Cf-Access-Token header. (#32139)
The Cf-Access-Token header seems to be a infrequently used header that can
easily increase the size of the header by `len(roles) + len(traits)`, which
can cause problems. Users are able to add this in on their own if they need
it using header rewriting, so we'll remove this.
2023-09-19 22:14:57 +00:00
Paul Gottschling 01e42c9dc1
Remove non-file path links from partials (#31708)
* Remove non-file path links from partials

Fixes #12618

Ensure that all partials use relative links to MDX files for more
accurate linting. Only two partials contain links to URL paths, and one
of these is not included anywhere in the docs.

This change removes the unused partial and changes the remaining link to
a file path.

* Fix linter error
2023-09-19 21:45:36 +00:00
Michelle Bergquist 2fdc3c2e3b
Leverage marketing params on Discover (#31648)
* marketing params to cluster state

* leverage marketing params on Discover
2023-09-19 19:16:38 +00:00
Zac Bergquist 00ed1c36af
Fix incorrcect use of apostrophe in discover UI (#32137) 2023-09-19 18:28:46 +00:00
Alan Parra c55f1b3703
chore: Bump OpenSSL to 3.0.11 (#32140)
Update to the latest patch.

* https://mta.openssl.org/pipermail/openssl-announce/2023-September/000276.html
2023-09-19 18:07:23 +00:00
Gavin Frazar ab245eff8f
support discovered name match in tbot outputs (#32108)
* databases
* kube clusters
2023-09-19 18:01:11 +00:00
Lisa Kim 15e9d0e251
Check for teleport launchd before installing through join script (#32074) 2023-09-19 16:02:18 +00:00
Andrew Burke b15ecb4f58
Fix discovering VMs in all regions (#32001) 2023-09-19 16:02:11 +00:00
Michael b894559df5
Unified Resources UI: Various Fixes (#32064)
* Remove old indicator from unified resources

* Use lowercase for unified name sort

* Include friendly name in app icon guess

* Add filters exist indicator

* Remove uppercase from filter buttons and add filter count

* Remove indicator import

* Resource custom sort by contained resource

* Add unified name compare test
2023-09-19 14:25:50 +00:00
Gabriel Corado e3afe46048
Respect MongoDB max message size (#31963)
* feat(mongodb): use max message size from MongoBD server

* chore(mongodb): use EqualFold

* refactor(mongodb): check if handshake response is valid
2023-09-19 13:06:43 +00:00
Zac Bergquist 68534b9020
Add --quiet option to helm lint target (#32069)
Without this, the helm lint prints hundreds of lines of messages
that just tell you that everything was good. This makes it harder
to spot real problems.
2023-09-19 13:00:17 +00:00
Rafał Cieślak 50ea798d1d
Add error to Attempt in useAsync (#31966)
* Add error to Attempt in useAsync

* Ensure attempt.error refers to the same object as expectedError

* Refactor error handling to use instanceof with attempt.error

* makeErrorAttempt: Require an Error object

In real code, the function can throw any object. But since makeErrorAttempt
is a helper function, we can make it require an Error object.
2023-09-19 08:50:26 +00:00
Mike Jensen 1f9cf6b9c3
oss-fuzz-build.sh: Remove FuzzParseWebLinks (#31998)
This test has had two failures (timeouts) on oss-fuzz that are false positives (5894581923479552 & 5112269123747840).  Both are very large and when run in go fuzz are not reproducible (local execution ~2 seconds)

Disabling due to the false positives
2023-09-18 22:10:58 +00:00
rosstimothy 7565f2083b
Stablize TestModeratedSessionWithMFA (#31668) 2023-09-18 22:00:37 +00:00
fheinecke 6f462dec48
Updated OS package repo docs (#31541)
* Updated OS package repo docs

* Fixed linter issues

* Added table for repo channel info on ent installations

* Fixed import path
2023-09-18 21:43:01 +00:00
Anton Miniailo 0111c24b1e
Add PROXY header getter to the grpc proxy client (#31992) 2023-09-18 21:36:06 +00:00
Gavin Frazar 8f24c4ff69
remove prefix matching in tctl (#31916)
* remove prefix matching in tctl

* replace prefix matching with exact discovered name match as a fallback
  when no resource full name matches the name given by a user

* refactor test helpers

* avoid decoding yaml/json into already initialized var
2023-09-18 21:21:20 +00:00
Walt 4d71008b52
Bump configure-aws-credentials to 3.0.1 (#31045)
This suppresses some noisy warnings, and provides useful debug
information (such as the assumedRoleId) baked into the command.

AWS Account IDs are no longer masked by default.
2023-09-18 21:09:54 +00:00
Hugo Shaka fee55c7256
convert protobuf's zero time into go's zero time (#32081)
* convert protobuf's zero time into go's zero time

* Update api/types/header/convert/v1/header.go

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

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-09-18 20:32:13 +00:00
Zac Bergquist a799467045
Append a portion of the GUID when naming discovered desktops (#32030)
Some users have encountered cases where they connect multiple
distinct AD domains to Teleport, but the name of the domain is
the same and the name of some of the hosts within the domain are
also the same.

As a result, Teleport incorrectly deduplicates these desktops in
the UI (we can't distinguish them from identical desktops reported
by multiple agents).

Fix this by appending a portion of the objectGUID to the desktop name.
Even if mutiple domains have identical names and hostnames, the GUID
will differ and both will be shown in the UI.
2023-09-18 20:22:48 +00:00
lsgunn-teleport fd6a9d105a
Revise desktop access-Active Directory script-driven (#31389)
* Revise desktop access-Active Directory automatic

* Update title, text, and image

* tested steps

* Change the existing server description

* Fix typos

* Make the linter happy

* Updated from Paul's suggestions

* Make the linter happy
2023-09-18 20:01:54 +00:00
dependabot[bot] afc282899b
Bump the go group in /api with 5 updates (#32015)
Bumps the go group in /api with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.43.0` | `0.44.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.43.0` | `0.44.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.17.0` | `1.18.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.17.0` | `1.18.0` |
| [google.golang.org/grpc](https://github.com/grpc/grpc-go) | `1.58.0` | `1.58.1` |


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

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

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

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

Updates `google.golang.org/grpc` from 1.58.0 to 1.58.1
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.58.1)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 19:36:12 +00:00
lsgunn-teleport b3258cafc5
docs: rewrite trusted clusters overview, how-to, and related topics (#31046)
* trusted cluster revision WIP

* Complete rewrite of trusted clusters under management/admin section

* Replace images, miscellaneous fixes

* Remove single root cluster statement

* Move the jq command examples to a separate topic

* Move lookup commands to a separate file

* Fix some spelling issues

* Some fixes and clarification

* Add leaf cluster Auth Server > Proxy service on th eroot cluster

* Add service interaction diagram

* Updates from review

* Update image

* Add an example

* Add direct and remove security vulnerability clause
2023-09-18 19:23:15 +00:00
Tiago Silva f476eddbb0
Fix duplicate entry for X-Forwarded-For header (#32039)
* Fix duplicate entry for `X-Forwarded-For` header

PR #27761 replaced `oxy.Forwarder` with `httputil.ReverseProxy`.
The new forwarder based on `httputil.ReverseProxy` is appending the
`X-Forwarder-For` header values instead of replacing them.
This PR fixes that behavior and forces the XFF header to be a single
value.

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

* Update lib/httplib/reverseproxy/rewriter_test.go

Co-authored-by: Reed Loden <reed@goteleport.com>

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Reed Loden <reed@goteleport.com>
2023-09-18 19:21:41 +00:00
lsgunn-teleport fbbe702384
docs: Update the desktop access introduction (#31599)
* Update the desktop introduction

* Updates from review, keep old file names and locations for now

* Replace mermaid diagram

* Update diagram

* Remove reference to Desktop Access
2023-09-18 19:19:10 +00:00