Commit graph

159 commits

Author SHA1 Message Date
klizhentas 0e503ca376 Add proper integration with OpenSSH on both sides 2016-03-09 19:39:15 -08:00
klizhentas 519f07611b fix data races and remove sleep from tests
* fix data race with advertise ip
* remove global variable
* simplify pings logic and fix ping bug
* fix potential bug in dynamic labels
2016-03-08 18:41:05 -08:00
Ev Kontsevoy 39382dc41a tsh ls works
similarly to tctl nodes ls
closes #181
2016-03-08 16:30:32 -08:00
Ev Kontsevoy 9dc5b62b47 Merge remote-tracking branch 'origin/master' into ev/token-handling 2016-03-08 15:04:24 -08:00
klizhentas 35852bdca9 remove hangouts, report errors from subsystems, refs #179 2016-03-08 12:02:45 -08:00
Ev Kontsevoy 9052c62c1f Fixes #210
Ok this commit is rather large for a seemingly "simple" problem. In
reality, the problem isn't simple.

Changes:

1. I refactored lib/service/service.go : I created a new structure called
   TeleportProcess. It wraps the configuration and various callbacks together.
   It made the code in that file MUCH easier to follow because functions
   do not require 5+ parameters anymore.

2. Created loginToAuthService() method which is now used in two places:
   1. On start-up
   2. Immediately after registration.
   This way both actions can be combined in the same loop, so if
   _either_ one succeeds, the daemon successfuly starts.

3. Added support for multiple auth servers. Everywhere in our code we
   always go for conf.AuthServers[0].Addr. So at least in this code
   there's a proper loop.

4. Added a nicer logging around "failed to join the cluster", where I
   suggest to try --token flag when it's missing.

5. Fixed tests broken by other commits (unrelated to this)

Fixes #210
2016-03-07 23:37:49 -08:00
Ev Kontsevoy 3bed94a7c6 Hostname handling changes:
1. `--name` setting is passed through into AuthServer as "AuthServiceName".
   This will be used in UIs when there are multiple clusters, and also
   in places like Google Authenticator

2. `tctl nodes ls` now lists both host name and host UUID

3. Changed `--name` setting to `--nodename` to be consistent with the
   config file.

Closes #194
2016-03-05 16:54:58 -08:00
Ev Kontsevoy 6151ab208a Bugfix: --proxy=localhost did not work
`web.SSHAgentLogin(proxyAddr string)` expects proxyAddr string to be a
URL, while everywhere else we address servers by host:port pair.

Because of that, `--proxy=host` sytax was broken.
2016-03-04 20:14:41 -08:00
Ev Kontsevoy 2d66f99f48 Adding new host does not require a name 2016-03-04 18:13:00 -08:00
Ev Kontsevoy cf36192575 Merge branch 'master' into ev/194 2016-03-04 17:27:11 -08:00
Ev Kontsevoy 39b90c21b6 Merge remote-tracking branch 'origin/master' into ev/183
Conflicts:
	.gitignore
	web/dist/app/app
2016-03-04 16:53:54 -08:00
Ev Kontsevoy 42f55959ed Intermediate commit 2016-03-04 16:27:52 -08:00
Ev Kontsevoy f9aa87a2f5 --token and --name are not mandatory anymore...
... when a teleport node re-joins the cluster who already trusts it
refs #187
2016-03-03 17:11:42 -08:00
Ev Kontsevoy a3474e0d87 Updated https key/cert generation (code cleanup) 2016-03-03 15:29:11 -08:00
Ev Kontsevoy 75fcb39f04 Intermediate commit 2016-03-02 17:37:11 -08:00
Ev Kontsevoy a3df6e6768 Added client-side validation of advertise-ip 2016-03-01 22:18:50 -08:00
Ev Kontsevoy 0d476caae7 Merge branch 'master' into ev/183
Conflicts:
	lib/auth/api_with_roles.go
2016-03-01 18:33:26 -08:00
Ev Kontsevoy eeaadb913a Added --advertise-ip flag to teleport server 2016-03-01 18:24:20 -08:00
klizhentas 583d1e06ac Merge branch 'master' into web
Conflicts:
	lib/client/client_test.go
	lib/srv/srv.go
	web/dist/app/app
