Commit graph

6138 commits

Author SHA1 Message Date
Pierre Beaucamp 879f8c2b48
Enable DynamoDB autoscaling on global secondary indices (#6112)
Fixes #5632
2021-03-29 10:35:53 -07:00
a-palchikov 32ac67db06
darwin fips builds (#5866)
* Switch to go1.16. Use embed package to embed webassets instead of ad-hoc attaching to binary
* Fix pipeline duplicate step error
* Resolve duplicate pipeline step name error. Explicitly define platform for 'exec' pipelines. Remove the uid/gid environment from 'exec' pipelines as redundant.
* Set proper dependencies when building darwin package fips pipelines. Use enterprise build directory for tsh
* Address review comments
2021-03-29 19:20:01 +02:00
Andrew Lytvynov 7ca8d29028 kube: add kubernetes_labels to role JSON schema
The schema entry for `kubernetes_labels` was missing, causing them to be
stripped on `tctl create role.yaml`.
2021-03-29 16:26:33 +00:00
Andrew Lytvynov 6479fa8f05 mfa: send username instead of SSH login name in MFA cert request
Username is the teleport username (either from SSO or for local user).
SSH login name is one of the OS logins allowed for the user.

In a user cert request, Username means the former, not the latter.
2021-03-29 16:03:39 +00:00
xacrimon cb33b75941 fix nil slice bug 2021-03-29 17:01:43 +02:00
Andrej Tokarčík 50a4c24f84
RFD 16: Add a section on tctl rm resetting resources back to defaults (#5673) 2021-03-29 15:28:52 +02:00
Roman Tkachenko 7fb637e105
Update application access docs (#6055) (#6137) 2021-03-28 10:09:58 -07:00
a-palchikov 633185b1cf
Bump linux FIPS builds to use go1.16.2b7 release (#6143)
* Update Go runtime to 1.16.2 and bump the boringcrypto version correspondingly for linux FIPS builds

* Address review comments

* Don't fail if buildbox image is not present

* Update other go1.15.5 references not yet handled by dronegen

* Build from source on CentOS 6

Co-authored-by: Gus Luxton <gus@goteleport.com>
2021-03-26 21:26:06 -07:00
Lisa Kim 08228a90af
[auto] Update webassets in master (#6185)
f066249 mfa related fixes (#251) https://github.com/gravitational/webapps/commit/f066249

[source: -w master] [target: -t master]
2021-03-26 19:51:20 -07:00
Brian Joerger f15ceee373
Convert Token CRUD endpoints to gRPC. (#6105) 2021-03-26 19:23:20 -07:00
Brian Joerger c7d84c45d7
Convert Trusted Cluster CRUD endpoints to gRPC. (#6103) 2021-03-26 18:29:39 -07:00
Andrew Lytvynov 3a553bcc94
[auto] Update webassets in master (#6135)
4d6b434 terminal: check whether the browser supports U2F (#249) https://github.com/gravitational/webapps/commit/4d6b434

[source: -w master] [target: -t master]
2021-03-26 17:56:12 -07:00
a-palchikov d301da5a39
Embed webassets natively into teleport instead of attaching to the binary (#5935)
Switch to go1.16. Use embed package to embed webassets instead of ad-hoc attaching to binary
2021-03-26 17:37:52 -07:00
Brian Joerger b1bb78a9e0
gRPC conversions - GithubConnector (#6101) 2021-03-26 17:16:49 -07:00
Russell Jones f44523ad18
Test PR. (#6182)
* fix race in filelog

* Fixed data race in Audit Log.

Fixed data race in Audit Log where Close and EmitAuditEvent race during
tests. Use a RWMutex to protect the local log to prevent race.

Co-authored-by: Forrest Marshall <forrest@gravitational.com>
2021-03-26 17:00:53 -07:00
Brian Joerger 0076893155
gRPC conversions - SAMLConnector (#6100) 2021-03-26 16:39:27 -07:00
Brian Joerger 06d252ffca
gRPC conversions - OIDCConnector (#6067) 2021-03-26 15:52:16 -07:00
Forrest Marshall bc2203673d ignore dangling tunnel conns 2021-03-26 14:11:02 -07:00
Russell Jones cfe1cd0541
Added RFD for Cluster Routing. (#5566) 2021-03-26 12:43:44 -07:00
Brian Joerger 3d6ecb05cd
Remove duplicate sshutils package from merge failure. (#6165) 2021-03-25 19:33:24 -07:00
Brian Joerger 0540755624
Profile credentials dialer fix (#6122) 2021-03-25 17:55:49 -07:00
Brian Joerger c891bae327
Combine common crud proto messages into generic messages in types.proto. (#6058) 2021-03-25 14:25:37 -07:00
jane quin ceebd8fc7d
Allow file argument with tsh play (#5984)
* allow tsh play to take file as arg

* get file paths from writer

* remove comment

* PR feedback

* comments

* PR feedback

* update WriteForPlayback comment

* create temp dir

* remove comments
2021-03-25 13:03:42 -07:00
Lisa Kim 940c83c161
Make SSO login failure event emit more specific errors (#6108)
Purpose is to allow users with admin privilege that are able to view audit logs, 
to be able to debug SSO login failures from the UI as much as possible

* Return generic error message for sso console login failures to hide
  sensitive data from reaching client. Previously errors were returning as
  empty messages b/c of a trace bug.
* Remove emit event for createOIDCClient to allow outer caller to
  emit event and prevent double emits on error.
* Temporarily direct users to check teleports log on errors that come back 
  empty to tsh client.
2021-03-25 10:36:47 -07:00
Andrew Lytvynov 58fc852d82
mfa: per-session U2F challenge for web SSH (#6098)
Check whether MFA is required for the current session and send a
challenge over the websocket.

client.IssueUserCertsWithMFA had to be modified to inject proxy's
cached user certs and websocket-based U2F prompt.
2021-03-25 09:29:08 -07:00
Ben Arent 1b37182376
Add Kubernetes follow along video (#6134)
* Add follow along video

* Add https://github.com/gravitational/teleport/pull/6044 fixes
2021-03-24 21:21:21 -07:00
Brian Joerger 31ee2a4c04
Move usage of predicate package out of api. (#6136) 2021-03-24 18:48:07 -07:00
Lisa Kim b0dba9bc00
Set suggested reviewers field to the UI user context struct (#5467) 2021-03-24 16:46:24 -07:00
Forrest Marshall 59d2379b94 custom approval conditions 2021-03-24 14:33:40 -07:00
Andrew Lytvynov 598e287171
mfa: don't check MFA for teleport services in UpsertKubeService (#6129) 2021-03-24 13:11:09 -07:00
tcsc 740d184d1c
Skip enumerating keys when cluster name is empty (#5942)
Addresses Issue #5774

Prior to this change key enumeration could fail with an error if the cluster value in the `tsh` config was missing, which is possible when a post-v6.0 `tsh` reads a ~/.tsh directory created by a pre-v6.0 `tsh`. This would ultimately cause the key enumeration code to search the wrong directory for keys, resulting in an attempt to read a directory as a key file, and failing.

This patch adds detection for an empty cluster name, and gracefully aborts the key enumeration without error if found.
2021-03-24 13:02:00 +11:00
Brian Joerger 4398797f14
Pass context through new gRPC converted endpoints. (#6118) 2021-03-23 18:26:52 -07:00
Lisa Kim 84a4f00114
Define cloud billing event types and codes (#6037)
* Exported auth.clientImpersonator and auth.clientUsername for use in e
2021-03-23 17:23:01 -07:00
Brian Joerger 32c4ae255f
Add Credential loader support for tsh profiles. (#5993) 2021-03-23 16:35:42 -07:00
Andrew Lytvynov 8492f62d43
u2f: add optional attestation cert validation (#6057)
By specifying `device_attestation_cas` in `teleport.yaml`, admins can
restrict U2F device manufacturers. For example, specifying the yubico
attestation CA
(https://developers.yubico.com/U2F/yubico-u2f-ca-certs.txt), you can
restrict users to only yubikeys.

Example error when using the yubico CA and trying to register a Google
Titan key:

```
$ tsh mfa add --type u2f --name test && tsh mfa rm test
Tap any *registered* security key
Tap your *new* security key
ERROR: rpc error: code = InvalidArgument desc = U2F device attestation certificate is signed by "CN=Security Key,O=Google", but this cluster only accepts certificates from ["CN=Yubico U2F Root CA Serial 457200631"]; make sure you're using a U2F device from a trusted manufacturer
```
2021-03-23 15:14:31 -07:00
Gus Luxton 39933625ac
drone: Add ARM/ARM64 package builds (#6106) 2021-03-23 14:56:53 -07:00
Brian Joerger 2beb991598
API client connection overhaul (#5625)
* Added support for connecting API client through tunnel proxy and web proxy addresses (with identity file).

* Added concurrent dialing logic to dial several possible dialing combinations and seamlessly return the first client to connect.
2021-03-23 14:39:20 -07:00
Gus Luxton 026d3419c2
dronegen: drone config generator (#6071) 2021-03-22 18:32:45 -07:00
Roman Tkachenko 8739417729
Add Postgres Cloud SQL support (#5941) 2021-03-22 09:38:05 -07:00
Roman Tkachenko a3837f6720
App access cli flow (#5918) 2021-03-22 09:18:53 -07:00
Roman Tkachenko b2ff4df8fa
Fix app access websockets support (#6072) 2021-03-22 08:56:44 -07:00
tcsc 0a516547dc
Properly marks k8s stream complete on error exit (#6068)
Addresses #5624

When a k8s stream exits it emits events that mark the session recording
as complete. Prior to this patch, the `exec` handler exited before
emitting these "session complete" events, leaving the recordings
orphaned.

This patch wraps the stream cleanup in a `defer`ed cleanup handler
that marks the stream as complete in any exit mode.
2021-03-22 10:20:45 +11:00
Roman Tkachenko e3936e95c5
Fix an issue with impersonating SSO users (#6076) 2021-03-19 19:16:22 -07:00
Trent Clarke 3149d0b953 Enforce valid UTF8 keys on all backends.
The use of non-UTF8 keys with the DynamoDB back-end causes a failure
deep within the AWS request deserialization code, presenting a
non-obvious failure to the user.

This change adds validation to all backends that requires all keys
are valid UTF8 strings. It also adds a warning to the Backend
interface declaration that the keys may be constrained to valid
UTF8.

Other changes include:
 * Updating the `Backend` conformance test suite to not present binary
   keys to the various backend implementations.
 * Adding a `region` value to the DynamoDB configuration test input
 * Adding missing imports to `_test` files.
 * Updating build instructions in README
2021-03-19 17:14:05 -07:00
Alexander Klizhentas f17625c1a8
Adds controls for impersonation requests. (#6009) (#6073)
Fixes #5352

```yaml
allow:
  impersonate:
    users: ['alice', 'bob']
    roles: ['*']
    where: 'contains(user.spec.traits["groups"], impersonate_role.traits)'
```

Adds "impersonator" to all X.509 and SSH client certs
issued using impersonation and does best effort to track
requests by impersonators in audit events.

Limits certs TTL to the impersonator's max session TTL.

Prevents impersonating users to recursively impersonate
other users.

Allows impersonating users to renew their own certificate,
for example to set route to cluster.

Adds missing token permission for editor role.
2021-03-19 16:04:43 -07:00
Gus Luxton 854d5fc80b
Move linter config to .golangci.yml and remove surplus Makefile lines (#6052) 2021-03-19 09:26:56 -07:00
Gus Luxton 029acc9505
Remove .bash suffix from bats includes to enable compatibility with older versions (#6053) 2021-03-18 18:50:05 -07:00
Ben Arent 69e40c99c1
Updated with 6.0 video (#6065) 2021-03-18 15:05:10 -07:00
Mickey Pashov 91dab1dcf3
docs: fix link to architectural overview (#5892)
* docs: fix link to architecture
2021-03-18 13:15:41 -07:00
Ben Arent 0ffe302651
Edits to getting started guide (#6038) 2021-03-17 21:33:40 -07:00