Commit graph

90 commits

Author SHA1 Message Date
Ev Kontsevoy d046eaee20 Merge branch 'master' into ev/i 2017-06-11 21:54:41 -07:00
Ev Kontsevoy 37319d6b41 Implemented identity loading
First part of addressing #1033 is ability to load credentials from the
credentials file(s).

This commit adds -i flag processing, i.e. a certificate can be fed via a
cert.file and used to login.
2017-06-11 13:37:42 -07:00
Russell Jones 084c8274b4 Allow configuration of the ciphers, KEX algorithm, and MAC algorithms
for node and proxy.
2017-06-11 12:16:10 -07:00
Ev Kontsevoy cdfb15fd82 scp compatibility improvements 2017-06-09 10:48:21 -07:00
Ev Kontsevoy 0ce13c8b1b Fixed shell globbing for scp 2017-06-08 22:18:09 -07:00
Ev Kontsevoy 99672d09a7 Fixed scp regressions
In this commit:

1. Minor addition to Makefile to pull new .go files from
   tool/teleport/common

2. os.Glob() returns an empty list (instead of an error) if the
   file/pattern is not found, so added check for that.

3. sendFile was prematurely sending 'C' command before trying to open a
   file. This used to lead to creation of empty files for invlaid
   sources.

Also, removed some confusing comments.
2017-03-29 16:49:40 -07:00
Russell Jones f7934b5be4 Set default PTY size if an invalid size is requested and
correctly split command.
2017-03-21 16:50:07 -07:00
Sasha Klizhentas 320dc0c57d fix window resize for OpenSSH, fixes #800 2017-03-16 11:20:35 -07:00
Sasha Klizhentas db08d896f1 agent forwarding test 2017-03-08 21:29:30 -08:00
Ev Kontsevoy a7aa9b4c93 Final cleanup in preparation for PR 2017-02-23 17:57:28 -08:00
Ev Kontsevoy 80df1bbc2d scp fixes
- added file globbing for "sink"
- added proper handling of directory copying into an existing target [1]

[1] compatible with OpenSSH behavior
2017-02-23 00:37:13 -08:00
Ev Kontsevoy f5022149c8 Fixed "double echo" scp issue
Refs #771
2017-02-18 23:52:56 -08:00
Ev Kontsevoy 19f666370f Web UI now passes the true client IP into SSH sessions
This commit closes #735 this is how it works:

- When a web-based client creates a Teleport Client object, it now
  passes the true client IP (as taken from HTTP requests) into the
  created SSH-to-proxy session via an environment variable.

- The Teleport proxy interprets that variable when it dials the
  destination server and passes it on using the same handshake protocol
  as a regular teleport CLI client.
2017-02-06 14:45:44 -08:00
Ev Kontsevoy c3b57a8bb5 Removed the old web-based client code 2017-02-03 12:08:09 -08:00
Ev Kontsevoy 9a16ac4dff SSH keepalive implementation + refactoring
The base SSH server implementation now sends SSH keepalive at ta rate of
1/4 of "idle timeout" constant. The client properly responds to keepalive
pings.

The SSH client, instead of creating 2 goroutines for handling SSH
requests and SSH channels now uses the same (existing) goroutine with
for-loop + select statement.
2017-01-30 16:53:10 -08:00
Ev Kontsevoy 8330658526 Fixed haning tests 2017-01-15 16:28:18 -08:00
Ev Kontsevoy 23b01e3cd2 PR comments
Addressed comments from #681
2016-12-30 16:14:07 -08:00
Ev Kontsevoy db2c09e630 Fixed tests 2016-12-30 15:01:27 -08:00
Ev Kontsevoy 4f009e2259 Finished the implementation of a proper "client IP" 2016-12-30 13:50:22 -08:00
Ev Kontsevoy 2035ace860 Dead code elimination and more comments
This commit does not change the behavior
2016-12-30 12:30:55 -08:00
Ev Kontsevoy ed8604f757 Semi-serious connection overhaul of Teleport SSH
- Added idle timeout handling to every SSH connection.
- A bit of code refactoring (removing unused code paths)

Most importantly:

