Commit graph

267 commits

Author SHA1 Message Date
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 fccb8883b9 Merge branch 'master' into ev/standalone 2016-10-23 15:09:23 -07:00
Ev Kontsevoy 7964bfc54e Client profiles for TSH 2016-10-22 12:54:16 -07:00
Ev Kontsevoy 2f9c669d26 Merge branch 'master' into ev/standalone 2016-10-14 00:11:41 -07:00
Ev Kontsevoy 07e8d212ff Minor usability issue with tctl
tctl was doing configuration validation too early, even on "version"
command (which should always succeed)
2016-10-10 16:39:06 -07:00
Ev Kontsevoy baafe3a332 Renamed GetLocalDomain() to GetDomainName() 2016-10-09 17:27:56 -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
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 4aa39f0897 Added '-t' flag
This means "allocate TTY"
2016-09-08 21:38:45 -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 f235f46b06 Released 1.0.5 2016-08-19 14:54:52 -07:00
Ev Kontsevoy 3060cf2650 Adds the ability to specify non-standard HTTPS proxy port
This commit fixes #491

Now `tsh` accepts `--proxy=host:port,port` allowing to specify two
ports, one for SSH and another for HTTPS.
2016-08-05 15:46:12 -07:00
Ev Kontsevoy 45f1986d88 Nicer parsing of "auth_servers" config option 2016-06-12 16:30:32 -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
Ev Kontsevoy b3a7419551 Improvements to "tctl auth" command
`tctl auth` now treats local CAs differently from "trusted CAs":

- `tctl auth ls` prints two tables: local authorities and trusted
  authorities.

- `tctl auth export` only exports local keys

Also, when showing "allowed logins" for each CA, tctl now prints "N/A"
for host CAs and user-friendly "<nobody>" or "<everyone>"
2016-06-11 19:31:07 -07:00
Sasha Klizhentas be7abac22d use config string as optional envar param 2016-06-08 22:01:34 -07:00
Ev Kontsevoy 6deab48ab6 Cluster certificate import/export work...
1. tctl auth export now dumps both user&host keys if --type key is missing
2. created fixtures for testing key imports: they're in
   fixtures/trusted_clusters
3. configuration parser reads "trusted_clusters" files expecting the
   output of tctl auth export
2016-06-07 18:57:54 -07:00
Ev Kontsevoy 029233b11f tsh logout implementation
Fixes #420
2016-06-01 17:02:39 -07:00
Ev Kontsevoy cddaf6e5c8 Some minor improvements
- `tctl auth ls` lists all CAs by default
- Documented `authorize_ip` better
2016-05-31 18:59:07 -07:00
Ev Kontsevoy 48a74fbeca Intermediate commit (scp up/down works agaisnt openSSH servers) 2016-05-26 14:46:56 -07:00
Ev Kontsevoy 6e6e951650 Intermediate commit 2016-05-25 22:33:07 -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 1c7693f96c Back-end implementation of token management
- User tokens (signup tokens) and node nodes (provisioning tokens) are
  managed via the same API calls.

- User tokens are converted to machine tokens (with Signup role)

- Static node tokens have "Expiry" date of Unix(0) i.e. Jan 1, 1970
2016-05-16 20:26:53 -07:00
Ev Kontsevoy 9e1c087984 Added tctl CLI commands for listing and deleting tokens
TODO: hook them up to server-side implementation
2016-05-16 19:03:52 -07:00
Ev Kontsevoy 0b03f9eb83 auth.ValidateToken now understands static tokens 2016-05-12 16:40:14 -07:00
Ev Kontsevoy bbace4410e Hooked up static token to node registration 2016-05-12 01:16:13 -07:00
Ev Kontsevoy efb4423109 Added flags to tctl nodes add
`--ttl`  : allows to specify TTL for each token
`--roles`: allows to specify which roles the new node will be able to
           assume
2016-05-11 16:43:07 -07:00
Ev Kontsevoy 0b26b7fc47 Teleport Host Certificates support multiple roles now
Teleport CA-signed host certificates used to support only one
server role per cert.

This commit adds the ability to store multiple roles in a
certificate, paving the road for multi-role node support in
a near future.
2016-05-10 20:27:18 -07:00
Sasha Klizhentas 39d9f076c2 Env var for TELEPORT_USER, refs #408 2016-05-10 15:34:35 -07:00
Ev Kontsevoy e3d2114f28 Introduce multi-role tokens
This commit:

- Makes all Teleport tokens multi-role (a token is associated with a
  list of roles its owner can assume)
- Removes some unused/obsolete features
     a) "AllowedTokens" config setting which we don't use
     b) "authorities" TCTL command

It does not affect how Teleport works, just preparing the plumbing for
--roles flag for `tctl nodes add`
2016-05-09 22:39:07 -07:00
Ev Kontsevoy b6f11b00d9 Fixed tests 2016-05-09 20:53:33 -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 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 cca475924b tsh now respects --user flag
Fixes #392
Fixes #396

Teleport now respects `--user` flag and, if --user is specified,
forces the certificate to belong to the given user.

This changes the file structure in `~/.tsh` directory. If a user logs in
under two different accounts, say "ekontsevoy" and "vince", it looks
like this:

```
~/.tsh/
├── keys
│   └── localhost
│       ├── ekontsevoy.cert
│       ├── ekontsevoy.key
│       ├── ekontsevoy.pub
│       ├── vince.cert
│       ├── vince.key
│       └── vince.pub
└── known_hosts

```

Also, to make tests more believable, I have added 3 more pre-generated
keys to 'testauthority' fixture, so instead of returning the same key
over and over, it now returns a random 1 of 4
2016-05-06 21:57:39 -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 65215cf539 Decent quality session replay command 2016-04-30 22:00:53 -07:00
Ev Kontsevoy dc162fd250 First draft of "play" command for tsh 2016-04-30 17:32:54 -07:00
klizhentas b5eb171a06 set env vars 2016-04-23 17:47:29 -07:00
klizhentas ce33368e58 fix various 2FA and OIDC login hiccups 2016-04-19 14:56:01 -07:00
Alexander Klizhentas 89673725e3 Few changes:
- added getProxyLogin() method to TeleportClient. It now uses the
  default approved principal to login into proxy or defaults to "host
  login"

- covered a bit more of TeleportClient functionality with basic unit
  tests
2016-04-17 20:46:34 -07:00
Ev Kontsevoy 42c4eaf269 Addded integration tests for:
- interactive SSH (with shell)
- joining sessions
2016-04-14 14:17:56 -07:00
Ev Kontsevoy 0dcdc4c278 Added ability to specify which console to use
...by teleport clients + servers, meaning:

1. Servers do not default to stdout when printing startup messages
2. Clients can use arbitrary input/output instead of stdin/stdout when
   doing SSH/join. This helps with integration testing.
2016-04-14 13:56:53 -07:00
klizhentas d68e693cad migrate to trace errors 2016-04-12 11:07:14 -07:00
Ev Kontsevoy 3d42e3d636 Prepared previous commits for merging into master
- Fixed all tests
- Removed "magic constants" in random places
- Improved 'retry connecting to auth server' logic (it used to always
  fail on 1st attempt)
2016-04-11 16:32:38 -07:00
Ev Kontsevoy 4011fb9439 Fixed tests 2016-04-11 16:32:37 -07:00