Commit graph

9975 commits

Author SHA1 Message Date
Alex McGrath a3411053c4
Fixes for ec2 discovery installer script on legacy ubuntu and fixes for teleport discovery bootstrap (#18775)
* use apt-key add on old versions of ubuntu

* fix discovery bootstrap installer path

* resolve comments
2022-12-01 14:37:20 +00:00
Tiago Silva da987dfc6b
Remove legacy heartbeat from Kubernetes Service (#18876)
With the arrival of Teleport 12, we stop supporting v10.x.x clients, and we no longer require the `types.KindKubernetesService` legacy heartbeat.

This change removes the legacy heartbeat from Kubernetes Service but keeps the legacy Auth Server CRUD methods and heartbeat support to maintain compatibility with Teleport 11 Kubernetes Service - Teleport 11 still heartbeats the legacy type.

We postponed the related `DELETES` to Teleport 13.
2022-12-01 13:16:41 +00:00
Roman Tkachenko 710b7d18ef
Implicitly set go version in prepare-workspace (#18953)
- Determine Go version for cache key automatically instead of hardcoding.
- Do not build ghcr CI images (etcd and buildboxes) on PRs to avoid unintended breakages.
- Only build/push them on push events which mirrors our current Drone setup. We might add ability to trigger them manually via workflow_dispatch events later.
- Add release branches pattern for buildbox images trigger as well.
- Remove packages: read permission from test jobs since buildbox images are now public.

Signed-off-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2022-12-01 00:40:53 +00:00
Nic Klaassen 149bbdb684
bump github.com/hashicorp/golang-lru to v0.6.0 (#18930) 2022-11-30 23:17:41 +00:00
Zac Bergquist 99970d5bc3
docs: clean up per-session MFA page (#18889)
- Webauthn on Windows is now supported
- per-session MFA for Database Access is supported
- Mention that OTP can only be used with tsh, not the web UI

Closes #18739
2022-11-30 22:25:51 +00:00
Paul Gottschling 09cb12b637
Improve the Kubernetes Dynamic Registration guide (#18840)
* Improve the Kubernetes Dynamic Registration guide

Some review comments for an earlier PR that edited the Standalone
Kubernetes guide (#18608) also apply to this one:

- Use systemctl to start TAR-based Teleport installations
- Edit the `curl` command that fetches the kubeconfig script so it uses
  the Teleport release specified in the docs

* Respond to PR feedback
2022-11-30 22:11:36 +00:00
Paul Gottschling d9b4c19986
Add the --version flag to helm install (#18883)
Closes #18304

- This applies to installing `teleport-cluster`, `teleport-kube-agent`,
  and plugins, using the appropriate version variable for each.
- Some pages use the `--teleportVersionOverride` values setting instead
  of `--version`. I've replaced this with `--version` for consistency.

Used this `awk` script to find `helm install` instructions that were
missing the `--version` flag:

```awk
find docs/pages -name "*.mdx" -exec awk '
BEGIN{v=0;i=0}
/helm install teleport-/{i++}
/--version \(=/{v++}
END{if(i>0 && i!=v) print FILENAME}' {} \;
```
2022-11-30 22:02:00 +00:00
Paul Gottschling 419f687ffa
Remove mentions of "setup" as a verb (#18842)
Closes #9683

To reduce confusion, we should use "set up" as a verb, rather than
"setup", and treat "setup" only as a noun.

Note that one use of the term "setup" as a verb is in the Jira Server
guide, which #17546 intended to remove, but neglected to. This change
removes that instance of "setup" along with the rest of the surrounding
guide.
2022-11-30 21:18:58 +00:00
Jakub Nyckowski 8e89e3fd20
Remove TestPasswordTimingAttack (#18940) 2022-11-30 15:23:41 -05:00
Steven Martin debb6a8d67
spell fixes (#18935) 2022-11-30 19:21:24 +00:00
Nic Klaassen fc82612725
Dependency updates (#18933)
* Bump github.com/golang-jwt/jwt/v4 from 4.4.2 to 4.4.3

Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.4.2...v4.4.3)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump github.com/aws/aws-sdk-go from 1.44.146 to 1.44.149

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.146 to 1.44.149.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.146...v1.44.149)

---
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>

* Bump github.com/fsouza/fake-gcs-server from 1.40.2 to 1.42.2

Bumps [github.com/fsouza/fake-gcs-server](https://github.com/fsouza/fake-gcs-server) from 1.40.2 to 1.42.2.
- [Release notes](https://github.com/fsouza/fake-gcs-server/releases)
- [Commits](https://github.com/fsouza/fake-gcs-server/compare/v1.40.2...v1.42.2)

---
updated-dependencies:
- dependency-name: github.com/fsouza/fake-gcs-server
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump github.com/gocql/gocql from 1.2.1 to 1.3.0

Bumps [github.com/gocql/gocql](https://github.com/gocql/gocql) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/gocql/gocql/releases)
- [Changelog](https://github.com/gocql/gocql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gocql/gocql/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/gocql/gocql
  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 from 1.72.1 to 1.74.0

Bumps [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) from 1.72.1 to 1.74.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.72.1...service/ec2/v1.74.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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-30 14:07:02 -05:00
Alex Fornuto 93c417f32a
[Docs] Update EC2 Discovery guide for bootstrapping. (#18308)
* markdown linting and spacing

* update ec2 discovery for bootstrapping

* Apply suggestions from code review

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

* re-add invite token step

* remove sid

* document keys to adjust in example config

* Apply suggestions from code review

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

* Update docs/pages/server-access/guides/ec2-discovery.mdx

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

* add reference to docs on IAM tokens

* Apply suggestions from code review

Co-authored-by: Alex McGrath <alex.mcgrath@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>

* additional copy edits

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
Co-authored-by: Alex McGrath <alex.mcgrath@goteleport.com>
2022-11-30 17:13:37 +00:00
Rafał Cieślak 726330f5b2
Remove DEBUG env var from Connect macOS dronegen (#18899)
It was added in effort to debug flaky Connect builds (#15836).

However, we discovered that the v11.1.0 macOS version of Connect stopped
working. This was likely due to upgrade of electron-builder which recently
updated its process of building native deps
(electron-userland/electron-builder#7196).

In the Node.js ecosystem, the DEBUG env var is typically used to control
which packages emit debug messages [1]. However, after the update of
electron-builder, the env var also changed the behavior of one of the
packages responsible for building the apps.

This was confirmed by inspecting file tree between different app bundles
and running the build locally with DEBUG set to electron-*.

[1] https://www.npmjs.com/package/debug
2022-11-30 18:02:53 +01:00
Hugo Shaka 5822656fe8
operator: Handle conflicts properly during tests (#18909)
This commit fixes a test flakiness that happened [here](https://github.com/gravitational/teleport/actions/runs/3578512131/jobs/6018743116#step:5:1375).

This was caused by concurrent updates of the same resource by the operator and the test suite. The operator handled conflicts gracefully, the test suite did not. 

This PR adds a retry-on-conflict mechanism on the various resource updates made by the test suite.
2022-11-30 16:04:00 +00:00
Zac Bergquist 166dc5a1be
Clean up defaults (#18860)
- Make vars const where possible
- Move constants that are only used by the audit log into lib/events
- Remove unused vars
2022-11-30 15:50:29 +00:00
Paul Schisa 1b225d1268
Update permit_user_env comments in config ref (#18813)
* Update config.mdx

Update permit_user_env config reference comments to indicate that the ~/.tsh/environment file exists on the SSH server and not the client side.  This caused confusion with users attempting to pass variables to sessions via the client.

* Update docs/pages/reference/config.mdx

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

* Update config.mdx

* Update docs/pages/reference/config.mdx

Co-authored-by: Gus Luxton <gus@goteleport.com>

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Gus Luxton <gus@goteleport.com>
2022-11-30 10:16:43 -05:00
Krzysztof Skrzętnicki 2cd15f3e55
Properly check err from EmitAuditEvent. (#18898) 2022-11-30 14:34:47 +00:00
Łukasz Kozłowski ac4f8b5fb3
Fix FIPS builds (#18851) 2022-11-30 13:44:54 +01:00
Rafał Cieślak 5ca68904c8
Connect: Set TeleportClient.AuthConnector before logging in (#18811) 2022-11-30 10:12:48 +00:00
Steven Martin c8f8f23c59
Include ssh protocol in start, end audit events (#18818)
The SSH protocol was not recorded in the audit events for the start and end.  This prevents other clients from listing the type of protocol correctly.
2022-11-30 04:02:38 +00:00
Cam Hutchison 98ff86d7a5
auth: Allow TestServer to be created with TLS config (#18794)
Provide defaults for `TestTLSServerConfig` when passed to
`auth.NewTestServer()`, as some of those fields cannot be set from
outside `NewTestServer()`. The defaults are the same as when called
without a `TestTLSServerConfig`, which allows just some fields to be
set/overridden.

This is to allow `APIConfig.PluginRegistry` to be set.
2022-11-30 01:21:07 +00:00
Roman Tkachenko cda4be5273
Add Go version to GHA cache key and CI image workflow (#18877)
* Include Go version in the cache key to prevent cache reuse when upgrading Go.
* Push buildboxes to Github container registry to avoid public ECR rate limiting.

Signed-off-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2022-11-30 00:25:45 +00:00
Nic Klaassen a68a805e78
feat: add login rule protobuf type (#18879) 2022-11-29 22:55:03 +00:00
Sam Freiberg 0389b484b3
Securely delete OTP QR code (#18752) 2022-11-29 22:08:55 +00:00
dependabot[bot] a87a4a45af
Bump env_logger from 0.9.3 to 0.10.0 (#18837)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.3...v0.10.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2022-11-29 20:50:02 +00:00
Michael b578dbca0f
[Connect] Update create access request logic to differentiate between role/resource requests in tshd (#18867) 2022-11-29 19:34:17 +00:00
Alan Parra 77cd4e600a
Ignore Dependabot crypto updates on api/go.mod (#18866)
Add the crypto ignore to `/api` too.
2022-11-29 19:05:36 +00:00
Zac Bergquist dca43edffc
fuzz: fix broken OSS-Fuzz build (#18814)
Signed-off-by: AdamKorcz <adam@adalogics.com>
Signed-off-by: Zac Bergquist <zac.bergquist@goteleport.com>
2022-11-29 18:42:26 +00:00
Zac Bergquist c903cfa1d2
Cache static desktop labels (#18807)
This resolves a long-standing TODO, and ensures that we don't run
the same set of regular expression matches every heartbeat loop.
2022-11-29 18:18:59 +00:00
Gavin Frazar c058f7ddb7
add dynamodb database access protos (#18737)
* Add proto for dynamodb db-access requests

* Make grpc for proto update

* Update comment
2022-11-29 17:51:16 +00:00
Zac Bergquist 6315d6aa4d
Address some outstanding TODOs (#18863)
* Remove desktop TODO

This was addressed in 896dbbbc47, we just forgot to remove
the note.

* Address documentation TODO
2022-11-29 17:17:05 +00:00
Vitor Enes 578afd9601
Include upload ID & session ID in failed upload warning logs (#18788)
Having the session ID in these logs should allow users to track down to
which users host the session belongs to.
2022-11-29 16:56:35 +00:00
Roman Tkachenko 1126df6136
[auto] Update AMI IDs for 11.1.0 (#18865) 2022-11-29 16:33:57 +00:00
Paul Gottschling 2dc1a238bc
Fix duplicate docs page titles (#18706)
This helps our SEO a bit.
2022-11-29 15:20:14 +00:00
Hugo Shaka 2bb4e59957
RFD 0094: Kubernetes node joining (#17905) 2022-11-29 14:08:39 +00:00
Alan Parra 118c91f4c2
Bump Go dependencies (#18819)
Manually bump Go dependency versions, directs only.

A few release logs for bumps that caught the eye:

* https://github.com/grpc/grpc-go/releases/tag/v1.51.0
* https://github.com/elastic/go-elasticsearch/blob/main/CHANGELOG.md
* https://github.com/go-redis/redis/blob/master/CHANGELOG.md
* https://github.com/moby/term/commits/master
2022-11-29 13:31:58 +00:00
Rafał Cieślak 59a96be624
Connect: Check db cert before using it for local proxy (#18740) 2022-11-29 10:11:57 +00:00
Steven Martin 09f2a2752a
Add info on license renewals (#18787)
* Add entry on license renewals
2022-11-29 06:31:59 +00:00
Nic Klaassen fbed5c9684
test: add GCP KMS unit tests (#18245) 2022-11-29 00:16:59 +00:00
Isaiah Becker-Mayer fbf4a0d6e3
Swaps Allow remote RDP connections and Open firewall to inbound RDP connections steps (#18522) 2022-11-28 21:58:29 +00:00
Jeff Pihach 7e64ae32ba
Generate new session on new ssh websocket connection. (#18523)
SSH Sessions from the UI are now managed under a single websocket connection instead of through multiple HTTP and WS calls.
2022-11-28 21:26:57 +00:00
Matheus e9f2ac7ade
Export GithubConverter type (#18751) 2022-11-28 21:07:57 +00:00
Vitor Enes c96809399a
Add server_hostname to session.* events (#18812)
With this commit, `session.*` events now also contain a `server_hostname` field.

Example:

```json
{
  "argv": null,
  "cgroup_id": 6926,
  "cluster_name": "vitor.teleport.sh",
  "code": "T4000I",
  "ei": 17,
  "event": "session.command",
  "login": "root",
  "namespace": "default",
  "path": "/usr/bin/date",
  "pid": 98679,
  "ppid": 98668,
  "program": "date",
  "return_code": 0,
  "server_hostname": "ip-172-31-10-157",
  "server_id": "8369d1d1-eea5-4074-8f64-0103f1e1fb00",
  "sid": "a40353c4-93dc-4d6b-a481-5546ecafb83e",
  "time": "2022-11-28T16:32:34.342Z",
  "uid": "cbd9e562-8932-405d-974c-11637f91d711",
  "user": "vitor@goteleport.com"
}
```
2022-11-28 20:28:41 +00:00
Vitor Enes 5a4e67027c
Improve tsh play JSON & YAML output (#18768)
Before this commit, events in the output of `tsh play --format=yaml` were
separated by a newline. This commit ensures that these events are now
separated by `---`, allowing the command output to play well with `yq`.

For consistency, the output of `tsh play --format=yaml <session-id>`
now mirrors what we get e.g. with `tctl nodes ls --format=yaml`.
The same applies to `tsh play --format json`.
2022-11-28 19:36:04 +00:00
Vitor Enes 0403a4eebb
Improve error message if dialing etcd nodes times out (#18789)
If all etcd nodes are unreachable, Teleport exits with the following
message:
```
ERROR: initialization failed
context deadline exceeded
```

With this commit we get instead:
```
ERROR: timed out dialing etcd endpoints: [https://127.0.0.1:2381 https://127.0.0.1:12381]
initialization failed
context deadline exceeded
```

Note that if only some of the etcd nodes are unreachable, the etcd
client already provides a useful error message:
```
ERROR: initialization failed
failed to dial endpoint https://127.0.0.1:12381 with maintenance client: context deadline exceeded
```
2022-11-28 18:40:24 +00:00
Vitor Enes 3031147920
Add tctl windows_desktops as the default and keep tctl desktops as an alias (#18769)
Before this commit, users would `tctl get windows_desktop/<name>` and
`tctl desktops ls`. For consistency, `tctl windows_desktops ls` is now
the default but `tctl desktops ls` is kept as an alias for backwards
compatibility.
2022-11-28 17:57:14 +00:00
Andrew LeFevre e58078054e
Add info to docs about working with github enterprise server (#18712)
* add info to docs about working with github enterprise server

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

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

* Review Edits for #18712 (#18755)

* add scopes for edited file to config.json

* replace ScopedBlock with Tabs for config example

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

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
2022-11-28 16:25:37 +00:00
Michael Wilson f123dd125f
Ensure app session is in backend in app access integration tests. (#18744)
There is an occasional race condition where the app session does not appear to
be reflected in the backend after it's created by the time the test logic in
the app access integration tests is run. This will (hopefully) address this
issue.
2022-11-28 16:02:48 +00:00
Jakub Nyckowski 3860d705fd
Do not run parker process for all SSH sessions (#18604)
Parker process is only needed when a user is auto-provision by Teleport. Currently, this process always starts, which causes some problems when SELinux is enabled and may also cause issues with a similar mechanism as AppArmor.
This PR runs only the parker process only when it's really needed not for every SSH session reducing the problem mentioned above.
2022-11-28 15:31:22 +00:00
Gabriel Corado fa15a7c4c4
Azure SQL Server auto discovery (#17745) 2022-11-28 15:02:49 +00:00