Added a custom SSH handshake between SSH Teleport proxies
and SSH Teleport servers. This handshake sends a custom JSON payload
from a proxy to a server, allowing to exchange additional information,
like the true IP of a client.
2016-12-30 01:21:28 -08:00
Ev Kontsevoy c6c77a183c SCP improvements
- Removed strange handling of the ending / symbol, causing directories
  not being created. Fixes #606

- Added per-file progress indicator (reports "XXX uploaded").
2016-11-03 20:06:43 -07:00
Ev Kontsevoy 380d2f366b Preliminary SCP work
1) -r flag handling

   Proper handling of `-r` flag on the tsh side (recursive).
   Prior to this commit it was all uploads were _always_ recursive.

2) less verbose logging.

   Replaced a bunch of log.Info() with log.Debug()
2016-11-03 18:07:39 -07: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 7c3b74d8ff PR comments - implemented! 2016-05-27 11:26:48 -07:00
Ev Kontsevoy ce3bbbde3f SCP error messages are proper now
`tsh scp` now reports the same error messages as OpenSSH scp:

- when talking to Teleport servers
- when talking to OpenSSH servers
2016-05-26 18:00:40 -07:00
Ev Kontsevoy 48a74fbeca Intermediate commit (scp up/down works agaisnt openSSH servers) 2016-05-26 14:46:56 -07:00
Ev Kontsevoy 6e6e951650 Intermediate commit 2016-05-25 22:33:07 -07:00
Ev Kontsevoy 2d566ecbe2 Intermediate commit 2016-05-23 15:50:53 -07:00
Ev Kontsevoy b175d92052 PR comments - implemented! 2016-05-07 21:51:35 -07:00
Ev Kontsevoy e10612028e Preparations for a PR
Fixes #394
2016-05-06 20:48:02 -07:00
Ev Kontsevoy 9d2a5c3536 Buffer overflow issue 2016-05-06 13:37:11 -07:00
Ev Kontsevoy d36fced780 Added multi-party real-time window size support 2016-05-02 23:21:13 -07:00
Ev Kontsevoy 98568578ea Quick size fix 2016-05-02 20:39:11 -07:00
Ev Kontsevoy bec224fe97 Dirty size pushing 2016-05-02 19:12:16 -07:00
Ev Kontsevoy 17268c0c73 Removed extra UTF-8 encoding 2016-05-01 22:25:54 -07:00
Ev Kontsevoy 5629f76868 Added utf-8 encoding of terminal streams 2016-04-29 00:55:58 -07:00
Ev Kontsevoy 69177fd751 Almost fixed tests 2016-04-28 21:44:18 -07:00
Ev Kontsevoy 5e01bc3d55 Merge branch 'ev/log' of github.com:gravitational/teleport into ev/log 2016-04-28 17:42:14 -07:00
Ev Kontsevoy 29d5ef454d Audit log improvements
Added clear separation between 'user' (Teleport user) and 'login' (OS
host login)
2016-04-26 17:41:04 -07:00
Ev Kontsevoy 2e099cdd0b Added full audit event support for:
- Port forwarding
- SCP up/down
- Auth attempts
2016-04-26 17:41:04 -07:00
klizhentas d68e693cad migrate to trace errors 2016-04-12 11:07:14 -07:00
Ev Kontsevoy 6ac710f308 Nicer inetgration package 2016-04-11 16:32:37 -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
klizhentas bba45fceae fix unsync in scp client impplementation, recover tests, fixes #274 2016-03-22 10:40:26 -07:00
Ev Kontsevoy a07b3226b8 Added supporto for user home directory for scp 2016-03-21 23:47:57 -07:00
Ev Kontsevoy e2c495bb76 Merge remote-tracking branch 'origin/master' into ev/scp-bug 2016-03-21 22:13:25 -07:00
klizhentas 942318c576 resize terminal 2016-03-20 12:30:50 -07:00
Ev Kontsevoy a7d28971ac Refactoring
1. Removed scp.Server structure. It is redundant and doesn't add
   anything on top of scp.Command

2. Added user.User instance to scp.Command, so it now knows who
   the owner of uploaded files is.
2016-03-19 13:10:27 -07:00