Commit graph

162 commits

Author SHA1 Message Date
Russell Jones 9ad600d39b Forwarding to proxy is controlled by a global out-of-band
request. Always forward Teleport agent to node in Web UI.
Support the -A flag in tsh to optionally forward agent to
node in CLI.
2017-11-16 00:11:25 +00:00
mricher b58cb051e8
Correct various typos
This was fixed running the `misspell` linter in fix mode using
`gometalinter`. The exact command I ran was :
```
gometalinter --vendor --disable-all -E misspell --linter='misspell:misspell -w {path}:^(?P<path>.*?\.go):(?P<line>\d+):(?P<col>\d+):\s*(?P<message>.*)$' ./...
```

Some typo were fixed by hand on top of it.
2017-10-20 10:20:26 +02:00
Roman Tkachenko 5dbda4f41b Use plugins mechanism instead of oss/e flag 2017-10-13 17:32:45 -07:00
Ev Kontsevoy 63ea06d416 Removed 'tsh agent'
Fixes #1126

2.3 had the deprecation warning, this one removes it.
2017-09-22 14:34:35 -07:00
Ev Kontsevoy 0cc39838ae Removed 'goterm' dependency
goterm had no license, I quickly replaced it with our own little table
formatter.

also rewrote some tsh commands, that were using home-made formatting, to
the new table, so the output is now much nicer.
2017-09-06 19:06:48 -07:00
Sasha Klizhentas 8b81a0c384 Migrate to golang/dep for dependency management
Update following packages:

* Replace Sirupsen/log with sirupsen/log everywhere
* Update etcd client to 3.2.4
* Update docker/term to moby/term
* Update kr/pty to v1.0.0 release
* Update K8s client to 2.0
2017-08-22 15:30:30 -07:00
Ev Kontsevoy e483e1404a Added (terrible) implementation of tsh show 2017-08-18 18:48:35 -07:00
Ev Kontsevoy 6150216653 Changes to how TSH deals with identity files
- Renamed "dir" format to "openssh"
- Replaced self-made key fingerprinting function with a standard one
- Changed fingerprinting from legacy md5 to sha256
2017-08-18 17:31:32 -07:00
Ev Kontsevoy 94cc4a18d4 A few fixes in docs and in code
- Updated "enterprise" and "quick start"
- Fixed #1208
2017-08-16 21:42:35 -07:00
Russell Jones 865000d6fe Reintroduced --auth flag to tsh. 2017-08-09 17:24:54 -07:00
Ev Kontsevoy 32146ba8b8 Build / test improvements
1. Got rid of `tool/tsh/common` package. See below.
2. Fixed logger in config test (it was getting reset by the test itself)

The reason we don't need `tool/tsh/common` is because `tsh` is the same
for OSS or Enterprise versions. This is good for two reasons:

1. Enterprise customers don't need to bother telling users to use a
   proprietary binary, they can just get OSS (which will eventually get
   pacakged for OSX/Ubuntu/RHEL) and will be one `apt-get` or `brew install` away

2. Easier for us to package/maintain.
2017-07-17 21:10:14 -07:00
Ev Kontsevoy 7a14a6a1cf Merge remote-tracking branch 'origin/master' into ev/e 2017-07-12 23:10:41 -07:00
Ev Kontsevoy eb17a06c32 Merge remote-tracking branch 'origin/master' into ev/e 2017-07-12 13:51:36 -07:00
Ev Kontsevoy f5f388f042 Merge remote-tracking branch 'origin/master' into ev/tsh-identity 2017-07-12 13:42:23 -07:00
Ev Kontsevoy 4483c8c00a Added a deprecation warning
Asking you to review the wording.
2017-07-10 22:49:57 -07:00
Ev Kontsevoy 84bb78ad2c Finished implementation of --out flag for tsh login
* Hooked up `MakeIdentityFile()` with `tsh.onLogin()`
* Made sure that `--out` flag prevents from writing into `~/.tsh`

