Commit Graph
594 Commits
Author SHA1 Message Date
Sasha Klizhentas 81c69851e2 tctl add upsert, get 2016-12-20 19:19:44 -08:00
Sasha Klizhentas 41a4d2872c Merge branch 'sasha/corruption' into sasha/rbac 2016-12-20 11:06:16 -08:00
Sasha Klizhentas 13d61781b7 recover auth server tests 2016-12-18 12:00:17 -08:00
Ev Kontsevoy 95aa7f1e1c Better timeout handling
ObeyTimeouts() facility was handling errors more arggessively than
needed.

So if you pass net.Conn implementation which does not support timeouts,
it would simply fail on every read() and write() instead of ignoring
them.

Now it ignores them.
2016-12-14 18:08:40 -08:00
Sasha Klizhentas 0adebbcec6 continue work on roles 2016-12-08 18:43:37 -08:00
Ev Kontsevoy aa680fc3c9 New TimeoutConn class
Allows to construct network connections with read/write timeouts.
+ tests
2016-10-23 16:42:15 -07:00
Ev Kontsevoy 900a944927 Sensible default environment variables
Fixes #542
2016-10-07 18:43:31 -07:00
dmitri 9decde57cc tctl: do not create datadir/host_uuid if none has been found - if the
client runs with elevated permissions and the command fails (for
instance, when the auth server state has not yet been generated), it
will leave the file behind possibly making further attempts to properly
generate content in data directory by a lower-privilege process impossible.
2016-09-22 13:43:58 +02:00
Johannes Pfrang 58b6781fa5 Fixes possible TestGetShell failure
Some distros (e.g. arch) use `/usr/bin/nologin` instead of `/usr/sbin/nologin` for the daemon account
2016-09-19 23:06:55 +02:00
Ev Kontsevoy a2c7b3c100 Version bump
Also improved the error message for self-signed certificates
Fixes #511
2016-09-15 16:57:00 -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 e932dbe5c3 Fixed the regression with GuessAdvertiseIP()
Fixes #486
2016-08-04 16:23:00 -07:00
dmitri 43ba205566 Cover the missing edge cases to replicate the old behavior:
- use arbitrary IP address if none from the preference list matched
  - fallback to loopback if no suitable address has been found
2016-06-24 23:39:50 +02:00
dmitri 98be2a591b Fix GuessHostIP to correctly ignore IPv6 addresses and follow the
defined order of address preferences.
2016-06-24 18:43:50 +02:00
Ev Kontsevoy d3671fd922 Release of version 1.0.0 of Teleport
Woo!
2016-06-15 10:50:45 -07:00
Ev Kontsevoy 828e6a77aa Simpler version implementation 2016-06-14 18:03:06 -07:00
Ev Kontsevoy a71af867a0 Merge remote-tracking branch 'origin/master' into ev/tunnels 2016-06-11 20:17:35 -07:00
Ev Kontsevoy 6383b755c5 Multi-cluster tsh
`tsh` has always supported reverse tunnels via undocumented "sites"
command.

This commit:

1. Renames "sites" to "clusters" to be consistent with the rest of
   Teleport naming conventions
2. Adds --cluster flag to `tsh ssh`
3. Updates the User Manual in the documentation dir

Refs #437
2016-06-11 20:04:53 -07:00
Roman Tkachenko a44dca17e4 Add marshalling function to NetAddr 2016-06-10 00:11:31 -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
Ev Kontsevoy 0ae6270c05 Proxy HTTPS fixes
- Self-signed cert is now compatible with Golang HTTP client
- Fixes #296
- Changed the expiration date for self-signed cert
  from 1 to 10 years.
2016-06-01 14:38:27 -07:00
Ev Kontsevoy ed0948659b Changed how self-signed HTTPS cert is generated
Fixes #434

Changes:

