Find a file
jkaczmarkiewicz 2a9167b03b
set cluster connector name on signin for first cloud user (#17834)
* feat: set cluster connector name on first user signin

* perf: move is passwordless enabled before get users

* fix: move logic to correct handler

* test: test setting default passwordless connector name for cloud (positive case)

* test: add negative test cases

* refactor: flatten nested code

* fix: remove return in case auth preference was not set

* fix: run logic only in cloud

* docs: typo

* fix: run when passwordless

* test: move trySettingConnectorNameToPasswordless as separete method

* docs: add safety comments

* test: rephrase safety comment

* refactor: remove space between call and error check

* fix: remove unnessesery error log from trySettingConnectorNameToPasswordless

* refactor: pass context, rename session context

* docs: add description to trySettingConnectorNameToPasswordless

* test: add descriptive assertion text

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* refactor: simplify error handilng

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* fix: check for non default setting

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: correct RPID

* refactor: simplify user creation

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* docs: fix typo

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: reorder name filed in the test cases struct

* test: better names for test cases

* refactor: generate token instead of hardcoding arbitrary value

* test: remove user agent header

* fix: check for empty password

* docs: add passwordless check description

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: add "first cloud sign-in does not change custom connector"

* test: use correct number of users in "first cloud sign-in does not change custom connector"

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: remove is cloud check from test helpers, instead use config

* refactor: store is_passwordless_registration in variable

* test: first cloud sign-in with password does not change connector

* refactor: change isPasswordlessRegistration name

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2022-11-14 14:52:42 +00:00
.cloudbuild Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
.github Bump Go dependencies (#18267) 2022-11-08 20:31:08 +00:00
api Adds GCP GKE auto-discovery (#17831) 2022-11-11 18:10:29 +00:00
assets Standardize systemd LimitNOFILE (#17893) 2022-10-31 16:56:02 +00:00
bpf Remove Apache license headers from BPF modules (#16896) 2022-10-03 10:02:31 +00:00
build.assets Update Node.js to 16.18.1 (#18354) 2022-11-10 20:41:40 +00:00
docker Bump versions in docker images to 11 (#17768) 2022-10-25 01:06:02 +00:00
docs changes docs from desktop.directory.start to desktop.directory.share (#18399) 2022-11-12 01:18:36 +00:00
dronegen Tcsc/v12 versioned windows builder (#18339) 2022-11-10 12:43:38 +00:00
e@79bc9eaa8c Better webassets embedding: e (#18164) 2022-11-05 10:30:49 +00:00
examples operator: fix unregistered CR in scheme + wrong chart clusterrole (#18367) 2022-11-11 05:33:36 +00:00
fixtures Fix tsh tctl do not load all CAS (#9357) 2022-01-31 13:35:15 +01:00
fuzz Remove duplicate fuzzer fuzz_parser_eval_bool_predicate from fuzzer build list (#15235) 2022-08-05 22:47:46 +00:00
integration Fix Flaky TestDatabaseRootLeafIdleTimeout test (#18202) 2022-11-14 10:09:33 +01:00
lib set cluster connector name on signin for first cloud user (#17834) 2022-11-14 14:52:42 +00:00
operator operator: fix unregistered CR in scheme + wrong chart clusterrole (#18367) 2022-11-11 05:33:36 +00:00
proto Add comment and import cycle proto linters (#16082) 2022-09-02 13:31:45 +00:00
rfd Shared Directory Audit events (#17410) 2022-11-10 19:11:44 +00:00
tool Fix concurrency issues when tsh login is invoked in parallel tests (#18333) 2022-11-14 11:13:31 +00:00
vagrant Standardize systemd LimitNOFILE (#17893) 2022-10-31 16:56:02 +00:00
webassets@785b97c23a [auto] Update webassets in teleport/master from webassets/master (#18122) 2022-11-04 01:27:26 +00:00
.drone.yml Tcsc/v12 versioned windows builder (#18339) 2022-11-10 12:43:38 +00:00
.gitattributes Make linguist correctly classify JS protobuf files (#17782) 2022-10-26 10:06:54 +00:00
.gitignore Apply linters to legacy protos (#15879) 2022-08-29 20:54:32 +00:00
.gitmodules Remove unused teleport-demo chart (#4387) 2020-09-29 09:43:52 -03:00
.golangci.yml operator: Add auth_connector support (#17448) 2022-11-10 15:42:18 +00:00
buf-go.gen.yaml Move away from deprecated protoc-gen-go plugin (#17267) 2022-10-13 14:01:44 +00:00
buf-gogo.gen.yaml Add Device Trust protobuf definitions (#17302) 2022-10-11 22:21:38 +00:00
buf.work.yaml Use Buf to build/lint/format lib/ protos (#15870) 2022-08-29 17:44:18 +00:00
BUILD_macos.md Update Missing CD in bats-core Install (#15363) 2022-09-07 23:19:33 +00:00
Cargo.lock runs cargo update (#18104) 2022-11-10 18:06:44 +00:00
Cargo.toml Remove tctl roletester (#13863) 2022-06-25 04:01:21 +00:00
CHANGELOG.md Remove the Jira Server Access Plugin guide (#17546) 2022-11-04 20:28:58 +00:00
CODE_OF_CONDUCT.md Cherry pick Gravitational -> GoTeleport (#4932) 2020-11-25 11:18:55 -08:00
constants.go Remove azsessions (#17055) 2022-10-07 09:24:30 +00:00
CONTRIBUTING.md Remove vendor 2022-01-07 02:15:11 -07:00
doc.go Update golangci-lint to 1.49.0 (#16507) 2022-09-19 22:38:59 +00:00
e_imports.go Dependency updates (#17788) 2022-10-26 16:02:25 +02:00
go.mod Adds GCP GKE auto-discovery (#17831) 2022-11-11 18:10:29 +00:00
go.sum Adds GCP GKE auto-discovery (#17831) 2022-11-11 18:10:29 +00:00
gravitational.asc Create SECURITY.md 2021-04-26 17:40:07 +00:00
LICENSE Apply apache license to teleport 2015-10-31 11:56:49 -07:00
Makefile Run GCI as make fix-imports (#17956) 2022-11-04 15:46:46 +00:00
metrics.go Add grpc server and client metrics to Teleport (#11534) 2022-04-04 16:55:31 +00:00
README.md Found a grammatical error in Line no. 338 (#16131) 2022-10-14 19:32:29 +00:00
SECURITY.md Create SECURITY.md 2021-04-26 17:40:07 +00:00
version.go Bump version in master to 12.0.0-dev (#17104) 2022-10-06 01:51:59 +00:00
version.mk Add Teleport operator 2022-07-25 15:27:10 -04:00
webassets_embed.go Better webassets embedding (#17058) 2022-10-06 08:36:23 +00:00
webassets_embed_ent.go Better webassets embedding (#17058) 2022-10-06 08:36:23 +00:00
webassets_noembed.go Better webassets embedding (#17058) 2022-10-06 08:36:23 +00:00


Read our Blog: https://goteleport.com/blog/

Read our Documentation: https://goteleport.com/docs/getting-started/

Table of Contents

  1. Introduction
  2. Installing and Running
  3. Docker
  4. Building Teleport
  5. Why Did We Build Teleport?
  6. More Information
  7. Support and Contributing
  8. Is Teleport Secure and Production Ready?
  9. Who Built Teleport?

Introduction

Teleport is the easiest, most secure way to access all your infrastructure. Teleport is an identity-aware, multi-protocol access proxy which understands SSH, HTTPS, RDP, Kubernetes API, MySQL, MongoDB and PostgreSQL wire protocols.

On the server-side, Teleport is a single binary which enables convenient secure access to behind-NAT resources such as:

Teleport is trivial to set up as a Linux daemon or in a Kubernetes pod. It's rapidly replacing legacy sshd-based setups at organizations who need:

  • Developer convenience of having instant secure access to everything they need across many environments and cloud providers.
  • Audit log with session recording/replay for multiple protocols
  • Easily manage trust between teams, organizations and data centers.
  • Role-based access control (RBAC) and flexible access workflows (one-time access requests)

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 manage shared secrets such as SSH keys: Teleport uses certificate-based access with automatic certificate expiration time for all protocols.
  • Two-factor authentication (2FA) for everything.
  • Collaboratively troubleshoot issues through session sharing.
  • Single sign-on (SSO) for everything via Github Auth, OpenID Connect, or SAML with endpoints like Okta or Active Directory.
  • Infrastructure introspection: Use Teleport via the CLI or Web UI to view the status of every SSH node, database instance, Kubernetes cluster, or internal web app.

Teleport is built upon the high-quality Golang SSH implementation. It is fully compatible with OpenSSH, sshd servers, and ssh clients.

Project Links Description
Teleport Website The official website of the project.
Documentation Admin guide, user manual and more.
Demo Video 3-minute video overview of Teleport.
Blog Our blog where we publish Teleport news.
Forum Ask us a setup question, post your tutorial, feedback, or idea on our forum.
Slack Need help with your setup? Ping us in our Slack channel.
Cloud-hosted We offer Enterprise with a Cloud-hosted option. For teams that require easy and secure access to their computing environments.

Installing and Running

| Follow the Installation Guide

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. For testing or non-production environments, run it as the $USER:

chown $USER /var/lib/teleport

  • In this case, you will not be able to log in as another user.

Docker

| Follow the Docker-Compose Getting Started Guide

Deploy Teleport

If you wish to deploy Teleport inside a Docker container:

# This command will pull the Teleport container image for version 8
docker pull public.ecr.aws/gravitational/teleport:8

View latest tags on Amazon ECR Public | gravitational/teleport

For Local Testing and Development

Follow the instructions in the docker/README file.

To run a full test suite locally, see the test dependencies list

Building Teleport

The teleport repository contains the Teleport daemon binary (written in Go) and a web UI written in Javascript (a git submodule located in the webassets/ directory).

If your intention is to build and deploy for use in a production infrastructure a released tag should be used. The default branch, master, is the current development branch for an upcoming major version. Get the latest release tags listed at https://goteleport.com/download/ and then use that tag in the git clone. For example git clone https://github.com/gravitational/teleport.git -b v9.1.2 gets release v9.1.2.

Dockerized Build

It is often easiest to build with Docker, which ensures that all required tooling is available for the build. To execute a dockerized build, ensure that docker is installed and running, and execute:

make -C build.assets build-binaries

Local Build

Dependencies

Ensure you have installed correct versions of necessary dependencies:

  • Go version from go.mod
  • If you wish to build the Rust-powered features like Desktop Access, see the Rust and Cargo version in build.assets/Makefile (search for RUST_VERSION)
  • For tsh version > 10.x with FIDO support, you will need libfido and openssl 1.1 installed locally

For an example of Dev Environment setup on a Mac, see these instructions.

Perform a build

Important

  • The Go compiler is somewhat sensitive to the amount of memory: you will need at least 1GB of virtual memory to compile Teleport. A 512MB instance without swap will not work.
  • This will build the latest version of Teleport, regardless of whether it is stable. If you want to build the latest stable release, run git checkout and git submodule update --recursive to the corresponding tag (for example,
  • run git checkout v8.0.0) before performing a build.

Get the source

git clone https://github.com/gravitational/teleport.git
cd teleport

To perform a build

make full

To build tsh with Apple TouchID support enabled:

Important

tsh binaries with Touch ID support are only functional using binaries signed with Teleport's Apple Developer ID and notarized by Apple. If you are a Teleport maintainer, ask the team for access.

make build/tsh TOUCHID=yes

To build tsh with libfido:

make build/tsh FIDO2=dynamic
  • On a Mac, with libfido and openssl 1.1 installed via homebrew

    export PKG_CONFIG_PATH="$(brew --prefix openssl@1.1)/lib/pkgconfig"
    make build/tsh FIDO2=dynamic
    

Build output and running locally

If the build succeeds, the installer will place the binaries in the build directory.

Before starting, create default data directories:

sudo mkdir -p -m0700 /var/lib/teleport
sudo chown $USER /var/lib/teleport

Web UI

The Teleport Web UI resides in the Gravitational Webapps repo.

Rebuilding Web UI for development

To clone this repository and rebuild the Teleport UI package, run the following commands:

git clone git@github.com:gravitational/webapps.git
cd webapps
make build-teleport

Then you can replace Teleport Web UI files with the files from the newly-generated /dist folder.

To enable speedy iterations on the Web UI, you can run a local web-dev server.

You can also tell Teleport to 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:

# 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. For instructions about how to update the Web UI, read the webapps README file.

Updating Web UI assets

After you commit a change to the webapps repo, you need to update the Web UI assets in the webassets/ git submodule.

Run make update-webassets to update the webassets repo and create a PR for teleport to update its git submodule.

You will need to have the gh utility installed on your system for the script to work. For installation instructions, read the GitHub CLI installation documentation.

Managing dependencies

All dependencies are managed using Go modules. Here are the instructions for some common tasks:

Add a new dependency

Latest version:

go get github.com/new/dependency

and update the source to use this dependency.

To get a specific version, use go get github.com/new/dependency@version instead.

Set dependency to a specific version

go get github.com/new/dependency@version

Update dependency to the latest version

go get -u github.com/new/dependency

Update all dependencies

go get -u all

Debugging dependencies

Why is a specific package imported?

go mod why $pkgname

Why is a specific module imported?

go mod why -m $modname

Why is a specific version of a module imported?

go mod graph | grep $modname

Why did We Build Teleport?

The Teleport creators used to work together at Rackspace. We noticed that most cloud computing users struggle with setting up and configuring infrastructure security because popular tools, while flexible, are complex to understand and expensive to maintain. Additionally, most organizations use multiple infrastructure form factors such as several cloud providers, multiple cloud accounts, servers in colocation, and even smart devices. Some of those devices run on untrusted networks, behind third-party firewalls. This only magnifies complexity and increases operational overhead.

We had a choice, either start a security consulting business or build a solution that's dead-easy to use and understand. A real-time representation of all of your servers in the same room as you, as if they were magically teleported. Thus, Teleport was born!

More Information

Support and Contributing

We offer a few different options for support. First of all, we try to provide clear and comprehensive documentation. The docs are also in Github, so feel free to create a PR or file an issue if you have ideas for improvements. If you still have questions after reviewing our docs, you can also:

  • Join Teleport Discussions to ask questions. Our engineers are available there to help you.
  • If you want to contribute to Teleport or file a bug report/issue, you can create an issue here in Github.
  • If you are interested in Teleport Enterprise or more responsive support during a POC, we can also create a dedicated Slack channel for you during your POC. You can reach out to us through our website to arrange for a POC.

Is Teleport Secure and Production Ready?

Teleport is used by leading companies to enable engineers to quickly access any computing resource anywhere. Teleport has completed several security audits from the nationally recognized technology security companies. We make some of our audits public, view our latest audit reports. 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.

You can find the latest stable Teleport build on our Releases page.

Who Built Teleport?

Teleport was created by Gravitational Inc. We have built Teleport by borrowing from our previous experiences at Rackspace. Learn more about Teleport and our history.