Commit graph

6243 commits

Author SHA1 Message Date
Roman Tkachenko db6fb57dae
Add app access headers rewrite (#6601) 2021-05-06 11:24:49 -07:00
Andrew Lytvynov cc4d34b36b
RFD 12: clarify that the versioning scheme is not strict (#6518)
These policies are subject to customer needs, they can be bent based on
the situation. Don't confuse them with strict rules.
2021-05-06 11:04:16 -07:00
Alexey Ivanov 86ec9bec20 Fix error in docs (#6070) 2021-05-06 10:27:40 -07:00
Joel Wejdenstal 1316e6728a
Implement RFD 24 for alternative DynamoDB event indexing (#6583) 2021-05-06 19:18:28 +02:00
Trent Clarke 2f51af0e04
Delete user k8s, etc. certificates on re-issue (#6492)
Delete user k8s, etc. certificates on re-issue

Prior to this change, user certificates for services like kubernetes were
preserved across a certificate re-issue. This led to issues where elevated
privileges granted by an access request were not applied to the service
certificates as they were not updated during the reissue process.

This patch changes the certificate re-issue process such that:
 * certificates for services (like Kuberenetes) are not preserved
   over a certificate re-issue. It is expected that they will be recreated
   on the first access to the service in question, and
 * the local keystore files for these certificates services are explicitly
   deleted so that the now-invalid cached certificates are not returned
   on keystore queries.

See-Also: #5047
2021-05-05 19:20:12 -07:00
Brian Joerger b62323e74f
Clarify node connection debug logs. (#6722) 2021-05-05 17:31:36 -07:00
Lisa Kim 9c06ddc8ad
Check cloud feature before setting billing access for web (#6537)
* Init web handler with auth server feature flags on proxy init
* Retrieve auth server features by calling Ping when connecting 
  to auth svc which contains the server feature flags in the response
2021-05-05 14:58:43 -07:00
Lisa Kim 991059869e
Create GET db and kube list web handlers (#6672) 2021-05-05 12:52:46 -07:00
Russell Jones 697f76ceaa Updated CHANGELOG.md. 2021-05-05 11:31:04 -07:00
Andrej Tokarčík dca56dcb16
[auto] Update webassets in master (#6723)
ab9934a Use dedicated API for app FQDN resolving https://github.com/gravitational/webapps/commit/ab9934a

[source: -w master] [target: -t master]
2021-05-05 19:57:54 +02:00
Gus Luxton 78e71020ab
ami: Update InfluxDB version to 1.8.5 (#6741) 2021-05-05 10:15:09 -07:00
Russell Jones 64696ca632 Updated TLS handshake timeout.
Updated TLS handshake timeout. During some operations, Teleport can
flood the network with traffic which causes the TLS handshake to occur
slower than 1 second.

One example is during SSO login. The initial connection is an
unauthenticated connection, and upon successful SSO login a "types.User"
is created and replicated to all nodes. For large clusters this can mean
10k+ "types.User" objects getting replicated at the same time the user
attempts to re-establishing another connection to Auth this time with
valid identity credentials. This connection sometimes can take longer
than the original 1 second timeout.
2021-05-04 16:41:07 -07:00
Nic Klaassen 2f6c3081dc Fix non-interactive ssh output in teleport log
This commit removes copying of stdout and stderr from non-interactive
ssh commands to stdout and stderr of the teleport server process. This
was introduced in e65eac59b0 and appears to have been put in for
debugging.
2021-05-04 13:57:50 -07:00
Lisa Kim fe55ef7201
Remove webassets.zip file before builds in Makefile (#6595) 2021-05-04 11:13:47 -07:00
Brian Joerger f533872a25
Upgrade api's trace dependency to 1.1.15 (#6341) 2021-05-03 16:27:51 -07:00
Andrew Lytvynov 0b1b6dc801
mfa: only reject last device deletion of correct type (#6656)
* mfa: only reject last device deletion of correct type

For example, when OTP is required, only reject the deletion of the last
*OTP* device. Don't reject deletion of a U2F device even when there's
only 1 OTP device left.

* Update grpcserver.go
2021-05-03 15:10:36 -07:00
Alexander Klizhentas 88de60a5be
Update README.md (#6712)
Add Cloud CTA
2021-05-03 14:37:36 -07:00
Andrew Lytvynov 889acd83b4 Delete unused RoleWeb
RoleWeb is not used by any service. Clean it up.
2021-05-03 21:24:08 +00:00
Ben Arent b1fd129b22
Fix missing quotes in CLI Adoption Survey (#6648)
* Fix survey curl

Co-authored-by: Gus Luxton <gus@gravitational.com>
2021-04-30 08:45:53 -07:00
inertial-frame 16d648d04e
docs: renamed (#6624) 2021-04-30 08:24:51 -07:00
inertial-frame 653c53b734
docs: correct tables (#6618)
Co-authored-by: Alexander Klizhentas <klizhentas@gmail.com>
2021-04-29 18:56:47 -07:00
Alexander Klizhentas 85653b8d35
Draft account lifecycle (#6473) 2021-04-29 18:47:57 -07:00
Roman Tkachenko d0cfc8a66b
Proxy line support for mysql (#6594) 2021-04-29 18:03:10 -07:00
Andrew Lytvynov 5dca072bb4
kube: handle large number of trusted clusters in mTLS handshake (#6519)
* kube: handle large number of trusted clusters in mTLS handshake

Same as https://github.com/gravitational/teleport/issues/3870 but for
k8s endpoints. There is a hard limit on how many CAs we can put into a
client CertPool, usually several hundred (depending on Subject length).

The solution here is to fall back to only using the current cluster's CA
for validation if the limit is reached. This is almost always the case
in root clusters. There, the client certificate will be signed by the
root cluster and validation will pass.

In the unlikely case that you have a leaf cluster which in turn has
hundreds of trusted leaf clusters itself, the validation will fail. The
client cert will still be signed by the root cluster (not the leaf).
However, that's better than a panic. And I'm not aware of any real
setups like that.

Also in this PR, add the wildcard `*.teleport.cluster.local` SAN to
proxy and k8s TLS certificates, which was missing before. This SAN is
used for clients to encode the cluster name and pass it in SNI. The
client (kubectl) is not updated to set this SNI yet, it would break
existing clusters without the SAN change.

* add SNI tests for k8s

Test that mTLS works with large numbers of CAs.
2021-04-29 15:30:15 -07:00
Andrew Lytvynov d45e26cec6
docs: add a version disclaimer to per-session MFA guide (#6626)
It's not obvious that nodes need to be updated, in addition to
auth/proxy.
2021-04-29 14:23:55 -07:00
Alexander Klizhentas 0d58858bc5
Switch to tiles (#6611) (#6660)
Switch to tiles from bullet lists.
Focus user attention on products, remove extra text.
List popular use-cases for developers and security teams.
2021-04-29 14:11:39 -07:00
Andrew Lytvynov 569dec6be5
docs: bump 6.2 release date to May 21st (#6652) 2021-04-29 13:59:34 -07:00
Andrew Lytvynov b8fbb2d1e9
mfa: cancel TOTP prompt if U2F was used (#6542)
Implement context-based cancellation in `/lib/utils/prompt`, for MFA
prompts.

This fixes the following scenario:
```sh
User has both OTP and U2F devices registered.
$ tsh mfa ls
Name  Type Added at                      Last used
----- ---- ----------------------------- -----------------------------
otp   TOTP Wed, 21 Apr 2021 19:41:44 UTC Wed, 21 Apr 2021 19:44:32 UTC
usb-a U2F  Wed, 21 Apr 2021 19:44:34 UTC Wed, 21 Apr 2021 19:44:34 UTC

Add a new OTP device, using existing U2F device:
$ tsh mfa add
Choose device type [TOTP, U2F]: totp
Enter device name: otp2
Tap any *registered* security key or enter a code from a *registered* OTP device: <tap> # <- First OTP prompt here
Open your TOTP app and create a new manual entry with these fields:
Name: awly@localhost:3080
Issuer: Teleport
Algorithm: SHA1
Number of digits: 6
Period: 30s
Secret: 3UD42X2NN7EEZ6LUPG6NFMNOLDY6AJTS

Once created, enter an OTP code generated by the app: 607738 # <- Second OTP prompt here
MFA device "otp2" added.
```

Before this PR, the first OTP prompt (for `*registered* device`) would
hang in the background. The OTP code from the newly-registered device is
prompted later, but any text written ends up going to the first prompt.

After this PR, the first prompt is canceled and the code from a new
device goes to the second prompt as intended.

Note: this is implemented using pure Go code (background goroutine
consuming `os.Stdin`) rather than syscalls (e.g. `poll` or `select`)
for portability.
2021-04-29 11:22:11 -07:00
Andrew Lytvynov 9c25440e8d
k8s: add merge-kubeconfigs.sh script (#5677)
This script merges multiple kubeconfigs created with `get-kubeconfig.sh`
(or from anywhere else) into a single `merged-kubeconfig`.
2021-04-29 11:05:20 -07:00
Roman Tkachenko 7f01f2d4b6
Propagate external traits to leaf clusters (#6540) 2021-04-29 09:39:43 -07:00
Ben Arent 778329c7d1
Teleport opt-in adoption survey (#5505) 2021-04-28 22:17:48 -07:00
Brian Joerger 9def18cb9f
gRPC conversions - Nodes (#6535) 2021-04-28 18:27:12 -07:00
Lisa Kim 6ad8e2cfb5
[auto] Update webassets in master (#6646)
94894e8 Update e-ref on billing chart ytick formatting fix (#290) https://github.com/gravitational/webapps/commit/94894e8

[source: -w master] [target: -t master]
2021-04-28 18:00:25 -07:00
jane quin 7c9fd8e50d
Add additional Prometheus Metrics (#6511) 2021-04-28 15:46:27 -07:00
inertial-frame ae40c264dc
docs: reword (#6629) 2021-04-28 13:13:15 -05:00
Andrew Lytvynov 3ff75e29fb
mfa: prevent the user from deleting the last MFA device (#6585)
* mfa: prevent the user from deleting the last MFA device

When the cluster requires MFA for all users (when `second_factor` is
`on`, `u2f` or `totp`, and not `off` or `optional`), users could lock
themselves out by deleting the last device. Prevent that.

Fixes https://github.com/gravitational/teleport/issues/5803

* Make last MFA device deletion check more strict

Separate by the type of the device and which type the cluster enforces.
2021-04-27 16:11:15 -07:00
Andrew Lytvynov 4b11dc4a8e
mfa: better OTP registration flow on CLI (#6567)
Several improvements:
- show a QR code in the system image viewer
- print an OTP URL in addition to individual fields (some apps accept
  that as input)
- use cluster name as `Issuer` instead of "Teleport"
2021-04-27 10:42:16 -07:00
Roman Tkachenko ca9cd641a0
Fix test requiring gcp credentials (#6608) 2021-04-27 09:40:48 -07:00
Andrej Tokarčík 72c93ae86b
Handle tctl get's input ref more strictly (#5818)
For some resource kinds, `tctl get` used to always return the list of
all resources of that kind, irrespective of whether a specific resource
name was given in the argument to `tctl get`.

For instance, `tctl get node/node-id` would have always listed all the
nodes (just like mere `tctl get node`).

Here, all `tctl get` handlers are adjusted to filter by name when a name
is provided as part of the input ref.
2021-04-27 15:59:46 +02:00
Andrej Tokarčík f2bd4e3437
RFD 16: Specify RBAC verbs needed for the tctl operations (#6463) 2021-04-27 15:43:34 +02:00
Steven Martin 6d85bb1045
Update descriptions for labels and diag-addr parameters for Teleport (#5762) 2021-04-26 17:31:35 -07:00
Justinas Stankevičius 10d1788859
Fix doc comment for Rule.HasVerb (#6598)
Co-authored-by: Alexander Klizhentas <klizhentas@gmail.com>
2021-04-26 15:56:49 -07:00
inertial-frame cf8d61fd7a
[v7.0] Merge style guide into docs (#6577)
* docs: port docs to 7

* docs: improved score

Co-authored-by: Alexander Klizhentas <klizhentas@gmail.com>
2021-04-26 15:11:48 -07:00
Andrej Tokarčík 8e5ff95014
Provide a dedicated API endpoint for app FQDN resolving (#6449)
Currently, an app's target FQDN can be obtained only using the endpoint
for creating new app sessions.  The OAuth-style back-and-forth redirects
between the app launcher and the app itself are therefore forced to
generate an unnecessary additional app session just to resolve the FQDN.

The new endpoint introduced here allows to resolve such FQDNs by
invoking a dedicated endpoint.
2021-04-26 13:31:56 -07:00
Roman Tkachenko a3d39e3810
Add redshift auth support to database access (#6479) 2021-04-26 11:53:10 -07:00
Andrej Tokarčík 1d17aea01d
Add tctl create cap for dynamically configuring cluster auth preference (#5635)
See rfd/0016-dynamic-configuration.md § Implementation.
2021-04-26 20:27:34 +02:00
Andrew Lytvynov 4cdbcb50c8 Create SECURITY.md
Mostly copied from https://gravitational.zendesk.com/hc/en-us/articles/115015950248-Security-Disclosure
2021-04-26 17:40:07 +00:00
Andrew Lytvynov 5265688fc8 Revert "Node session race (#6195)"
This reverts commit 4acf50902c.
2021-04-26 17:24:06 +00:00
Pierre Beaucamp c95de98c63
Improve error message for timeout errors (#6343)
This fixes #6074
2021-04-26 08:39:07 -07:00
jane quin 808bc3d272
forward-port 6.1.2 CHANGELOG (#6553) 2021-04-22 18:51:13 -07:00