Teleport is an open-source tool for providing zero trust access to servers and cloud applications using SSH, Kubernetes and HTTPS. It can eliminate the need for VPNs by providing a single gateway to access computing infrastructure via SSH, Kubernetes clusters, and cloud applications via a built-in proxy.
How Teleport Works
Teleport provides secure access to SSH or Windows servers, Windows desktops, Kubernetes clusters, databases, and web applications. Teleport is trivial to set up as a Linux daemon or in a Kubernetes pod.
The basics
Teleport is a certificate authority and identity-aware, multi-protocol access proxy which implements protocols such as SSH, RDP, HTTPS, Kubernetes API, and a variety of SQL and NoSQL databases. It is completely transparent to client-side tools and designed to work with everything in today’s DevOps ecosystem.
Inside the downloaded tarball, you will find three binaries: the teleport
daemon, the tsh
client, and the tctl
administration tool. They are dependency-free, written in a compiled language. Teleport is open source and the source code is available on Github.
Teleport architecture
The key concept of Teleport’s architecture is the cluster. A Teleport cluster consists of the Teleport Auth Service, Teleport Proxy Service, Teleport agents, and resources that you want to connect to such as Linux or Windows servers, databases, Kubernetes clusters, Windows desktops, and internal web apps.
To create a minimal Teleport cluster, you must launch three services:
- Teleport Auth Service. The certificate authority of the cluster. It issues certificates to clients and maintains the audit log.
- Teleport Proxy Service. The proxy allows access to cluster resources from the outside. Typically it is the only service available from the public network.
- Teleport agents. A Teleport agent runs in the same network as a target resource and speaks its native protocol, such as the SSH, Kubernetes API, HTTPS, PostgreSQL, and MySQL wire protocols. Think of a “smart sidecar” that routes user requests to its target resource.
How a Teleport cluster works
The concept of a cluster is the foundation of the Teleport security model.
- Users and servers must all join the same cluster before access can be granted.
- To join a cluster, both users and servers must authenticate and receive certificates.
- The Teleport Auth Service is the CA of the cluster, which issues certificates for both users and servers with all supported protocols.
This model prevents honeypot attacks and eliminates the issue of trust on first use. This also allows users to enumerate all servers and other resources that are currently online.
Teleport clusters can be configured to trust each other. This allows users from one organization to access designated servers inside of another organization’s cloud or on-premise environment.
User experience
Teleport Desktop Access enables users to access Windows hosts via RDP in their web browser, and does not require a separate RDP client.
Users of ssh
, kubectl
, and other command-line clients can authenticate first by executing the tsh login
command. This configures the users’ CLI environments with short-lived certificates for access.
After that, users will be able to access their SSH servers, Windows servers and desktops, Kubernetes clusters, web applications, or databases. Teleport is backward compliant with existing client tools, so users can continue to use client tools including ssh
, psql
, mysql
, kubectl
, and others as usual.
How authentication works
The Teleport Proxy Service serves the login screen on https://proxy.example.com:443
, where users are asked for their username, password, and a second factor. If a third-party identity provider such as GitHub is used, the Proxy Service forwards the user to GitHub using OAuth2.
The Proxy Service sends the user’s identity to the Teleport Auth Service. In turn, the Auth Service issues certificates for SSH, Kubernetes, and other resources in a cluster, and sends them back to the client via the Proxy Service.
The tsh
client receives the certificates from the Proxy Service, stores them in the user’s ~/.tsh
directory, and loads them into the ssh-agent if one is running.
To learn more, check out our guide to certificate-based SSH authentication.
Audit log
The Teleport Auth Service maintains an audit log of all activity inside the Teleport cluster. The audit log consists of two components:
- The audit log: Well-documented JSON records of security events. Examples of such events include login attempts, file transfers, code execution, filesystem changes, and network activity.
- The recorded sessions: Recordings of interactive sessions established via SSH, RDP and
kubectl
commands. The recorded sessions can be replayed for audit purposes.
The Teleport Auth Service stores both types of audit data on a local file system by default, but can be configured to use S3, DynamoDB, and other suitable data stores.
Find out more here.