Commit graph

154 commits

Author SHA1 Message Date
Ev Kontsevoy dab0ad347c Flexible tokens:
- Static never-expiring tokens
- TTL tokens
- Single-use tokens with TTL of 30 mins
2016-05-12 00:44:25 -07:00
Ev Kontsevoy 0fd6f2f31b Minor improvement to tunclient 2016-05-11 18:34:55 -07:00
Ev Kontsevoy b175d92052 PR comments - implemented! 2016-05-07 21:51:35 -07:00
Ev Kontsevoy e10612028e Preparations for a PR
Fixes #394
2016-05-06 20:48:02 -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 b03f9397be Merge remote-tracking branch 'origin/master' into ev/log 2016-05-01 22:27:30 -07:00
Ev Kontsevoy f4dfbf2e50 Easier bookkeeping of sessin parties 2016-05-01 17:31:28 -07:00
Ev Kontsevoy 7b7948c70d Teleport registers auth severs immediately on startup
fixes #390

Prior to this fix teleport cluster would exist without any auth servers
for a couple of seconds after startup.
2016-05-01 00:43:12 -07:00
Ev Kontsevoy 755e361d70 New implementation of session.GetSessions() 2016-04-28 14:13:53 -07:00
Ev Kontsevoy b2789739c6 Bugfixes and minor optimizations 2016-04-26 17:41:04 -07:00
Ev Kontsevoy 8775f44935 Hooked up new AuditLog in few places:
- Fixed all tests
- Wrote a simple test for AuditLog.Emit
2016-04-26 17:41:04 -07:00
Ev Kontsevoy 347d2fb3e3 Implemented AuditLogI interface for:
- auth.Client   : HTTP client
- APIServer     : HTTP server for Auth API
- AuthWithRoles : HTTP server for Auth API (which calls HasPermission)
- AuditLog      : actual server-side filesystem-based implementation
2016-04-26 17:40:49 -07:00
Ev Kontsevoy 35b6a5f687 Simplified SSH context handling
- ctx object is created earlier
- session connection is not passed around anymore (it's part of ctx
  anyway)
- clearly identified places in code where audit events must be logged
2016-04-26 17:40:49 -07:00
Ev Kontsevoy 6f111e39e2 Removed lunk + old events + old recorder 2016-04-26 17:39:46 -07:00
Ev Kontsevoy 5c87a5707d Rough implementation of audit log: completed 2016-04-26 17:39:46 -07:00
Ev Kontsevoy 43b224183d Intermediate commit: basic session bookkeeping in SessionLogger 2016-04-26 17:39:46 -07:00
Ev Kontsevoy 3161b905fc Scaffolding for simplified logger+event viewer 2016-04-26 17:39:46 -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 31951cb1e4 Incorporated 'testauthority' into integration tests 2016-04-11 16:32:38 -07:00
Ev Kontsevoy d7a9297671 Added an option to disable web ui 2016-04-06 01:15:04 -07:00
Ev Kontsevoy 8fe9b3eeb7 Teleport Client API refactoring
Goal: Easier manipulation of client keys

- configurable key store
- easier public API to sign & save keys (prior to this only tc.Login()
  could create a signed key) - this allows to implement custom Login
  logic in other clients.
2016-04-05 18:53:30 -07:00
Ev Kontsevoy 3b3806ce8d "SSH node" service can now be stopped
when I did "stoppable Teleport" I wasn't running the "node" role, now I
added support for that.
2016-04-05 18:50:41 -07:00
klizhentas e3ab6b3708 allow to log in 2016-04-04 17:26:15 -07:00
klizhentas 8874d916de Merge branch 'master' into sasha/oidc 2016-04-04 13:21:02 -07:00
Ev Kontsevoy 34b916079c PR comments 2016-04-03 20:05:41 -07:00
Ev Kontsevoy 757c34a755 Added the ability to stop teleport without restarting the process 2016-04-03 12:17:28 -07:00
klizhentas 84cade14c5 draft OIDC support 2016-04-02 22:20:51 -07:00
Ev Kontsevoy f2b9b71568 Merge branch 'ev/bugs' of github.com:gravitational/teleport into ev/bugs 2016-04-01 18:08:00 -07:00
Ev Kontsevoy f7b7ef845f Added PID file support
Fixes #317
2016-04-01 18:02:35 -07:00
Ev Kontsevoy 79f348cac8 Added PID file support
Fixes #317
2016-04-01 17:58:41 -07:00
Ev Kontsevoy 75c903ddca Friendlier error message for 'node access denied' 2016-04-01 15:17:22 -07:00
Ev Kontsevoy e8e9763688 Improved error reporting when started teleport
Before:

