Commit graph

1669 commits

Author SHA1 Message Date
Ev Kontsevoy cde3086f0d Fixes #494
This commit is re-applying a fix from August 8:
bedc5d59fd723e50675bb2eaefc0494079e66ea0

Somehow it got lost and did not ever get merged into master.
2016-09-14 14:26:59 -07:00
Ev Kontsevoy fae9ebf0f5 Removed excessive logging 2016-09-12 22:53:07 -07:00
Ev Kontsevoy bbc6103746 Internal version bump 2016-09-12 21:39:29 -07:00
Alexander Klizhentas 137cd88439 Merge pull request #531 from gravitational/ev/529
Bufix: certificate expiration issue
2016-09-12 18:12:24 -07:00
Ev Kontsevoy 8376c5f34a Merge pull request #530 from gravitational/ev/replay
Better Replay-on-Join
2016-09-12 18:04:50 -07:00
Ev Kontsevoy d0e6e42015 Bufix: certificate expiration issue
This commit closes #529

Teleport was using nanoseconds to set the certificate expiration,
instead of milliseconds.

Changes:

- Switched from nanoseconds to seconds
- Switched from UTC to native time (because that's what golang/x/ssh
  uses internally)
2016-09-12 17:55:31 -07:00
Ev Kontsevoy 1a8ea95633 Merge pull request #526 from gravitational/ev/client
Support for "allocate TTY" option when launching commands via SSH
2016-09-12 12:31:09 -07:00
Alexander Klizhentas 200b9bd935 Merge pull request #528 from gravitational/ev/teleconsole
Small changes to the "integration" package
2016-09-12 11:16:14 -07:00
Ev Kontsevoy 155c53965e Small changes to the "integration" package
This is to support Teleconsole/Telecast features, namely:

- When a user is added programmatically, it's actually returned.
- When a server is being created, it will not create users if
  they exist already, instead it will just sign their public keys
2016-09-11 19:33:52 -07:00
Ev Kontsevoy ae4c9fe613 Merge branch 'ev/client' into ev/replay 2016-09-10 21:59:42 -07:00
Ev Kontsevoy a6127227f3 Proper handling of attached/detached terminals
Also Teleport now will try to get the type of terminal you're already
on, looking at $TERM
2016-09-10 21:59:16 -07:00
Ev Kontsevoy 9190c7272a Made replay-on-join more enjoyable
People have been complaining that upon joining a Teleport session they
do not always see anything.

While teleport instanly replays the most recent chunk, the chunk itself
could be anything: backspace, space, enter, etc. So often people are
greeted with a blank screen.

This commit replays the last 20 writes, which always gvies a newly
joined party a nice perspective on what's been going on.

Also, fixed unlikely-to-happen but still real race condition.
2016-09-09 23:15:04 -07:00
Ev Kontsevoy df6f60d1b7 Proper handling of attached/detached terminals and fixed tests... 2016-09-09 21:44:04 -07:00
Ev Kontsevoy a447cfa3d2 Merge remote-tracking branch 'origin/master' into ev/client 2016-09-09 20:33:46 -07:00
Alexander Klizhentas 9989f6136e Merge pull request #527 from gravitational/ev/517
Re-vendored new version of cstrings
2016-09-09 12:01:09 -07:00
Ev Kontsevoy 0f6be57fdb Re-vendored new version of cstrings
Fixes #517
2016-09-09 11:53:22 -07:00
Ev Kontsevoy 53ec3015e7 Merge branch 'ev/client' of github.com:gravitational/teleport into ev/client 2016-09-08 22:35:39 -07:00
Ev Kontsevoy 4aa39f0897 Added '-t' flag
This means "allocate TTY"
2016-09-08 21:38:45 -07:00
Ev Kontsevoy 6d6ce690d2 Added '-t' flag
This means "allocate TTY"
2016-09-08 21:29:47 -07:00
Ev Kontsevoy 6fcfe39e06 Discovered a bunch of errors with interactive mode 2016-09-08 00:01:30 -07:00
Ev Kontsevoy 7301cdfcb4 Massive refactoring kind of works 2016-09-07 23:00:27 -07:00
Ev Kontsevoy 85d6fbdc24 Started moving stuff into "node session" 2016-09-07 21:47:45 -07:00
Ev Kontsevoy db4558ddda Client refactorings
- Broke apart huge runShell() and runCommand() functions
- Introduced "client session" object which now holds context for a
  session on the client.
