Commit graph

4703 commits

Author SHA1 Message Date
Russell Jones 6b1bc20451 Release 4.1.0-beta.1. 2019-09-06 20:00:16 +00:00
Forrest Marshall 9937815b62 fix e-ref (#2959) 2019-09-06 10:50:06 -07:00
Forrest Marshall 6838a95cac Add isolated proxy-seeking state machine (#2946)
This commit introduces a new iteration of the proxy discovery
algorithm implemented as a separate component from the main
reversetunnel agent/agentpool system.  This isolation is
intended to improve our ability to test and reason about the
algorithm in isolation from IO and other implementation
details.
2019-09-06 10:37:12 -07:00
Russell Jones afa0e520c0 Updated CHANGELOG.md. 2019-09-06 00:20:46 +00:00
Russell Jones cebd21ad91 Fix broken test. 2019-09-05 17:02:00 -07:00
Russell Jones d8c638a3b6 Always emit session related events with host UUID.
When emitting session related events, emit them with the ID of the host
not of the server. This is because the forwarding server has a randomly
generated ID that will note validate with TLS identity that connects to
the Auth Server.
2019-09-05 17:02:00 -07:00
Joshua Durbin d346f2b124 adds support for GCP HA environments with gcs recording storage, firestore-backed events, and firestore backend storage 2019-09-05 13:09:55 -07:00
Russell Jones 100a9d15ea Fix failing test. 2019-09-03 13:44:20 -07:00
Russell Jones 9460c6f15e Rate limit password check endpoint.
Wrap the password check endpoint with a rate limiter to prevent brute
force attacks.
2019-09-03 13:44:20 -07:00
Russell Jones 1c49f681bd Fixed unauthenticated user creation.
The currentUserAction endpoint on the Auth Server allows access to a
user "Nop" if no form of client authentication is provided. Since this
user is not associated with a role, it has no logins, and can not obtain
SSH x509 credentials.

To strengthen access controls, currentUserAction only allows locally
authenticated users whose with a name match access.
2019-09-03 13:44:20 -07:00
Russell Jones 04b4469a66 Removed CreateWebSession endpoint. 2019-09-03 13:44:20 -07:00
Russell Jones 9135a5ade7 Use roles and traits in certificate for RBAC.
If an attacker can force a username change at an IdP, upon second login,
the services.User object of the original user can be updated with new
roles and traits. If these new roles and traits differ, the original
user can have their privileges raised (or lowered).

To mitigate this, encode roles and traits within the certificate and use
these when fetching roles to make RBAC decisions. If roles and traits are
not encoded within an certificate (for example for old style SSH
certificates then fallback to using the services.User object and log a
warning.
2019-09-03 13:44:20 -07:00
Russell Jones 9a5acfb9de Mask errors to mitigate user enumeration. 2019-09-03 13:44:20 -07:00
Russell Jones ba7bdab41c Validate session ID upon upload.
Before sending and receiving a session recording, parse the session ID
to make sure it's a UUID to prevent an attacker from uploading an
arbitrary file.
2019-09-03 13:44:20 -07:00
Russell Jones 5a38647896 Constant time compare for tokens. 2019-09-03 13:44:20 -07:00
Russell Jones 1479dfc258 Always emit exec command and exit code.
Due to the scp being inherently vulnerable to command injection, always
make sure the full command and exit code is recorded in the Audit Log
for accountability purposes.

For more details about scp, see the following.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327019
https://bugzilla.mindrot.org/show_bug.cgi?id=1998
2019-09-03 13:44:20 -07:00
Russell Jones 8bd706d56a Validate incoming events against x509 identity.
Validate all incoming events (and archives) to ensure that the server ID
within the event matches the x509 identity of the connected host. This
check makes sure nodes can only submit events for themselves.

In addition, make sure session recordings to disk or S3 can not be
overwritten.
2019-09-03 13:44:20 -07:00
Russell Jones 3eb31bd867 Sanitize tar paths before extraction.
When extracting tar archive, don't allow files to be extracted outside
the specified directory.
2019-09-03 13:44:20 -07:00
Russell Jones de66044843 Migrate session ID from UUIDv1 to UUIDv4. 2019-09-03 13:44:20 -07:00
Russell Jones df9962d572 Test cleanup.
Initialize in main utils_test.go file and name test functions match
package names.
2019-09-03 13:44:20 -07:00
Alexey Kontsevoy f42458f8b7 Add Referrer-Policy header 2019-09-03 13:44:20 -07:00
Ben Arent fd2a0e7c69 Fix for #2951 (#2953) 2019-09-03 11:37:33 -07:00
Ev Kontsevoy 80ab58f614 Updated README with a new Golang version (#2947) 2019-08-30 11:37:51 -07:00
Forrest Marshall 05f3eeaf00 Support resource-based bootstrapping for backend. (#2871)
* Support resource-based bootstrapping for backend.

Outside of static configuration, most of the persistent state of an
auth server exists as a collection of resources, stored in its
backend.  The resource API also forms the basis of Teleport's more
advanced dynamic configuration options.

This commit extends the usefulness of the resource API by adding
the ability to bootstrap backend state with a set of previously
exported resources.  This allows the resource API to serve as a
rudimentary backup/migration tool.

Notes: This features is a work in progress, and very easy to misuse;
while it will prevent you from overwriting the state of an existing
auth server, it won't stop you from bootstrapping into a wildly
misconfigured state.  In general, resource-based bootstrapping is
not a complete solution for backup or migration.

* update e-ref
2019-08-29 16:16:03 -07:00
Forrest Marshall 04cea89e58 Expand TELEPORT_SITE environment to tsh login, fixes #2668 (#2675) (#2942)
The following now works:

```
TELEPORT_SITE=two.example.com tsh login
```
2019-08-29 14:02:13 -07:00
Alexey Kontsevoy 8890a324b8 Update e-ref 2019-08-29 14:47:52 -04:00
Alexey Kontsevoy 796bb60703 Update package-lock.json 2019-08-29 14:43:33 -04:00
Russell Jones e117e857ab Allow port forwarding without command execution. (#2900)
Added ability to port forwarding without remote command execution.
Equivalent of -N for OpenSSH.
2019-08-17 10:33:55 -07:00
Gus Luxton a12675e0d2 Added DynamoDB streams to example policy and ran spell check (#2930)
* Added DynamoDB streams to policy and ran spell check

* Ran spellcheck on all other docs, also s/telekube/gravity/g

* Fixed example AWS account ID
2019-08-17 10:33:27 -07:00
Pierre Beaucamp 430017bb2a Update reference to e (#2929) 2019-08-17 10:33:00 -07:00
Russell Jones 3686158adf Added support to save cluster to profile. (#2905)
Upon calling "tsh login <clusterName>", Teleport will save the cluster
name in ~/.tsh/profile. This value will then be used similar to the
--cluster flag to select which cluster to run a tsh subcommand on.
2019-08-17 10:32:39 -07:00
Ben Arent b014d85230
Example CloudFormation using AMI & Let's Encrypt (#2887)
- Added a CloudFormation example to the repo.
2019-08-16 16:11:48 -07:00
Ben Arent 49997da37e Added Stdout in YAML config. (#2921) 2019-08-14 11:09:19 -07:00
Gus Luxton 4b022fcacb
Handle HTTP connections to TLS socket in a more graceful way (#2886) 2019-08-13 14:03:22 -03:00
Gus Luxton 55bf093fa6
Update forwarder.go 2019-08-13 07:23:59 -03:00
Gus Luxton 08902c5c2b Improved error when sending k8s traffic to the proxy's web port (#2918) 2019-08-12 14:44:38 -07:00
Alexander Klizhentas f8b4282457
Remove verbose flags (#2912) 2019-08-11 12:58:32 -07:00
Abdu Elkugia 4720a6cd9b Typo updates to Teleport quick start guide (#2911)
* Typo updates to Teleport quick start guide

* Updated TTL for login back to 12 hours. TTL for signup token was 1 hour.
2019-08-10 13:06:12 -07:00
Ben Arent 87da6ba97e Fixes formatting for better yaml pretty print (#2908) 2019-08-09 09:53:50 -07:00
Gus Luxton c7ba0ba85c Fix for AWS' filter syntax being terrible 2019-08-09 11:27:50 -03:00
Gus Luxton 1974742607
Fix ProxyJump examples and typos (#2907) 2019-08-08 17:46:22 -03:00
Alexander Klizhentas 210ab97be9 Teleport now supports IPV6 2019-08-07 12:19:15 -07:00
Ben Arent cff90a2da5 Make version consistant and use latest version. 2019-08-07 11:09:41 -07:00
Sasha Klizhentas 1327929811 Include identity traits in the audit log.
Implements #2823
2019-08-07 11:07:33 -07:00
Ben Arent 7db066a8b1 Add zoho pagesense for feedback 2019-08-07 09:01:45 -07:00
Sasha Klizhentas aad397fbbd Better error message for IdP initated logins.
Fixes #2648

Teleport does not support SAML identity provider
initiated logins, this commit gives a better
error message to the user instructing them
what to do.
2019-08-06 16:40:29 -07:00
Ben Arent e321ea7376
s couple/couples (#2897) 2019-08-06 14:08:07 -07:00
Gus Luxton 897d601b70
Update AMI to handle EC2 instances with no public IP (#2896) 2019-08-06 12:35:38 -03:00
Gus Luxton 6cfa5bb9bc
Fix incorrect value in error message plus all go-lint errors in file (#2888) 2019-08-02 17:48:59 -03:00
Sasha Klizhentas 741fd60119 Fix memory leak.
This commit fixes memory leak in the cache module:

* Cache calls in to create a NewWatcher
* NewWatcher gets registered in the backend
* Cache closes the watcher
* Watcher never gets deleted from the backend
fanout internal structure.

This is a defect in the way watchers are implemented:
closing a watcher should result from it's removal
from the fanout internal circular buffer prefix tree.
2019-08-02 12:27:14 -07:00