Commit graph

315 commits

Author SHA1 Message Date
Russell Jones 49c2d31a33 Remove --identity flag from tctl. Cleaned up tsh and, updated
documentation.
2017-02-28 15:08:35 -08:00
Russell Jones cfe92d7ad2 Fixed bugs created in #783. Updated response returned from /webapi/ping and
/web/config.js. Added support for authentication selection based off ping
response in tsh.
2017-02-23 13:45:19 -08:00
Sasha Klizhentas 202c3fc0b9 move code around 2017-02-15 18:29:17 -08:00
Sasha Klizhentas f9bddef532 fixes and vet passing 2017-02-12 14:33:44 -08:00
Russell Jones 1539f351fe Make teleagent use the LocalKeyAgent. 2017-02-09 18:27:10 -08:00
Russell Jones ac1173bacd Fixes, refactoring, and tests for LocalKeyAgent.
* Updated LocalKeyAgent to load both certificate and private key into Teleport and system agent.
* Refactored LocalKeyAgent to consolidate key loading code.
* Added test coverage for LocalKeyAgent.
2017-02-09 18:27:10 -08:00
Ev Kontsevoy e988630783 tsh logout + tctl create
This commit closes #667

- `tsh logout` will now log you out of everything
- `tctl upsert` has been renamed to `tctl create`
2017-01-29 19:26:27 -08:00
Ev Kontsevoy e7f44bfcd6 SSH port lookup on the proxy side
Before this commit, tsh HAD to know which SSH port the server is
listening on. Meanwhile the proxy _already knows_ which port every
server is listening on! This made it inconvenient to use tsh when
non-default port was used.

This commit makes proxy smarter:

- If `-p` flag is explicitly set, proxy looks for this port and gives an
  intelligent error if the port doesn't match what's actually used.

- If `-p` is skipped, the proxy automatically uses the correct port,
  and what's cooler it uses port `22` if connecting to OpenSSH servers.

This commit fixes the second issue of #729
2017-01-29 16:58:50 -08:00
Ev Kontsevoy c52ca519db Found the reason for tsh ls issue
... it requres 'host login' even though you're not loggin into any host
2017-01-27 23:03:09 -08:00
Ev Kontsevoy ff2fd9ca47 Code review changes 2017-01-25 13:45:46 -08:00
Ev Kontsevoy 4a07dd3e22 Improved CLI login procedure
This commit adds several improvements to how CLI SSH login works

- Validated keys are added to the SSH agent [1]
- tsh will does not verify host keys twice anymore
- error messages for "access denied" look clean now

[1] This is huge. This means that tsh login can "feed" the keys to the
    built-in SSH agents of the OS and OpenSSH can fetch them from there.

QUESTION: why do we even need `tsh agent` option then? ssh-agent is
installed on every Linux/OSX machine.
2017-01-24 19:54:41 -08:00
Ev Kontsevoy b9605a28c1 Marked in-progress tctl commands as 'hidden' 2017-01-01 19:04:37 -08:00
Sasha Klizhentas 255d6d870e get, upsert, delete commands support new resources 2016-12-31 17:11:00 -08:00
Ev Kontsevoy f6cc2d87f9 Merge branch 'master' into sasha/oidc 2016-12-30 19:36:25 -08:00
Ev Kontsevoy fcbca4821b Removed the error obstruction in tctl
Fixes #659
2016-12-30 19:27:20 -08:00
Sasha Klizhentas 2cc1a548c5 finished changes 2016-12-30 15:13:45 -08:00
Ev Kontsevoy 21bd8caa4f Addressed PR comments
- Comments
- Error creation
- Moved from Mailgun's frozen time to clockwork
- Made tests more reliable
2016-12-25 23:26:16 -08:00
Ev Kontsevoy 600210f511 Code cleanup and live testing of fs backend. 2016-12-25 21:58:59 -08:00
Ev Kontsevoy 5df0cf03c7 Merge branch 'master' into sasha/dynamic 2016-12-25 00:37:38 -08:00
Sasha Klizhentas f583403625 set reasonable default TTL 2016-12-24 15:59:33 -08:00
Sasha Klizhentas 03cc9c66e1 Merge branch 'master' into sasha/dynamic 2016-12-24 14:49:33 -08:00
Sasha Klizhentas 8ab3add372 map OIDC scopes to roles, implements #620 2016-12-24 14:42:33 -08:00
dmitri 53e059a11a Add context support to ProxyClient.ConnectToNode to be able to timeout the connection.
The method is otherwise blocking and might hang upon establishing a connection if the other side closes the connection.
2016-12-23 20:50:32 +01:00
Sasha Klizhentas d214f5d5e2 address code review comments 2016-12-22 19:06:07 -08:00
Sasha Klizhentas bacfc33ef4 add missing error report 2016-12-21 15:56:57 -08:00
Sasha Klizhentas c8217f6d35 add missing pieces 2016-12-21 14:58:26 -08:00
Sasha Klizhentas 81c69851e2 tctl add upsert, get 2016-12-20 19:19:44 -08:00
Sasha Klizhentas 1c690ea0f4 add tctl 2016-12-20 16:31:40 -08:00
Sasha Klizhentas aa41f032a3 more fixes 2016-12-20 14:01:46 -08:00
Sasha Klizhentas 41a4d2872c Merge branch 'sasha/corruption' into sasha/rbac 2016-12-20 11:06:16 -08:00
Ev Kontsevoy a4ff1117c0 Minor change 2016-12-15 08:21:42 -08:00
Ev Kontsevoy c40c0139df Removed automatic profile saving on every successful session
Now, profiles are created when you explicitly type `tsh login`
2016-12-14 16:47:35 -08:00
Sasha Klizhentas 2dceb42547 Merge branch 'master' into sasha/rbac 2016-12-14 16:36:55 -08:00
Sasha Klizhentas 7e97b10032 add support for namespaces almost everywhere 2016-12-14 15:48:36 -08:00
Sasha Klizhentas a8533fde66 Merge branch 'jcj83429-u2f' 2016-12-13 12:16:26 -08:00
Ev Kontsevoy a9f0e3f46c Merge branch 'master' into ev/1.3 2016-12-12 10:21:54 -08:00
Ev Kontsevoy e880643d46 Added --quiet flag to tsh clusters command
Fixes #635
2016-12-11 22:37:13 -08:00
Ev Kontsevoy 37d77189a0 Updated "tctl auth sign" command
Changes:

