Commit graph

24 commits

Author SHA1 Message Date
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
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
mricher b58cb051e8
Correct various typos
This was fixed running the `misspell` linter in fix mode using
`gometalinter`. The exact command I ran was :
```
gometalinter --vendor --disable-all -E misspell --linter='misspell:misspell -w {path}:^(?P<path>.*?\.go):(?P<line>\d+):(?P<col>\d+):\s*(?P<message>.*)$' ./...
```

Some typo were fixed by hand on top of it.
2017-10-20 10:20:26 +02:00
Sasha Klizhentas aa62a1d627 document the discovery algo 2017-10-09 19:59:14 -07:00
Sasha Klizhentas f12024031a more work on logging and stats 2017-10-09 18:58:24 -07:00
Sasha Klizhentas eb4cfa12d9 refactoring complete 2017-10-08 23:07:39 -07:00
Sasha Klizhentas bb5f77854e before refactoring 2017-10-08 18:07:01 -07:00
Sasha Klizhentas 6e4d6b0cb2 more work, discovery works 2017-10-07 18:11:03 -07:00
Sasha Klizhentas 53f4a0128e introduce curiosity protocol and fix logs 2017-10-06 15:38:15 -07:00
Sasha Klizhentas a2cd00de8f a bit of refactoring 2017-10-05 18:41:59 -07:00
Sasha Klizhentas 8b81a0c384 Migrate to golang/dep for dependency management
Update following packages:

* Replace Sirupsen/log with sirupsen/log everywhere
* Update etcd client to 3.2.4
* Update docker/term to moby/term
* Update kr/pty to v1.0.0 release
* Update K8s client to 2.0
2017-08-22 15:30:30 -07:00
Sasha Klizhentas 3c2570fa35 Sasha High Availability. 2017-04-07 16:54:15 -07:00
Sasha Klizhentas 3a7db7d29c SSH server tests recovered 2016-12-30 12:20:48 -08:00
Ev Kontsevoy b4a6a4f972 Cleaned up Teleport logging
* Downgraded many messages from `Debug` to `Info`
* Edited messages so they're not verbose and not too short
* Added "context" to some
* Added logical teleport component as [COMPONENT] at the beginning of
  many, making logs **vastly** easier to read.
* Added one more logging level option when creating Teleport (only
  Teleconsole uses it for now)

The output with 'info' severity now look extremely clean.
This is startup, for example:

```
INFO[0000] [AUTH]  Auth service is starting on turing:32829  file=utils/cli.go:107
INFO[0000] [SSH:auth] listening socket: 127.0.0.1:32829  file=sshutils/server.go:119
INFO[0000] [SSH:auth] is listening on 127.0.0.1:32829    file=sshutils/server.go:144
INFO[0000] [Proxy] Successfully registered with the cluster  file=utils/cli.go:107
INFO[0000] [Node] Successfully registered with the cluster  file=utils/cli.go:107
INFO[0000] [AUTH] keyAuth: 127.0.0.1:56886->127.0.0.1:32829, user=turing  file=auth/tun.go:370
WARN[0000] unable to load the auth server cache: open /tmp/cluster-teleconsole-client781495771/authservers.json: no such file or directory  file=auth/tun.go:594
INFO[0000] [SSH:auth] new connection 127.0.0.1:56886 -> 127.0.0.1:32829 vesion: SSH-2.0-Go  file=sshutils/server.go:205
INFO[0000] [AUTH] keyAuth: 127.0.0.1:56888->127.0.0.1:32829, user=turing.teleconsole-client  file=auth/tun.go:370
INFO[0000] [AUTH] keyAuth: 127.0.0.1:56890->127.0.0.1:32829, user=turing.teleconsole-client  file=auth/tun.go:370
INFO[0000] [Node] turing connected to the cluster 'teleconsole-client'  file=service/service.go:158
INFO[0000] [AUTH] keyAuth: 127.0.0.1:56892->127.0.0.1:32829, user=turing  file=auth/tun.go:370
INFO[0000] [SSH:auth] new connection 127.0.0.1:56890 -> 127.0.0.1:32829 vesion: SSH-2.0-Go  file=sshutils/server.go:205
INFO[0000] [SSH:auth] new connection 127.0.0.1:56888 -> 127.0.0.1:32829 vesion: SSH-2.0-Go  file=sshutils/server.go:205
INFO[0000] [Node] turing.teleconsole-client connected to the cluster 'teleconsole-client'  file=service/service.go:158
INFO[0000] [Node] turing.teleconsole-client connected to the cluster 'teleconsole-client'  file=service/service.go:158
INFO[0000] [SSH] received event(SSHIdentity)             file=service/service.go:436
INFO[0000] [SSH] received event(ProxyIdentity)           file=service/service.go:563
```
You can easily tell that auth, ssh node and proxy have successfully started.
2016-09-02 17:28:18 -07:00
Ev Kontsevoy 126a9e9ff8 Minor bugs regarding reverse tunnels
- Friendly error messages when parsing configuration and establishing
  connection