Without "--debug" flag teleport would not report some errors to stderr.
A user would get the impression it's working properly.

After:

Initialization errors are dumped into cfg.Console writer, just like we
do everywhere else, so errors are duplicted in the log and also in the
user-facing console.
2016-04-01 13:23:39 -07:00
klizhentas 6f5c87a8c6 broadcast identity from auth server as well 2016-03-31 10:26:13 -07:00
klizhentas 8bcc407912 broadcast web handler event 2016-03-29 16:46:58 -07:00
klizhentas e1c5f86af5 migrate from callbacks to events 2016-03-29 16:33:11 -07:00
klizhentas ca7e3820d7 This commit adds ability to preconfigure the cluster without running
auth server. This is needed when you configure cluster from scratch and
all nodes including auth server spin up simultaneously.

* Add tctl tools to generate keys and certificates

  + Command "tctl authorities gen" generates public and private keypair.
  + Command "tctl authorities gencert" generates public and private keypair signed
    by existng private key
  + Command "tctl authorities export" was modified to be able to export exisitng private
    CA keys to local storage

   All of these commands are hidden by default.

section "static configuration"

* Add ability to configure teleport from environment variable

Environment variable TELEPORT_CONFIG can contain base64 encoded
YAML file config file of the standard file format, so teleport will use it on start

* Add special secrets section to the config file

Section "secrets" was updated to support pre-configured trusted CA keys and pre-generated keys

* Add special rts hidden section to add support for provisioning
2016-03-28 12:58:34 -07:00
Ev Kontsevoy e2c495bb76 Merge remote-tracking branch 'origin/master' into ev/scp-bug 2016-03-21 22:13:25 -07:00
Ev Kontsevoy 2ad2fb4ff1 SCP bugfixes
- also removed annoying log messages
- refs #274
2016-03-18 20:35:28 -07:00
klizhentas 6edd6675e6 re-introduce reverse tunnels into teleport
Reverse tunnels are now first class citizens of teleport.
There's no longer static configuration for reverse tunnel agents
in the config. Instead, admins can add and remove reverse tunnels
using tctl reversetunnel (hidden) commands.

* tctl reversetunnel ls
  lists reverse tunnels

* tctl reversetunnel upsert a.example.com 10.0.0.4:2023,10.0.0.5:2033 --ttl=10m
  updates or inserts reverse tunnel for 10 minutes

* tctl reversetunnel del a.example.com
  deletes a reverse tunnel

Teleport proxies watch changes in the reverse tunnels on the backend and
spin up / spin down reverse tunnels according to these changes.
2016-03-18 17:13:22 -07:00
klizhentas 091ccb9894 add TLS client authentication for ETCD 2016-03-16 18:30:00 -07:00
klizhentas 03dc97ed1e Introduce failover and auth servers sync, refs #78
* clients to tun servers are now supporting failover on the client
* clients periodically pull and sync auth servers that are available in the cluster
* teleport stores the information about cluster state locally and reuses it on restart
2016-03-15 13:07:31 -07:00
klizhentas 7a2a9e334f add support for TELEPORT_DEBUG_TESTS environment variable turning on verbose testing 2016-03-14 14:07:45 -07:00
klizhentas c1e0604dd0 Introduce auth server and proxy heartbeats
This commit introduces heartbeats of AuthServers and Proxies and fixes several issues:

1. Server init problem

There was an issue in server init, when certificates of multiple roles were overwriting each otther.
Now Teleport stores each keypair and certificate in a separate file <hostid>.role.key and <hostid>.role.cert
This also means that it's backwards incompatible with previous on disk format.

2. Proxy and Auth heartbeats

Auth servers and proxies now heartbeat into cluster as well

3. Bugfixes:

* Proxy role was missing, it is now treated as a separate role with permissions
* AdvertiseIP is now a global setting that can be used by all roles
* --advertise-ip flag was ignored and was never applied
* teleport service initialization has been simplified, now each role get it's own client
* minor cleanups
2016-03-13 18:15:09 -07:00
Ev Kontsevoy a8f419a0ad Merge remote-tracking branch 'origin/master' into ev/proper-bash 2016-03-10 23:52:49 -08:00
klizhentas 09725aab60 recover etcd backend support 2016-03-10 17:03:01 -08:00
klizhentas 7263a3fd18 remove backend PGP encryption 2016-03-10 09:41:01 -08:00
Ev Kontsevoy 94aa9bd413 Intermediate commit (doesn't even build) 2016-03-09 18:38:56 -08:00
Ev Kontsevoy 71d9ef1f31 PR comment changes 2016-03-08 15:16:56 -08:00
Ev Kontsevoy f8b51d614c PR comments 2016-03-08 09:53:40 -08:00