Commit graph

62 commits

Author SHA1 Message Date
Sasha Klizhentas 3c2570fa35 Sasha High Availability. 2017-04-07 16:54:15 -07:00
Ev Kontsevoy 4722b2d6da Updated comments for DynamoDB package 2017-03-22 17:04:06 -07:00
Russell Jones 7afe60f72e Code review comments. 2017-02-23 15:07:55 -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 d6ff6f6204 Configure web session duration, fixes #691
* Fix bug with OIDC powered sessions logged out after 10 minutes
* Adjust web sessions durations by taking roles into account
* Provide explicit TTL enforced on the server side for bearer tokens

Before this PR the web session TTL was measured using defaults,
10 minutes for local sessions and 1 hour for OIDC sessions and
the system relied on client to renew the bearer token.

With this change bearer token TTL is set to 10 minutes
and the entire web session will expire if not renewed before

The maximum session duration is set to 12 hours, if not
limited to a smaller value by roles in RBAC modules.
2017-02-17 16:16:44 -08:00
Ev Kontsevoy eb12e297df Improvements to make tests more reliable
- Better async test for fs backend
- Slight optimization inside sessions (avoid calling unnecessary
  function from goroutines)
2017-02-06 15:48:49 -08:00
Ev Kontsevoy 9a16ac4dff SSH keepalive implementation + refactoring
The base SSH server implementation now sends SSH keepalive at ta rate of
1/4 of "idle timeout" constant. The client properly responds to keepalive
pings.

The SSH client, instead of creating 2 goroutines for handling SSH
requests and SSH channels now uses the same (existing) goroutine with
for-loop + select statement.
2017-01-30 16:53:10 -08:00
Ev Kontsevoy 0bb445d7af Incorporated Sasha's PR comments... 2017-01-16 23:15:25 -08:00
Ev Kontsevoy ab6857a573 Added 'insecure' flag to etcd config
Fixes #694
2017-01-16 11:15:04 -08:00
Ev Kontsevoy 5e952e2cf2 Merge branch 'master' into ev/688 2017-01-16 00:59:28 -08:00
Ev Kontsevoy ac205ad530 Finished cleaning up storage back-ends
I hope this closes #688
2017-01-15 23:23:37 -08:00
Ev Kontsevoy 7040331660 Fixed all tests
Also replaced mailgun.FrozenTime with `clockwork` in a few places
(mailgun's frozen time still remains elsewhere)
2017-01-15 16:28:18 -08:00
Ev Kontsevoy 312af8f02d Converted DynamoDB and etcd to common backend API
TODO:
- fix etcd tests
- do some manual testing of all backends
2017-01-15 16:28:18 -08:00
Ev Kontsevoy 40caec6048 Converted boltbk to the new format
BoltDB backend is now compatible with how all backends should
initialize.

Also all BoltDB-specific code/constants have been consolidated inside of
`backend.boltbk` package.
2017-01-15 16:28:18 -08:00
Ev Kontsevoy e648bdc4dd Minor changes to the "dir" backend:
1. Nicer tests for locking
2. Bugfix around Acquirelock / Releaselock
2017-01-15 16:28:18 -08:00
Ev Kontsevoy eee8bac224 Added filesystem backend configuration parsing
+initialization
2017-01-15 16:28:18 -08:00
Ev Kontsevoy bdd46234ee Implemented backend.NewFunc() for the FS backend 2017-01-15 16:28:18 -08:00
Ev Kontsevoy c0ae51537c Automatic schema migration for DynamoDB backend
Also, some DynamoDB bug fixes. The migration algo:

- load all existing entries and keep them in RAM
- create <table_name>.bak backup table and copy all entries to it
- delete the original table_name
- re-create table_name with a new schema (with "FullPath" instead of "Key")
- copy all entries to it
2016-12-27 20:32:42 -08:00
Ev Kontsevoy 14fb2068db Removed backend.CompareAndSwap() method from all backends 2016-12-27 12:57:14 -08:00
Ev Kontsevoy 95912d4292 PR changes 2016-12-27 11:11:53 -08:00
Ev Kontsevoy 2eafad082c Merge branch 'master' into ev/lock 2016-12-27 00:13:18 -08:00
Ev Kontsevoy 4ed536a2f0 First pass at cleaning up DynamoDB and locks
- Added ability to read AWS config from `~/.aws` directory for testing
- Fixed TTL bug in DynamoDB back-end
- Made FS back-end return similar error types as Boltdb does
- Cleaned up buggy tests for DynamoDB
- Removed unnecessary locks everywhere in code
2016-12-27 00:12:59 -08:00
Ev Kontsevoy 24456d95a7 Update README.md 2016-12-26 14:38:04 -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 0f3c6ec269 Comments & minor edits 2016-12-25 21:58:59 -08:00
Ev Kontsevoy f102832f55 Fixed data race in tests
Note: had to add my own implementation of TimeSource interface because
it will take some time to get Mailgun team to accept my PR into their
timetools package.
2016-12-25 21:58:59 -08:00
Ev Kontsevoy 600210f511 Code cleanup and live testing of fs backend. 2016-12-25 21:58:59 -08:00
Ev Kontsevoy 43fbeb8337 Finished implementing filesystem-based backend
With full test coverage
2016-12-25 21:58:59 -08:00
Ev Kontsevoy 0d02c3be6f Removed backend.TouchVal()
It was never actually used in Teleport
2016-12-25 21:58:59 -08:00
Ev Kontsevoy 79c9f32f38 Removed backend.GetValAndTTL()
It was never used anywhere in actual Teleport code.
2016-12-25 21:58:59 -08:00
Ev Kontsevoy 0857d01dd5 Started implemented fs-based backend 2016-12-25 21:58:59 -08:00
Ev Kontsevoy 4ad3072038 Removed some dead code 2016-12-25 21:58:59 -08:00
Adrien Pestel 436ee596b6 DynamoDB backend
This backend can be enabled by optionally adding a new build flag.
See lib/backend/dynamo/README.md for details.

It should not affect default Teleport builds.
2016-10-25 23:26:35 -07:00
Ev Kontsevoy a0562d0e0f Teleport returns a proper error message if BoltDB is locked
Fixes #222
2016-04-14 13:56:53 -07:00
klizhentas 3f722c38d0 fix etcd test 2016-04-12 11:28:44 -07:00
klizhentas d68e693cad migrate to trace errors 2016-04-12 11:07:14 -07:00
Ev Kontsevoy 757c34a755 Added the ability to stop teleport without restarting the process 2016-04-03 12:17:28 -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 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
klizhentas 332212dcd4 add session log 2016-03-04 16:53:11 -08:00
klizhentas e05fc50baf fix data races found in tests, fixes #165 2016-03-04 14:38:19 -08:00
klizhentas 866b1e18c3 add support for session resizing 2016-03-01 13:19:43 -08:00
klizhentas 6ef5f36037 refactor API to use JSON instead of forms, unify error handling 2016-02-23 12:03:34 -08: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
klizhentas 6cdaba2ef6 user mappings should be deleted if user is deleted, fixes #116
This commit includes refactoring and cleanup of cert authority sybsystem:

* User keys methods are deleted
* Authorities CRUD is simplified
* Lots of code removed
2016-02-17 15:29:01 -08:00
klizhentas 9fa5b3f281 fix users API, cleanup unused code, fixes #118 2016-02-15 17:51:23 -08:00
Alex Lyulkov d2f50cf4b6 Fixed tests logging 2016-02-05 17:09:21 +03:00