- Bugs related to "first start" vs subsequent starts (reverse tunnells
  added to YAML file won't be seen upon restart)

- Nicer logging
2016-06-09 19:17:07 -07:00
Roman Tkachenko 38470803cc Do not lose an error on reverse tunnel startup 2016-06-06 21:43:29 -07:00
Ev Kontsevoy 6f111e39e2 Removed lunk + old events + old recorder 2016-04-26 17:39:46 -07:00
Ev Kontsevoy 8cb2716373 Refactoring of reverse tunnel agent
- reduced number of goroutines
- reduced number of 'sleep constants', settling on just one:
  `defaults.HeartbeatPeriod`
- increased the interval

Fixes #358
2016-04-17 15:45:24 -07:00
klizhentas d68e693cad migrate to trace errors 2016-04-12 11:07:14 -07:00
Ev Kontsevoy c0ba0cffff Dynamic ports for integration testing 2016-04-11 16:32:38 -07:00
Ev Kontsevoy 757c34a755 Added the ability to stop teleport without restarting the process 2016-04-03 12:17:28 -07:00
klizhentas ca7e3820d7 This commit adds ability to preconfigure the cluster without running
auth server. This is needed when you configure cluster from scratch and
all nodes including auth server spin up simultaneously.

* Add tctl tools to generate keys and certificates

  + Command "tctl authorities gen" generates public and private keypair.
  + Command "tctl authorities gencert" generates public and private keypair signed
    by existng private key
  + Command "tctl authorities export" was modified to be able to export exisitng private
    CA keys to local storage

   All of these commands are hidden by default.

section "static configuration"

* Add ability to configure teleport from environment variable

Environment variable TELEPORT_CONFIG can contain base64 encoded
YAML file config file of the standard file format, so teleport will use it on start

* Add special secrets section to the config file

Section "secrets" was updated to support pre-configured trusted CA keys and pre-generated keys

* Add special rts hidden section to add support for provisioning
2016-03-28 12:58:34 -07:00
Ev Kontsevoy a07b3226b8 Added supporto for user home directory for scp 2016-03-21 23:47:57 -07:00
klizhentas 6edd6675e6 re-introduce reverse tunnels into teleport
Reverse tunnels are now first class citizens of teleport.
There's no longer static configuration for reverse tunnel agents
in the config. Instead, admins can add and remove reverse tunnels
using tctl reversetunnel (hidden) commands.

* tctl reversetunnel ls
  lists reverse tunnels

* tctl reversetunnel upsert a.example.com 10.0.0.4:2023,10.0.0.5:2033 --ttl=10m
  updates or inserts reverse tunnel for 10 minutes

* tctl reversetunnel del a.example.com
  deletes a reverse tunnel

Teleport proxies watch changes in the reverse tunnels on the backend and
spin up / spin down reverse tunnels according to these changes.
2016-03-18 17:13:22 -07:00