Categorygithub.com/chandra7924/https-github.com-gravitational-teleport
modulepackage
3.2.17+incompatible
Repository: https://github.com/chandra7924/https-github.com-gravitational-teleport.git
Documentation: pkg.go.dev

# README

Gravitational Teleport

Gravitational Teleport is a modern security gateway for remotely accessing:

  • Clusters of Linux servers via SSH or SSH-over-HTTPS in a browser.
  • Kubernetes clusters.

It is intended to be used instead or together with sshd for organizations who need:

  • SSH audit with session recording/replay.
  • Kubernetes API Access with audit and kubectl exec recording/replay.
  • Easily manage trust between teams, organizations and data centers.
  • Have SSH or Kubernetes access to behind-firewall clusters without any open ports.
  • Role-based access control (RBAC) for SSH protocol.
  • Unified RBAC for SSH and Kubernetes.

In addition to its hallmark features, Teleport is interesting for smaller teams because it facilitates easy adoption of the best infrastructure security practices like:

  • No need to distribute keys: Teleport uses certificate-based access with automatic certificate expiration time.
  • 2nd factor authentication (2FA) for SSH and Kubernetes.
  • Collaboratively troubleshoot issues through session sharing.
  • Single sign-on (SSO) for SSH/Kubernetes and your organization identities via Github Auth, OpenID Connect or SAML with endpoints like Okta or Active Directory.
  • Cluster introspection: every SSH node and its status can be queried via CLI and Web UI.

Teleport is built on top of the high-quality Golang SSH implementation and it is fully compatible with OpenSSH and can be used with sshd servers and ssh clients.

Project LinksDescription
Teleport WebsiteThe official website of the project
DocumentationAdmin guide, user manual and more
Demo Video3-minute video overview of the UI.
TeleconsoleThe free service to "invite" SSH clients behind NAT, built on top of Teleport
BlogOur blog where we publish Teleport news

Installing and Running

Download the latest binary release, unpack the .tar.gz and run sudo ./install. This will copy Teleport binaries into /usr/local/bin.

Then you can run Teleport as a single-node cluster:

$ sudo teleport start 

In a production environment Teleport must run as root. But to play, just do chown $USER /var/lib/teleport and run it under $USER, in this case you will not be able to login as someone else though.

If you wish to deploy Teleport inside a Docker container:

# This command will pull the Teleport container image for version 2.7.3
# Replace 2.7.3 with the version you need:
$ docker pull quay.io/gravitational/teleport:2.7.3

Building Teleport

Teleport source code consists of the actual Teleport daemon binary written in Golang, and also it has a web UI (located in /web directory) written in Javascript. The WebUI is not changed often and we keep it checked into Git under /dist, so you only need to build Golang:

Make sure you have Golang v1.8.3 or newer, then run:

# get the source & build:
$ mkdir -p $GOPATH/src/github.com/gravitational
$ cd $GOPATH/src/github.com/gravitational
$ git clone https://github.com/gravitational/teleport.git
$ cd teleport
$ make full

# create the default data directory before starting:
$ sudo mkdir -p /var/lib/teleport
$ sudo chown $USER /var/lib/teleport

If the build succeds the binaries will be placed in $GOPATH/src/github.com/gravitational/teleport/build

NOTE: The Go compiler is somewhat sensitive to amount of memory: you will need at least 1GB of virtual memory to compile Teleport. 512MB instance without swap will not work.

NOTE: This will build the latest version of Teleport, regardless of whether it is stable. If you want to build the latest stable release, git checkout to that tag (e.g. git checkout v2.5.7) before running make full.

Rebuilding Web UI

To enable speedy iterations on the Web UI, teleport can load the web UI assets from the source directory. To enable this behavior, set the environment variable DEBUG=1 and rebuild with the default target:

$ make

# Run Teleport as a single-node cluster in development mode: 
$ DEBUG=1 ./build/teleport start -d