- Added a proper help message for `--ttl` flag
- Added `--out` flag to specify where to store the keys
- Removed 3 flags for file names
- File names (keys, cert) are generated using `tsh` naming convention

Fixes #636
2016-12-11 22:30:00 -08:00
jcj83429 2e43b34f30 Merge branch 'master' into u2f-devel 2016-12-10 20:50:11 -08:00
Alex Charles 9e743f803a Some cleanup for PR. Mostly appId -> appID, U2f -> U2F 2016-12-08 02:23:51 -08:00
Sasha Klizhentas ab19c70032 implement cert gen CLI tool 2016-12-06 10:43:19 -08:00
Jay ade8b1dc7b Fixed merge conflicts with original repository 2016-11-30 17:08:20 -08:00
Ev Kontsevoy 30a1724927 .tsh profile change
`tsh` profiles shoudl only "kick in" when no --proxy flag is given.
If a user explicitly specifies --proxy flag, profiles should be ignored.
2016-11-30 15:46:36 -08:00
jcj83429 4bbca0b2eb Merge branch 'master' into u2f 2016-11-29 20:54:17 -08:00
Ev Kontsevoy 7fe96513e2 Merge branch 'master' into ev/512 2016-11-03 23:12:14 -07: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 888e53aa03 Fixes #604 2016-11-03 14:54:52 -07:00
Ev Kontsevoy d29a88f524 Web assets are packed into teleport binary
Functionality:

`teleport` binary now serves web assets from its own binary file.
Unless `DEBUG` environment variable is set to "1" or "true", in
this case it will look for ../web/dist (as located in github repo)
which can be used for development.

Design:

To avoid accumulating 3rd party dependencies with a ton of extra
features and licenses, this implementation uses minimalistic
implementation of http.FileSystem interface on top of the embedded ZIP
archive.

1. The assets are zipped into assets.zip during build process
2. assets.zip gets appended to the end of `teleport` binary
3. The resulting file is converted into a self-extracting ZIP
4. Teleport opens itself using the built-in zip unarchiver, and loads
   the assets on demand.

Notes:

1. LOC is tiny (dozens)
2. RAM consumption is CONSTANT regardless of the ZIP size, about 500Kb
   increase vs load-from-file, and most of it is linking zip archive
   code from the standard library. Tested with a 20MB ZIP archive.
2016-10-30 20:40:46 -07:00
jcj83429 2cff2aaa66 Merge upstream 'master' into u2f
Conflicts:
	lib/config/fileconf.go
	tool/tsh/main.go
2016-10-24 00:08:26 -07:00
Ev Kontsevoy fccb8883b9 Merge branch 'master' into ev/standalone 2016-10-23 15:09:23 -07:00