Commit graph

6348 commits

Author SHA1 Message Date
Gus Luxton 854da48990
Add lint-api target and fix lint errors (#6169) 2021-03-30 17:02:04 -07:00
Andrew Lytvynov fffe215570
ssh: fix relogin with jumphosts (#6213)
* ssh: fix relogin with jumphosts

Several fixes to make `tsh ssh -J leaf.proxy.com` work if the root cert
is missing/expired.

* Address review feedback

Correctly parse trusted CAs on GetKey.
Move retry without jumphosts from relogin to UpdateClusterCAs.

* Remove TelpoertClient.AuthMethods override on relogin

It doesn't seem to break anything.
2021-03-30 14:50:07 -07:00
Gus Luxton 71ef02f70b
drone: use emptyDir for /var/lib/docker filesystem and prevent repetitive docker pulls (#6145) 2021-03-30 14:32:40 -07:00
Gus Luxton f1d34b3058
Remove ARM64 FIPS builds (#6236) 2021-03-30 13:21:14 -07:00
Brian Joerger ee57e539b5
tsh Profile SSH certs fix (#6214) 2021-03-30 12:10:52 -07:00
Andrew Lytvynov f1f02bda04 mfa: fix gRPC unimplemented check in cert reissue
Our gRPC client is wrapped and converts gRPC status codes into trace
errors. It also doesn't preserve the original gRPC error internally.
2021-03-30 18:36:36 +00:00
Alexander Klizhentas fbae7ad508
Open Sources Access Controls Docs (#6188) (#6217)
* Open Sources Access Controls Docs (#6188)

Moves RBAC to a separate access controls section,
adds a couple of guides and prepares
the structure for more content.

* Fix href links
2021-03-30 10:04:23 -07:00
xacrimon 3f9f33408d add PAM environment with interpolation support 2021-03-30 18:23:38 +02:00
Andrej Tokarčík 52dfeec63e
Cache per-cluster SSH certificates under ~/.tsh (#5938)
```diff
 ~/.tsh/
 └── keys
    ├── one.example.com            --> Proxy hostname
    │   ├── certs.pem              --> TLS CA certs for the Teleport CA
    │   ├── foo                    --> RSA Private Key for user "foo"
    │   ├── foo.pub                --> Public Key
-   │   ├── foo-cert.pub           --> SSH certificate for proxies and nodes
    │   ├── foo-x509.pem           --> TLS client certificate for Auth Server
+   │   ├── foo-ssh                --> SSH certs for user "foo"
+   │   │   ├── root-cert.pub      --> SSH cert for Teleport cluster "root"
+   │   │   └── leaf-cert.pub      --> SSH cert for Teleport cluster "leaf"
```

When `-J` is provided, this also loads/reissues the SSH cert for the cluster associated with the jumphost's certificate. Fixes #5637.
2021-03-29 14:14:31 -07:00
Forrest Marshall 7d4c1ea6cf add special resource type for access plugin data 2021-03-29 13:30:48 -07:00
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