Keep the server running in this mode, and make your UI changes in /dist directory. Refer to web/README.md for instructions on how to update the Web UI.

Updating Documentation

TL;DR version:

make docs
make run-docs

For more details, take a look at docs/README

Why did We Build Teleport?

Mature tech companies with significant infrastructure footprints tend to implement most of these patterns internally. Teleport allows smaller companies without significant in-house SSH expertise to easily adopt them, as well. Teleport comes with an accessible Web UI and a very permissive Apache 2.0 license to facilitate adoption and use.

Being a complete standalone tool, Teleport can be used as a software library enabling trust management in complex multi-cluster, multi-region scenarios across many teams within multiple organizations.

More Information

Contributing

The best way to contribute is to create issues or pull requests right here on Github. You can also reach the Gravitational team through their website

Is Teleport Secure and Production Ready?

Teleport has completed several security audits from the nationally recognized technology security companies. Some of them have been made public. We are comfortable with the use of Teleport from a security perspective.

You can see the list of companies who use Teleport in production on the Teleport product page.

However, Teleport is still a relatively young product so you may experience usability issues. We are actively supporting Teleport and addressing any issues that are submitted to this repo. Ask questions, send pull requests, report issues and don't be shy! :)

The latest stable Teleport build can be found in Releases

Known Issues

  • Teleport does not officially support IPv6 yet.

Who Built Teleport?

Teleport was created by Gravitational Inc. We have built Teleport by borrowing from our previous experiences at Rackspace. It has been extracted from Gravity, our Kubernetes distribution optimized for deploying and remotely controlling complex applications into multiple environments at the same time:

  • Multiple cloud regions
  • Colocation
  • Private enterprise clouds located behind firewalls

# Packages

No description provided by the author
integration package tests Teleport on a high level creating clusters of servers in memory, connecting them together and connecting to them.
No description provided by the author
No description provided by the author

# Functions

Component generates "component:subcomponent1:subcomponent2" strings used in debugging.
NewRoles return a list of roles from slice of strings.
ParseRoles takes a comma-separated list of roles and returns a slice of roles, or an error if parsing failed.

# Constants

