Commit graph

7740 commits

Author SHA1 Message Date
Jim Bishopp 06fef2abf1
SQL Backend (#11048)
Add a new backend supporting PostgreSQL and CockroachDB. 

Implements #10253 without cloud connectivity.
2022-03-29 00:18:09 +00:00
Joel 8b00efedaa
Add Moderated Sessions licensing (#11388) 2022-03-28 18:38:56 +00:00
Alexey Ivanov eced3304d5 Fix relative signup path 2022-03-28 11:14:29 -07:00
Alan Parra 70a0ad132e
Consistently prompt for OTPs as password (#11346)
Introduce the prompt.Password function and use it consistently whenever we read
a password, OTP or PIN.

The PR makes it easy to support PINs during MFA authentication, so now we do so.
It also adds the capability to mock prompt.Stdin() for tests, adding a uniform
way to fake user input in tests without having to swap functions.

Complements #10953 and #9160.

* Prompt for OTPs as passwords (take 1), read PINs on MFA authentication
* Add the prompt.Password method
* Add Stdin mocking capabilities to the prompt package
* Delegate password reads to prompt.Stdin().ReadPassword()
* Remove stdinHijack from PromptMFAChallenge
* Change api_login_test.go to FakeReader
* Change tsh_test.go to FakeReader
* Retire client.ReadPassword in favor of prompt.Password
2022-03-28 17:16:00 +00:00
Roman Tkachenko 062c92b81e
[auto] Update AMI IDs for 9.0.2 (#11474) 2022-03-28 15:37:02 +00:00
Krzysztof Skrzętnicki d5d206ea16
Assign EmitAuditEvent to err for subsequent check. (#11501) 2022-03-28 15:00:52 +00:00
Steven Martin 42381f1a8c
Improve error message if data dir and config unavailable due to permissions (#10044)
* Provider error info on data dir rights

* Added similar message for appropiate access when trying to use a Teleport configuration file (/etc/teleport.yaml) and it fails to load due to permission error.
2022-03-28 14:20:19 +00:00
Alan Parra f4afd00fb0
Respect context cancellation during FIDO2 callbacks (#11467)
A few FIDO2 scenarios are not respecting cancellation, causing problems in
certain `tsh` flows.

The PR fixes the issue above and sneaks a small fix in `tsh mfa add` as well.

#9160

* Add tests for various cancel conditions
* Respect context cancellation during select and PIN steps
* Do not ask for passwordless for non-webauthn devices
2022-03-28 13:15:05 +00:00
Alex McGrath cf0d569067
Update IsValidLabelKey to include ':' (#11384) 2022-03-28 12:25:17 +00:00
Marek Smoliński 9e1b887d94
Fix TLS Routing jumphost flow (#11282) 2022-03-28 12:31:05 +02:00
Steven Martin f00a4e2b66
Makes a common login error troubleshooting for sso docs (#11277)
* Incorporates a common login error troubleshooting include. Changed to show
the audit log screen in the web console initially.
2022-03-27 02:38:27 +00:00
Walt 90dde13ef0
Re-sign .drone.yml (#11478) 2022-03-26 01:26:59 +00:00
Russell Jones f6561cef2c Added Jenkins tile to documentation. 2022-03-25 17:01:31 -07:00
Russell Jones 38765cb4cf Add Teleport Cloud downloads page.
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2022-03-25 15:57:21 -07:00
Russell Jones 0c451e3efd Added Machine ID Jenkins Guide.
Co-authored-by: Zac Bergquist <zmb3@users.noreply.github.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2022-03-25 15:49:41 -07:00
Russell Jones 1503fded2b Update Machine ID icon to chip icon. 2022-03-25 15:29:01 -07:00
Zac Bergquist 82943f38dd AuditLog: Remove unused EventsC
This was used to test legacy audit log behavior, which has since
been removed.
2022-03-25 15:21:22 -06:00
Zac Bergquist 4e2e834b68 Remove unused DiskSessionLogger 2022-03-25 15:21:22 -06:00
Zac Bergquist bd7e7a84f0 Remove events.Forwarder and RecordSessions config param
The Forwarder type has been replaced with the new GRPC/streaming based
session recording and was only used in tests.

The RecordSessions param is never consulted, as it was replaced with
AuditWriter's RecordOutput param a couple of years ago.
2022-03-25 15:21:22 -06:00
Zac Bergquist 58b2aac411 Remove unused GRPC service 2022-03-25 15:21:22 -06:00
Zac Bergquist 3dc33ccc32 lib/events: remove more old code
This removes support for the pre-5.1.0 streaming directory, and
removes the unused Recorder type.
2022-03-25 15:21:22 -06:00
Zac Bergquist 62f687bef7 lib/events: remove legacy event types
These events are remnants of the old system before our events
were strongly-typed protos, and were unused in the code
(save for a few tests, which were updated)
2022-03-25 15:21:22 -06:00
fheinecke 1daf7d2302
[master forward-port] Fixed RPMs using artifacts compiled against a too-new version of glibc (#11026)
* Fixed RPMs using artifacts compiled against a too-new version of glibc

* Fixed RPM naming issue

* Apply suggestions from code review

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

Co-authored-by: Gus Luxton <gus@goteleport.com>
2022-03-25 20:55:31 +00:00
Gabriel Corado 58ca1bdbb0
fix(db): send initial heartbeat when there is no static dbs (#11160) 2022-03-25 20:17:54 +00:00
Russell Jones ce7b654615 Added admonition for Moderated Sessions. 2022-03-25 11:46:43 -07:00
Russell Jones 57d2b5f9b7 Reformatted Moderated Sessions Guide. 2022-03-25 11:46:43 -07:00
STeve (Xin) Huang fd12e934ee
RDS & Redshfit support for AWS China regions (part 1?) (#10560) 2022-03-25 17:40:51 +00:00
Alan Parra 5a11006f81
Add ReadPassword functionality to ContextReader (#11436)
This changes prompt.ContextReader in the following ways:

Reads only happen as a response to Read methods being called. This allows
ContextReader to coexist with other readers as long as no reads are abandoned.
ReadPassword is now available, the underlying implementation being
term.ReadPassword. An abandoned password read may be turned into a clean read.
This gives us some UX flexibility when callers abandon password reads (looking
at you, PromptMFAChallenge). Turning clean reads into password reads is not
supported. It's tricky and I have a few ideas, but it's not paramount at this
moment.

This solves the woes caused by abandoned OTP reads followed by PIN reads in
different packages, such as client.PromptMFAChallenge followed by tsh mfa add's
implementation.

#9160

* Move ContextReader to its own file
* Refactor ContextReader and implement ReadPassword
* Test ReadPassword
* Fix typos
* Remove prompt.StdinSync()

prompt.Stdin() has the same behavior for non-abandoned reads.

* Group /x/term methods under a type
2022-03-25 17:17:20 +00:00
Marek Smoliński 335adf1f4e
Don't respect HTTP_PROXY env in k8 forwarder (#11257) 2022-03-25 13:49:59 +01:00
Edoardo Spadolini 4384c354ff
Reexec with /proc/self/exe on Linux (#11283)
* Reexec with `/proc/self/exe` on Linux

* Add a check for qemu-user

* Add comment
2022-03-25 10:16:43 +00:00
Gus Luxton d2a656ef3f
helm: Allow probe timeouts to be configurable (buddy merge of #11176) (#11396)
* Allow for probe timeouts to be configurable

When setting up a new Teleport enterprise cluster on GCP,
I noticed that I needed to set the probe timeouts to get the
cluster to be healthy. This seems to be a known issue (https://github.com/kubernetes/kubernetes/issues/89898).

As a "stopgap", I've updated the helm chart to allow for end users
to be able to configure these timeouts.

* Update configuration option name and add documentation

* Update docs/pages/kubernetes-access/helm/reference.mdx

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

* Add tests for probeTimeoutSeconds

* Add probeTimeoutSeconds to required values

* Add probeTimeoutSeconds to teleport-kube-agent

* Add tests for probeTimeoutSeconds to teleport-kube-agent

* Add probeTimeoutSeconds to teleport-kube-agent reference

Co-authored-by: Hunter Madison <hunter.madison@instana.com>
Co-authored-by: Hunter Madison <hmadison@users.noreply.github.com>
2022-03-25 01:56:22 +00:00
Joel 90a0ff54b9
Limit stdout/stderr buffering in paused sessions (#11347) 2022-03-24 21:19:56 +00:00
Carson Anderson 4054c79c7e
Add metric to track number ssh connect attempts (#11240)
* add ssh connect attempts metric

* fix help message wording

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2022-03-24 20:34:00 +00:00
Forrest Marshall 50d767d304 improve cache test perf 2022-03-24 12:52:20 -07:00
Jeff Pihach 4c0df63633
Move the install.sh script into the oss version and import it on build instead of requiring a copy/paste to update. (#11352) 2022-03-24 19:22:48 +00:00
Gus Luxton e5cbd620ce
helm: Add support for separate Postgres/Mongo listeners in teleport-cluster chart (#10858)
* helm: Update NOTES.txt for AWS ACM

* Add support for separate Postgres/MongoDB listeners in teleport-cluster chart

* Special case backend listener protocol based on presence of ACM annotation

* Add tests for separate listeners

* Add tests for ACM annotation setting backend protocol

* Don't add AWS annotations when not in AWS mode

* Adds for separatePostgresListener/separateMongoListener

Also adds missing example for setitng proxyListenerMode

* Add continuous backups permission to DynamoDB policy

Fixes #11411
2022-03-24 18:41:08 +00:00
Brian Joerger 11c66d23be
[Docs] Add teleport.yaml docs for x11 forwarding (#10561) 2022-03-24 18:05:04 +00:00
Carson Anderson e577b41244
Change client dialOpts append order (#11322)
* change order of dialOpts to respect config provided opts
2022-03-24 15:17:25 +00:00
Joel 30647c455b
Set podname before message uses it (#11286) 2022-03-24 14:42:00 +00:00
Joel 445d40d8a8
Sort sessions by creation date (#11345) 2022-03-24 12:58:49 +00:00
Joel 0bd0b234e3
Update cargo deps (#11400) 2022-03-24 12:15:13 +00:00
Joel b99613507b
[RFD Update] Clarify RBAC rule application for session joining (#11223) 2022-03-24 07:10:54 +00:00
Steven Martin 6c1aa75f3b
Add in version string definition for role in Terraform reference (#10609)
* Add in version string definition for role
2022-03-24 01:48:11 +00:00
Steven Martin 07a7baf713
desktop clipboard docs mention (#11245)
* added clipboard mention
2022-03-24 01:26:46 +00:00
STeve (Xin) Huang a9267d8ca7
Fix broken header img and update badge in Readme (#11395) 2022-03-23 23:57:09 +00:00
Forrest 5bd9434ab1
improve ca cmp (#10351) 2022-03-23 23:08:38 +00:00
James Perry 536671b541
set err to scanner.Err (#11100)
Co-authored-by: Zac Bergquist <zmb3@users.noreply.github.com>
2022-03-23 22:31:38 +00:00
rosstimothy 487ba57a3c
Fix panic in getWebConfig (#11389)
Refactored the usage of the types.AuthPreference returned from
GetAuthPreference so that it is only accessed if there were no
errors.
2022-03-23 17:54:25 -04:00
Paul Gottschling 9ff423ab89
Remove potentially confusing EOF line from snippet (#11325)
Our API getting started guide includes a go snippet that ends with
"EOF," which is not a Go keyword. If the reader isn't familiar with
Go but wants to follow this guide, the Go compiler will return a syntax
error.

This change removes the line.
2022-03-23 21:19:09 +00:00
Paul Gottschling 77314ab4c2
Split the AWS Node Joining guide (#11081)
* Split the AWS Node Joining guide

This is to better address users with different scopes (see #10633).

Since the EC2 method is irrelevant for Cloud users, this approach makes
it straightforward to add an edition warning to the top of the EC2 join
method guide and scoped Tabs components to the IAM join method guide.

The alternative was to add nested Tabs components, with the top level
including Cloud vs. Self-Hosted TabItems and the inner level including
TabItems for the IAM and EC2 join methods. This looked pretty
unattractive and couldn't accommodate the final section on using the
EC2 method with multiple AWS accounts.

* Respond to PR feedback

Co-authored-by: Nic Klaassen <nic@goteleport.com>

* Respond to PR feedback

Co-authored-by: Nic Klaassen <nic@goteleport.com>
2022-03-23 21:09:26 +00:00