teleport/lib/services
Russell Jones 6d1c16f745 Added support for nodes dialing back to cluster.
Updated services.ReverseTunnel to support type (proxy or node). For
proxy types, which represent trusted cluster connections, when a
services.ReverseTunnel is created, it's created on the remote side with
name /reverseTunnels/example.com. For node types, services.ReverseTunnel
is created on the main side as /reverseTunnels/{nodeUUID}.clusterName.

Updated services.TunnelConn to support type (proxy or node). For proxy
types, which represent trusted cluster connections, tunnel connections
are created on the main side under
/tunnelConnections/remote.example.com/{proxyUUID}-remote.example.com.
For nodes, tunnel connections are created on the main side under
/tunnelConnections/example.com/{proxyUUID}-example.com. This allows
searching for tunnel connections by cluster then allows easily creating
a set of proxies that are missing matching services.TunnelConn.

The reverse tunnel server has been updated to handle heartbeats from
proxies as well as nodes. Proxy heartbeat behavior has not changed.
Heartbeats from nodes now add remote connections to the matching local
site. In addition, the reverse tunnel server now proxies connection to
the Auth Server for requests that are already authenticated (a second
authentication to the Auth Server is required).

For registration, nodes try and connect to the Auth Server to fetch host
credentials. Upon failure, nodes now try and fallback to fetching host
credentials from the web proxy.

To establish a connection to an Auth Server, nodes first try and connect
directly, and if the connection fails, fallback to obtaining a
connection to the Auth Server through the reverse tunnel. If a
connection is established directly, node startup behavior has not
changed. If a node establishes a connection through the reverse tunnel,
it creates an AgentPool that attempts to dial back to the cluster and
establish a reverse tunnel.

When nodes heartbeat, they also heartbeat if they are connected directly
to the cluster or through a reverse tunnel. For nodes that are connected
through a reverse tunnel, the proxy subsystem now directs the reverse
tunnel server to establish a connection through the reverse tunnel
instead of directly.

When sending discovery requests, the domain field has been replaced with
tunnelID. The tunnelID field is either the cluster name (same as before)
for proxies, or {nodeUUID}.example.com for nodes.
2019-04-26 15:41:45 -07:00
..
legacy Events and GRPC API 2018-12-10 17:20:24 -08:00
local Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
suite Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
authentication.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
authority.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
clusterconfig.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
clustername.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
configuration.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
doc.go moving code around and splitting interfaces 2016-04-04 17:09:00 -07:00
events.go Use RADIX trees for prefix matching. (#2666) 2019-04-22 15:28:04 -07:00
github.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
github_test.go Add OSS support for kubernetes groups 2018-08-06 17:21:21 -07:00
identity.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
invite.go tctl: users add/ls and tokens ls json output 2019-04-25 14:22:49 -07:00
license.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
license_test.go Events and GRPC API 2018-12-10 17:20:24 -08:00
map_test.go Fix mapping of default implicit role 2018-08-22 19:40:04 -07:00
migrations_test.go Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
namespace.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
oidc.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
oidc_test.go Removed namespaces and expires from user interface. 2017-08-30 18:11:13 +00:00
parser.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
presence.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
provisioning.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
remotecluster.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
resource.go tctl: users add/ls and tokens ls json output 2019-04-25 14:22:49 -07:00
role.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
role_test.go Events and GRPC API 2018-12-10 17:20:24 -08:00
saml.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
saml_test.go switch from client-go to apimachinery release-1.7 2017-08-28 18:25:39 -07:00
server.go Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
servers_test.go Events and GRPC API 2018-12-10 17:20:24 -08:00
services.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
services_test.go Events and GRPC API 2018-12-10 17:20:24 -08:00
session.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
statictokens.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
trust.go Detect remote cluster by SNI name 2018-09-28 11:00:36 -07:00
trustedcluster.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
tunnel.go Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
tunnelconn.go Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
types.pb.go Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
types.proto Added support for nodes dialing back to cluster. 2019-04-26 15:41:45 -07:00
user.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
user_test.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00
wrappers.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00