Closes #1127
2017-07-10 22:27:37 -07:00
Ev Kontsevoy 499aace638 Started working on #1127
Changes:

* Moved identity file code from tctl (because `tctl auth sign` already
  does what we need) into `lib/client/identity.go`
* Updated tctl to use the new stuff.

Next steps:

* Change `tsh` to use that code
* Tests
2017-07-10 18:28:03 -07:00
Ev Kontsevoy 94c35298b8 Preparation for 2.3
- Switched to new way of building Enterprise
- Removed `tctl tunnels` command (preparation for new resources)
- Removed `tctl auth ls` command (preparation for new resources)
2017-06-21 20:14:40 -07:00
Russell Jones 7e17b6f9a7 Added --compat=oldssh flag to generate user certificates without roles. 2017-06-20 16:57:56 -07:00
Ev Kontsevoy 7c3a237252 Merge remote-tracking branch 'origin/master' into ev/i 2017-06-12 13:16:05 -07:00
Ev Kontsevoy d046eaee20 Merge branch 'master' into ev/i 2017-06-11 21:54:41 -07:00
Ev Kontsevoy ef790eefa6 Added host authorization to identity-based auth
Hooked up -i auth into the proper place
2017-06-11 18:52:19 -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
Ev Kontsevoy a69e61c39d Added some comments 2017-06-09 21:51:16 -07:00
Ev Kontsevoy d2a74932fc Merge branch 'nikatjef/ssh_compatibility' of github.com:nikatjef/teleport into nikatjef-nikatjef/ssh_compatibility 2017-06-09 21:45:18 -07:00
Russell Jones 2590e716c3 Always read tsh profile. 2017-06-07 11:37:55 -07:00
Sasha Klizhentas a22e817db9 dashboard and detect dangling sessions, refs #931
* Improve Grafana dashboard and fix some metrics
* Add dectection for dangling sessions
* Add documentation for Perf Testing
2017-06-01 19:35:14 -07:00
Ev Kontsevoy 2cb54ee4c8 Merge branch 'master' into nikatjef/ssh_compatibility 2017-05-29 23:16:24 -07:00
Sasha Klizhentas cea133f27c fix bench goroutine leak and add more stats 2017-05-14 12:47:04 -07:00
Sasha Klizhentas 91b4a663b9 instrument with monitoring tools, fixes #935
* Add prometheus endpoint to expose system stats
* Add heealthz endpoint
* Add gops endpoint for real time troubleshooting
* Deprecate httprof endpoint
2017-05-13 18:32:10 -07:00
Sasha Klizhentas 8644ab66ee hide bench 2017-05-01 09:37:18 -07:00
Sasha Klizhentas 7d741b10a9 add benchmark tool and fix concurrent DeleteBucket
* Add bench tool and library functions
* Fix concurrent DeleteBucket problem refs #931
2017-04-30 16:25:17 -07:00
James Wells fa2df5f9ac #929 -- Very basic command alias for SSH and SCP. 2017-04-24 18:34:41 -07:00
Sasha Klizhentas 3c2570fa35 Sasha High Availability. 2017-04-07 16:54:15 -07:00
Ev Kontsevoy 1755870f27 Logging fixes and more
- Fixed logging. Closes #875
- Removed dead code
- Fixed 'exec' tests on OSX
2017-03-29 17:12:50 -07:00
Ev Kontsevoy dd9db5ec2e Minor cosmetic commit
- Added comments to explain the purpose of clientConfig.HostPort
- Fixed typo
- Fixed docker-based 'make release' to include Teleport version into the
  produced tarball
- More informative logging around host lookups
2017-03-29 17:12:50 -07:00
Russell Jones 8af04a1355 Added --load flag to "tsh agent". 2017-03-14 14:10:36 -07:00
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
Sasha Klizhentas 2cc1a548c5 finished changes 2016-12-30 15:13:45 -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