Commit graph

1552 commits

Author SHA1 Message Date
Russell Jones 07e90d0ad6 LocalKeyAgent only loads keys for a user logged into a proxy. 2018-01-20 00:40:38 +00:00
Sasha Klizhentas 5d134b4b50 Add support for custom tokens.
fixes #1546, fixes #1535

This commit fixes error message in case if token
is generated for trusted cluster and allows
admins to provide custom tokens:

tctl nodes add --roles=node --token=custom --ttl=100h
2018-01-18 12:48:18 -08:00
Russell Jones 6ef46821d0 During proxy transport, if not remote Auth Servers are found, log a
warning and exit.
2018-01-17 21:30:24 +00:00
Russell Jones 4a800331ae Lock rotateLog function as it's called from multiple goroutines. 2018-01-16 18:16:51 -08:00
Russell Jones dd94cf7ed9 Increase time allowed for tests to run. 2018-01-16 17:14:56 -08:00
Sasha Klizhentas 6ac60f8e95 Fix missing TLS cert for SAML logins 2018-01-16 12:22:39 -08:00
Sasha Klizhentas 217d024c5d Audit log contains login failures.
This commit fixes #1553, fixes #1554 and makes sure
that audit log contains login success and failure entries
for OIDC, SAML, Github and local logins.
2018-01-15 18:11:08 -08:00
Russell Jones 6a814e8a85 Use a discard session server and audit logger when the proxy is in
recording mode and on a Teleport node.
2018-01-16 01:38:24 +00:00
Sasha Klizhentas 813ba79709 fix data race 2018-01-15 15:03:55 -08:00
Sasha Klizhentas b82336ae06 Use gzip for session recordings, fixes #1579
* Session recordings are created with gzip compression.
* Migration compresses old recordings and converts to new format.
2018-01-15 13:34:01 -08:00
Alexey Kontsevoy 736b21effb (web) disable join session button when proxy is recording 2018-01-12 17:28:41 -05:00
Russell Jones 9da48d8530 Disable events and session recordings from Teleport nodes when sessions
are recorded at the proxy.
2018-01-12 21:17:09 +00:00
Russell Jones 1c65651658 In-memory forwarding servers now have a random server_id. 2018-01-12 19:33:23 +00:00
Sasha Klizhentas 78c157a4e2 add missing commits due to failed merge 2018-01-11 18:28:04 -08:00
Sasha Klizhentas ef20e45208 Enforce trusted cluster resource name, fixes #1543
This commit makes sure that trusted cluster resource
name is the same name as the cluster name it conects to.

If user supplies name of the trusted cluster resource
that is different from the cluster name, the warning
will be issued and trusted cluster will be renamed.

Upgrade procedure renames existing trusted clusters
in place.

If user supplies trusted cluster without role
mappings, or with role mappings referring to
non-existent roles that do not exist, the
error will be returned.
2018-01-11 14:13:30 -08:00
Russell Jones 7c263f2bd9 Fixed handling of initial terminal size. For Teleport nodes, don't
reduce the width of the terminal by one. For the recording proxy, width
and height were transposed.
2018-01-09 16:30:33 -08:00
Russell Jones b3d4d36fde Added cert_format to role as well as tsh to control how a certificate is
generated.
2018-01-09 14:57:35 -08:00
Roman Tkachenko dd515b4580 Merge branch 'roman/anon' of github.com:gravitational/teleport into roman/anon 2018-01-09 12:27:02 -08:00
Roman Tkachenko 5e05b751ee Fix comment 2018-01-09 12:26:48 -08:00
Roman Tkachenko 613c46fe21
Merge branch 'master' into roman/anon 2018-01-09 12:25:34 -08:00
Roman Tkachenko 8e65199224 Add anonymizer 2018-01-09 10:30:19 -08:00
Sasha Klizhentas c1153734b0 Add support for extra principals, fixes #1174
Add support for extra principals for proxy.
Proxy section already supports public_addr
property that is used during tctl users add
output.

Use the value from this property to update
host SSH certificate for proxy service.

proxy_service:
  public_addr: example.com:3024

With the configuration above, proxy host
certificate will contain example.com principal
in the SSH principals list.
2018-01-08 20:36:34 -08:00
Sasha Klizhentas ef473d809e Join address for web, reverse tunnel, fixes #1544
Support configuration for web and reverse tunnel
proxies to listen on the same port.

* Default config are not changed for backwards compatibility.
* If administrator configures web and reverse tunnel
addresses to be on the same port, multiplexing is turned on
* In trusted clusters configuration reverse_tunnel_addr
defaults to web_addr.
2018-01-05 16:20:56 -08:00
Sasha Klizhentas 71c15e5835 Add support for NFS-friendly log protocol.
* Session events are delivered in continuous
batches in a guaranteed order with every event
and print event ordered from session start.

* Each auth server writes to a separate folder
on disk to make sure that no two processes write
to the same file at a time.

* When retrieving sessions, auth servers fetch
and merge results recorded by each auth server.