2016-03-01 14:01:01 -08:00
klizhentas 59b16d1ca4 rename to terminal params 2016-03-01 13:26:15 -08:00
Ev Kontsevoy b46cae4c4a Added multi-host operation to TSH
- `tsh ls` now accepts label filters
- `tsh ssh` now can use labels instead of a direct host name
2016-02-29 19:00:45 -08:00
Ev Kontsevoy 30b1e1b502 Added label parsing routine 2016-02-29 19:00:45 -08:00
Ev Kontsevoy 82a0299053 Intermediate commit 2016-02-29 19:00:45 -08:00
Ev Kontsevoy 70fd2b9bfa TSH test coverate + ssh commands (instead of shell) 2016-02-28 14:22:52 -08:00
Ev Kontsevoy 54169b91f1 Super early implementation of SSH 2016-02-28 14:22:52 -08:00
Ev Kontsevoy 317393c821 CLI flag parsing for 'tsh ssh' 2016-02-28 14:22:52 -08:00
Ev Kontsevoy 9704899dfd Brought back "list nodes" functionality to tctl 2016-02-28 14:22:52 -08:00
Ev Kontsevoy 02c6786521 Intermediate commit 2016-02-28 14:22:52 -08:00
Alex Lyulkov bd61f6793f Changed limiter initialization 2016-02-26 16:59:35 +03:00
Alex Lyulkov 45654a0ddb rebased 2016-02-25 22:46:30 +03:00
Alex Lyulkov 07c0ca47f9 Fixed tsh tests, changed tests ports 2016-02-25 20:30:44 +03:00
klizhentas 71a5dbc2c4 refactor 2016-02-24 17:58:22 -08:00
klizhentas af569afd7e Merge branch 'master' into pre-production 2016-02-24 13:32:14 -08:00
Ev Kontsevoy 02f3459afc Better "sample config" implementation
Three changes:

- Sample configuration is no longer a dump of a string constant. It's
  generated using the same data structure used for configuration
  parsing. This guarantees that 'teleport configure' will always dump a
  valid sample config file.

- Added a unit test which validates sample configuration and  verifies
  its correctness

- MakeSampleConfig() does not return an error anymore. It will
  default   to 'localhost' with error logged instead of failing. It
  makes no sense to fail when generating an example. Also this makes
  code cleaner.
2016-02-23 23:42:36 -08:00
klizhentas d5f24e5c39 implement new session management and user signup API 2016-02-23 17:26:23 -08:00
Ev Kontsevoy d4accce49d Merge remote-tracking branch 'origin/master' into ev/133-newconf
Conflicts:
	lib/service/cfg.go
2016-02-22 16:34:20 -08:00
Ev Kontsevoy d91eed6f3d Covered 'main' with tests 2016-02-22 16:21:51 -08:00
Ev Kontsevoy e230447f2e Properly vendored dependencies
- removed `gravitational/configure`
2016-02-22 14:11:31 -08:00
Alex Lyulkov 824f98e8e3 Fixed password reading, changed hangouts dir to ioutils.Tempdir() 2016-02-22 23:59:20 +03:00
Alex Lyulkov eec2217e56 Fixed client test, fixed srv test, minor changes 2016-02-22 22:38:37 +03:00
Ev Kontsevoy df4a334a10 Config. file functionaliy is done.
Left to do:

- tests
- a bit of usability testing and code polish
2016-02-20 17:17:09 -08:00
Ev Kontsevoy fff0d8875a Merge remote-tracking branch 'origin/master' into ev/133-newconf
Conflicts:
	Godeps/Godeps.json
	lib/service/cfg_test.go
	tool/teleport/main_test.go
	vendor/github.com/gravitational/configure/README.md
	vendor/github.com/gravitational/configure/cli.go
	vendor/github.com/gravitational/configure/cstrings/split.go
	vendor/github.com/gravitational/configure/kv.go
	vendor/github.com/gravitational/configure/schema/schema.go
2016-02-20 15:02:39 -08:00
Alex Lyulkov 2ebb3d07a2 Added tests for hangouts 2016-02-20 01:54:42 +03:00
klizhentas 278420174f refactor roles and certificates handling 2016-02-18 18:07:43 -08:00
klizhentas 6a9ad7b820 check nodes names when inviting them, fixes #119 2016-02-18 14:55:39 -08:00
Alexander Klizhentas c151d064be Merge pull request #144 from gravitational/alex/share-rebased2
Added Hangouts
2016-02-18 13:38:20 -08:00
Alex Lyulkov 042212ad65 Joined regular and hangouts reverse tunnels, changed authentication, minor fixes 2016-02-19 00:23:22 +03:00
klizhentas 7012d465bc list active nodes, fixes #129 2016-02-18 12:22:44 -08:00
Alex Lyulkov 5741526bf4 Merged from alex/share-rebased 2016-02-18 22:10:34 +03:00
klizhentas 9fcc861e09 Replace dependencies with code.google.com paths, remove unused code
* Remove usage of lemma/secret and gravitational/session
* Replace deps using code.google.com with alternatives
* Vendor test keys to the code base
2016-02-17 18:36:52 -08:00