- Certificate is not "CA" anymore
- Added "*" for CN field
2016-05-31 18:36:51 -07:00
Ev Kontsevoy 48a74fbeca Intermediate commit (scp up/down works agaisnt openSSH servers) 2016-05-26 14:46:56 -07:00
Ev Kontsevoy dc87ef5aec Clean error reporting for SSH exec
- stdout and stderr are separated
- exit status is inherited by tsh
2016-05-24 18:00:26 -07:00
Ev Kontsevoy 9c5235ac90 Minor changes 2016-05-23 23:56:45 -07:00
Ev Kontsevoy 2d566ecbe2 Intermediate commit 2016-05-23 15:50:53 -07:00
Ev Kontsevoy 64393d8d27 Fixed tests 2016-05-20 20:09:13 -07:00
Ev Kontsevoy d7f756cac1 Auth server heartbeat presence cleanup 2016-05-20 17:14:04 -07:00
Ev Kontsevoy e9730cc925 Implemented automatic-advertise-ip routine
Refs #416
2016-05-18 09:47:24 -07:00
Ev Kontsevoy 8e670c82a8 Cross-platform shell detection 2016-05-17 14:02:58 -07:00
Ev Kontsevoy 6938f494dc Added a more portable way to determine shell
Thanks to @gkappel
References #376
2016-05-17 12:33:18 -07:00
Ev Kontsevoy 49256d1c23 Merge remote-tracking branch 'origin/master' into ev/multi-role
Conflicts:
	lib/auth/tun.go
2016-05-17 10:53:36 -07:00
Ev Kontsevoy eff737a104 Improved shell detection
Fixes #376
2016-05-14 17:17:16 -07:00
Ev Kontsevoy 8b3d237252 Added unit tests to cover role set operations 2016-05-11 22:27:06 -07:00
Ev Kontsevoy 389e0a1a75 Started working on multi-site, multi-cluster demo via Docker 2016-05-09 16:27:50 -07:00
Ev Kontsevoy 5c4b45caaa Full OSX compatibility
Teleport has always worked on OSX, but not all tests were OSX
compatible:

- some wouuld hang
- others would fail

This commit fixes that. `make test` passes on OSX.
2016-05-09 00:21:21 -07:00
Ev Kontsevoy bd9ad5782c Merge remote-tracking branch 'origin/master' into ev/log 2016-05-08 11:53:57 -07:00
Ev Kontsevoy fcb9e7e799 Tried to make the error message better
When a user tries to login with a non-existing mapping (local OS does
not know anything about 'vince') he gets an ugly message:

"ERROR: cannot start shell"

Instead I wanted to show a nicer "host 'turing' does not have a local
user 'vince'"

The closest I could get was a generic 'access denied' + an informative
logging message in teleport logs.
2016-05-06 22:49:03 -07:00
Ev Kontsevoy e10612028e Preparations for a PR
Fixes #394
2016-05-06 20:48:02 -07:00
Ev Kontsevoy f27e207afc Replaced weg sockets with HTTP POST/GET chunks 2016-05-05 23:51:56 -07:00
Ev Kontsevoy bf4d053764 UGHHHH!!! 2016-05-04 20:38:14 -07:00
Ev Kontsevoy ce1c4d4a38 A great number of bugfixes:
- replay now works in both web and CLI
- fixed two nasty connection bugs in web sessions
- removed verbose logging/diagnostics
- refactoring of web code by Alexey
2016-05-03 21:30:17 -07:00
Ev Kontsevoy d36fced780 Added multi-party real-time window size support 2016-05-02 23:21:13 -07:00
Ev Kontsevoy 71ce427b20 Minor code cleanup 2016-05-02 16:23:26 -07:00
Ev Kontsevoy 3035f2bc79 Bugfix 2016-05-02 15:52:58 -07:00
Ev Kontsevoy baab8a4707 bugfix 2016-05-02 15:44:50 -07:00
Ev Kontsevoy 6534aaa473 Switched web socket to text mode 2016-05-02 15:38:39 -07:00
Ev Kontsevoy e3c843a655 New implementation of socket streaming 2016-05-02 15:26:13 -07:00
Ev Kontsevoy 43b224183d Intermediate commit: basic session bookkeeping in SessionLogger 2016-04-26 17:39:46 -07:00
klizhentas d754821f54 move test as well 2016-04-22 17:32:52 -07:00