* Migrations and compatibility modes are in place
for older clients not aware of the new format,
but compatibility mode is not NFS friendly.

* On disk migrations are launched automatically
during auth server upgrades.
2018-01-04 18:54:37 -08:00
Russell Jones 1670fffcb3 Don't allow second factor by-pass. 2018-01-04 13:43:39 -08:00
Sasha Klizhentas e88047c6da fix incorrect cluster name on the web handler 2018-01-03 10:40:44 -08:00
Sasha Klizhentas e114fbd46c Add support for remote_cluster, implements #1526
This commit adds remote cluster resource that specifies
connection and trust of the remote trusted cluster to the local
cluster. Deleting remote cluster resource deletes trust
established between clusters on the local cluster side
and terminates all reverse tunnel connections.

Migrations make sure that remote cluster resources exist
after upgrade of the auth server.
2017-12-28 17:48:30 -08:00
Russell Jones 61b2873b33 Create single server context for forwarding server. 2017-12-27 13:12:48 -08:00
Sasha Klizhentas 0130c6aa41 Mutual TLS Auth server and clients.
This commit introduced mutual TLS authentication
for auth server API server.

Auth server multiplexes HTTP over SSH - existing
protocol and HTTP over TLS - new protocol
on the same listening socket.

Nodes and users authenticate with 2.5.0 Teleport
using TLS mutual TLS except backwards-compatibility
cases.
2017-12-27 11:37:19 -08:00
Russell Jones 3b51d608cf Consolidated terminal request handling. 2017-12-21 11:53:21 -08:00
Russell Jones a2bcf68166 Emit session specific audit events, but not session specific stream
bytes.
2017-12-21 11:48:05 -08:00
Russell Jones 3bfe61dc0b Added integration tests and minor fixes. 2017-12-19 17:40:05 -08:00
Roman Tkachenko 9ce47f41fa Log empty mapping case for easier debugging 2017-12-15 10:10:29 -08:00
Roman Tkachenko 59c265894f Use Github username instead of email 2017-12-14 18:07:20 -08:00
Roman Tkachenko e94675a94e Fix typos and some review comments 2017-12-14 17:19:57 -08:00
Roman Tkachenko c0cf7df7c9 Github connector 2017-12-14 13:41:38 -08:00
Russell Jones 596b9781ec Handle "exec" commands correctly when connecting to Teleport nodes via a
Teleport forwarding node.
2017-12-11 14:25:55 -08:00
Russell Jones a56b0870a7 Added the ability to generate host certificates to tctl. 2017-12-09 19:37:49 +00:00
Russell Jones 37ab1596c4 Updated reverse tunnel to allow use to forwarding server. 2017-12-09 19:29:20 +00:00
Alexey Kontsevoy f9351af279 (web) login should display all available auth providers 2017-12-07 19:43:06 -05:00
Russell Jones 7018852c5d Added forwarding SSH server. 2017-12-04 17:01:52 -08:00
Sasha Klizhentas 4b39fcf4d2 couple of UX tweaks 2017-11-29 11:28:24 -08:00
Sasha Klizhentas b1f502a0f3 add ttl support for invite tokens, fixes #1474 2017-11-28 19:39:12 -08:00
Sasha Klizhentas 5778537999 Merge branch 'master' into sasha/mux 2017-11-26 13:59:46 -08:00
Sasha Klizhentas 5c3139f111 add comment to explain two attempts 2017-11-26 13:53:30 -08:00
Roman Tkachenko 02c027d2ea Fix trusted cluster extension schema 2017-11-24 13:35:41 -08:00
Sasha Klizhentas f8dba76147 SSH/TLS multiplexer with Proxy protocol support
This commit aadds multiplexer library of SSH/TLS on the same
listener socket. The multiplexer detects the protocol by the first
3 bytes of the incoming connection and forwards wrapped
connection either to the SSH ot TLS listeners.

The library also supports PROXY line protocol
and wraps connection information with connection details
from the proxy line received by the server
2017-11-23 14:50:28 -08:00
Roman Tkachenko 143b834e57 Changes for the upcoming teleport pro:
* Allow external audit log plugins
* Add support for auth API server plugins
* Add license file path configuration parameter (not used in open-source)
* Extend audit log with user login events
2017-11-21 17:35:58 -08:00
Sasha Klizhentas ab7bb2862d add comments 2017-11-21 16:11:34 -08:00
Sasha Klizhentas c4a72fd353 add rule checks and evaluation priorities
This commit improves error handling and improves rule evaluatons
by introducing rule priorities.

Roles are now checked for syntax errors in 'where' and 'actions'
sections what was not done before.

In case if several equivalent rules are specified, new rule
evaluations are now going into effect:

More specific rule will be matched first.

* Rule matching wildcard resource is less specific
than same rule matching specific resourc
* Rule that has wildcard verbs is less specific
than the same rules matching specific verb
* Rule that has where section is more specific
than the same rule without where section
* Rule that has actions list is more specific than
rule without actions list.
2017-11-21 15:15:09 -08:00