ADFS is Microsoft Active Directory Federation Services.
DefaultRole is the name of the default admin role for all local users if another role is not explicitly assigned (Enterprise only).
APIDomain is a default domain name for Auth server API.
AuthorizedKeys are public keys that check against User CAs.
CertExtensionPermitAgentForwarding allows agent forwarding for certificate.
CertExtensionPermitPortForwarding allows user to request port forwarding.
CertExtensionPermitPTY allows user to request PTY.
CertExtensionTeleportRoles is used to propagate teleport roles.
CertExtensionTeleportTraits is used to propagate traits about the user.
CertificateFormatOldSSH is used to make Teleport interoperate with older versions of OpenSSH.
CertificateFormatStandard is used for normal Teleport operation without any compatibility modes.
CertificateFormatUnspecified is used to check if the format was specified or not.
ComponentAuditLog is audit log component.
ComponentAuth is the cluster CA node (auth server API).
ComponentAuthority is a TLS and an SSH certificate authority.
ComponentCachingClient is a caching auth client.
ComponentClient is a client.
ComponentConnectProxy is the HTTP CONNECT proxy used to tunnel connection.
ComponentDiagnostic is a diagnostic service.
ComponentDynamoDB represents dynamodb clients.
ComponentNode is SSH node (SSH server serving requests).
ComponentKeepAlive is keep-alive messages sent from clients to servers and vice versa.
ComponentKeyAgent is an agent that has loaded the sessions keys and certificates for a user connected to a proxy.
ComponentKeyGen is the public/private keypair generator.
ComponentKeyStore is all sessions keys and certificates a user has on disk for all proxies.
ComponentKube is a kubernetes proxy.
ComponentKubeClient is the Kubernetes client.
ComponentLocalTerm is a terminal on a regular SSH node.
ComponentNode is SSH node (SSH server serving requests).
Component pluggable authentication module (PAM).
ComponentProcess is a main control process.
ComponentProxy is SSH proxy (SSH server forwarding connections).
ComponentRBAC is role-based access control.
ComponentRemoteSubsystem is subsystem on a forwarding SSH node.
ComponentRemoteTerm is a terminal on a forwarding SSH node.
ComponentReverseTunnel is reverse tunnel agent that together with server establish a bi-directional SSH revers tunnel to bypass firewall restrictions.
ComponentReverseTunnelServer is reverse tunnel server that together with agent establish a bi-directional SSH revers tunnel to bypass firewall restrictions.
ComponentSession is an active session.
ComponentSOCKS is a SOCKS5 proxy.
ComponentSubsystemProxy is the proxy subsystem.
ComponentTSH is the "tsh" binary.
ComponentTunClient is a tunnel client.
ComponentUpload is a session recording upload server.
ComponentWeb is a web server.
ComponentWebsocket is websocket server that the web client connects to.
ConnectorGithub means connector type Github.
ConnectorOIDC means connector type OIDC.
ConnectorSAML means connector type SAML.
DarwinOS is the GOOS constant for Apple macOS/darwin.
DataDirParameterName is the name of the data dir configuration parameter passed to all backends during initialization.
DebugEnvVar tells tests to use verbose debug output.
DebugLevel is a debug logging level name.
DefaultImplicitRole is implicit role that gets added to all service.RoleSet objects.
DefaultTerminalHeight defines the default height of a server-side allocated pseudo TTY.
DefaultTerminalWidth defines the default width of a server-side allocated pseudo TTY.
DirMaskSharedGroup is the mask for a directory accessible by the owner and group.
DurationNever is human friendly shortcut that is interpreted as a Duration of 0.
EnvHome is home environment variable.
EnvKubeConfig is environment variable for kubeconfig.
EnvUserProfile is the home directory environment variable on Windows.
FileMaskOwnerOnly is the file mask that allows read write access to owers only.
ForeverTTL means that object TTL will not expire unless deleted.
Github means authentication will happen remotely using a Github connector.
GSuiteGroupsEndpoint is gsuite API endpoint.
GSuiteGroupsScope is a scope to get access to admin groups API.
GSuiteIssuerURL is issuer URL used for GSuite provider.
HOTP means HMAC-based One-time Password Algorithm.for Two-Factor Authentication.
HTTPProxy is an environment variable pointing to a HTTP proxy.
HTTPSProxy is an environment variable pointing to a HTTPS proxy.
HumanDateFormat is a human readable date formatting.
HumanDateFormatMilli is a human readable date formatting with milliseconds.
HumanDateFormatSeconds is a human readable date formatting with seconds.
JSON means JSON serialization format.
SSH request type to keep the connection alive.
KnownHosts are public keys that check against Host CAs.
KubeCAPath is a hardcode of mounted CA inside every pod of K8s.
KubeConfigDir is a default directory where k8s stores its user local config.
KubeConfigFile is a default filename where k8s stores its user local config.
KubeKindCSR is a certificate signing requests.
KubeKindPod is a kubernetes pod.
KubeMetadataLabelSelector is a selector for label.
KubeMetadataNameSelector is a selector for name metadata in API requests.
KubeRunTests turns on kubernetes tests.
KubeServiceAddr is an address for kubernetes endpoint service.
KubeSystemAuthenticated is a builtin group that allows any user to access common API methods, e.g.
KubeSystemMasters is a name of the builtin kubernets group for master nodes.
this constant exists for backwards compatibility reasons, needed to upgrade to 2.3.
LinuxAdminGID is the ID of the standard adm group on linux.
LinuxOS is the GOOS constant used for Linux.
Local means authentication will happen locally within the Teleport cluster.
LogsDir is a log subdirectory for events and logs.
MaxEnvironmentFileLines is the maximum number of lines in a environment file.
MinClientVersion is the minimum client version required by the server.
NetIQ is an identity provider.
NoProxy is an environment variable matching the cases when HTTPS_PROXY or HTTP_PROXY is ignored.
Off means mode is off.
OFF means no second factor.for Two-Factor Authentication.
OIDC means authentication will happen remotely using an OIDC connector.
On means mode is on.
OpenBrowserDarwin is the command used to open a web browser on macOS/Darwin.
OpenBrowserLinux is the command used to open a web browser on Linux.
OpenBrowserWindows is the command used to open a web browser on Windows.
OTP means One-time Password Algorithm for Two-Factor Authentication.
PrivateDirMode is a mode for private directories.
RecordingProxyReqType is the name of a global request which returns if the proxy is recording sessions or not.
Region is AWS region parameter.
RemoteClusterStatusOffline indicates that cluster is considered as offline, since it has missed a series of heartbeats.
RemoteClusterStatusOnline indicates that cluster is sending heartbeats at expected interval.
RemoteCommandFailure is returned when a command has failed to execute and we don't have another status code for it.
RemoteCommandSuccess is returned when a command has successfully executed.
RoleAdmin is admin role.
RoleAuth is for teleport auth server (authority, authentication and authorization).
RoleNode is a role for SSH node in the cluster.
RoleNop is used for actions that already using external authz mechanisms e.g.
RoleProvisionToken is a role for nodes authenticated using provisioning tokens.
RoleProxy is a role for SSH proxy in the cluster.
RoleRemoteProxy is a role for remote SSH proxy in the cluster.
RoleSignup is for first time signing up users.
RoleTrustedCluster is a role needed for tokens used to add trusted clusters.
RoleWeb is for web access users.
Root is *nix system administrator account name.
SafeTerminalType is the fall-back TTY type to fall back to (when $TERM is not defined).
SAML means authentication will happen remotely using a SAML connector.
SchemeFile is a local disk file storage.
SchemeS3 is S3 file scheme, means upload or download to S3 like object storage.
SCP is Secure Copy.
SessionEvent is sent by servers to clients when an audit event occurs on the session.
SharedDirMode is a mode for a directory shared with group.
SSHAgentPID is the environment variable pointing to the agent process ID.
SSHAuthSock is the environment variable pointing to the Unix socket the SSH agent is running on.
SSHSessionID is the UUID of the current session.
SSHSessionWebproxyAddr is the address the web proxy.
SSHTeleportClusterName is the name of the cluster this node belongs to.
SSHTeleportHostUUID is the UUID of the host.
SSHTeleportUser is the current Teleport user that is logged in.
Syslog is a mode for syslog logging.
TOTP means Time-based One-time Password Algorithm.
TOTPSkew adds that many periods before and after to the validity window.
TOTPValidityPeriod is the number of seconds a TOTP token is valid.
TraitInternalKubeGroupsVariable is the variable used to store allowed kubernetes groups for local accounts.
TraitInternalLoginsVariable is the variable used to store allowed logins for local accounts.
TraitInternalPrefix is the role variable prefix that indicates it's for local accounts.
TraitKubeGroups is the name the role variable used to store allowed kubernetes groups.
TraitLogins is the name the role variable used to store allowed logins.
U2F means Universal 2nd Factor.for Two-Factor Authentication.
UsageKubeOnly specifies certificate usage metadata that limits certificate to be only used for kubernetes proxying.
UseOfClosedNetworkConnection is a special string some parts of go standard lib are using that is the only way to identify some errors.
VerboseLogEnvVar forces all logs to be verbose (down to DEBUG level).
No description provided by the author
VersionRequest is sent by clients to server requesting the Teleport version they are running.
WebAPIVersion is a current webapi version.
WindowsOS is the GOOS constant used for Microsoft Windows.

# Variables

Gitref variable is automatically set to the output of git-describe during the build process.

# Type aliases

Role identifies the role of an SSH connection.
No description provided by the author