2016-09-07 19:15:08 -07:00
Ev Kontsevoy 50fbc5855f Merge pull request #523 from gravitational/ev/no-recording
Implemented a new Teleport option: "no recording"
2016-09-05 22:43:23 -07:00
Ev Kontsevoy c7b4934553 Implemented a new Teleport option: "no recording"
Teleport configuration now has a new field: NoAudit (false by default,
which means audit is always on).

When this option is set, Teleport will not record events and will not
record sessions.

It's implemented by adding "DiscardLogger" which implements the same
interface as teh real logger, and it's plugged into the system instead.

NOTE: this option is not exposed in teleport in any way: no config file,
no switch, etc. I quickly needed it for Telecast.
2016-09-05 22:12:57 -07:00
Ev Kontsevoy c1efa712a1 Testing something... 2016-09-04 23:02:50 -07:00
Ev Kontsevoy c36ffd3cff Fixed the bug in the client (it was ignoring mulit-byte inputs) 2016-09-02 22:18:45 -07:00
Alexander Klizhentas 430890456b Merge pull request #520 from gravitational/ev/llog
Cleaned up Teleport logging
2016-09-02 18:55: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
Alexander Klizhentas 51fa0531aa Merge pull request #519 from gravitational/ev/timer-leak
Fixed severe timer leak
2016-08-28 19:51:18 -07:00
Ev Kontsevoy 2659e4e350 Fixed severe timer leak
Without this leak Teleport CPU utilization is very slowly increasing
over time.
2016-08-28 17:31:57 -07:00
Ev Kontsevoy 853ce11b74 Minor changes
- Improved integration testing
- Added more logging around weird tunnel connectivity issue
2016-08-28 14:01:57 -07:00
Ev Kontsevoy f6b2d56542 Fixed timer leak 2016-08-28 12:50:52 -07:00
Ev Kontsevoy 1a4a18b6cb Merge branch 'ev/forwarding' into ev/noweb 2016-08-26 12:19:18 -07:00
Ev Kontsevoy 20ed9dae8e Merge branch 'ev/noweb' of github.com:gravitational/teleport into ev/noweb 2016-08-26 12:18:07 -07:00
Ev Kontsevoy f262ccc811 Merge remote-tracking branch 'origin/master' into ev/noweb 2016-08-26 12:17:52 -07:00
Alexander Klizhentas bf0391f8f4 Merge pull request #516 from gravitational/ev/sizebug
Bugfix for #515
2016-08-26 10:58:01 -07:00
Ev Kontsevoy 79152b2d08 Minor code refactoring
Moved code which parses OpenSSH-style port forwarding spec (-L flag)
from tsh/main into lib/client
2016-08-25 22:12:08 -07:00
Ev Kontsevoy 6c5489e9cf Enabled port forwarding for joined sessions 2016-08-25 21:19:22 -07:00
Ev Kontsevoy 20c0d85341 Merge remote-tracking branch 'origin/master' into ev/noweb 2016-08-25 21:04:18 -07:00
Ev Kontsevoy 936d6a252b DisableWebUI implementation
We had this flag in the configuration forever, but apparently it was
being ignored.

It allows teleport proxy to start without HTTP UI enabled. This is
useful for proxies that strictly proxy and do nothing else.

I ran into this bug when I first time used this flag for Telecast, it
did not work, so I fixed it.
2016-08-25 20:02:48 -07:00
Ev Kontsevoy 5525ac753d Update README.md 2016-08-25 17:30:36 -07:00
Ev Kontsevoy f63c1bba97 Update README.md
fixed broken link in readme
2016-08-25 17:28:40 -07:00
Ev Kontsevoy 330965e647 Update README.md 2016-08-25 17:27:58 -07:00
Ev Kontsevoy c1991a90a5 Update README.md
Expanded the Status section
2016-08-25 17:27:13 -07:00
Ev Kontsevoy c28238cb47 Bugfix:
Teleport join did not handle window size properly.
2016-08-24 23:37:14 -07:00
Ev Kontsevoy 45ace125a7 Merge pull request #509 from gravitational/ev/leak
Ev/leak
2016-08-24 10:17:13 -07:00
Ev Kontsevoy f01da3dbed Changes from PR 2016-08-23 16:03:24 -07:00
Ev Kontsevoy ec880ae700 Fixed resource leaks and removed dead code
Refs #508
2016-08-21 23:19:09 -07:00
Ev Kontsevoy 2646002a51 Improvement to help aid debugging
- Added more trace.Wrap() calls
- Added callback to control shell creation/destruction
2016-08-21 21:49:24 -07:00