Commit graph

32 commits

Author SHA1 Message Date
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 bd96ce9d52 Removed a bunch of dead/unused code
Originally Teleport had facilities to configure events/recordings via two
separate backends.

In reality those two objects (session events and session recordings)
need each other and currently there is only one implementaiton of it.

The old structures were unused. This commit is 100% dead code removeal.
2016-12-27 21:07:16 -08: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
Ev Kontsevoy 92b30c3c77 Configuration changes
1. data_dir is now a global setting in teleport.yaml (instead of being
   inside of "storage" sub-section)

2. changing data_dir in one place causes all of teleport to use it,
   not just bolt backends.

3. moving auth server to listen on non-default ports properly adjusts
   the global auth_servers setting

4. `tctl` now accepts -c flag just like Teleport, so you can pass
   `teleprot.yaml` to it.

Fixes #432
Fixes #431
Fixes #430
2016-05-31 14:58:55 -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
klizhentas 7a2a9e334f add support for TELEPORT_DEBUG_TESTS environment variable turning on verbose testing 2016-03-14 14:07:45 -07:00
Ev Kontsevoy 42f55959ed Intermediate commit 2016-03-04 16:27:52 -08:00
Ev Kontsevoy 02f3459afc Better "sample config" implementation
Three changes:

- Sample configuration is no longer a dump of a string constant. It's
  generated using the same data structure used for configuration
  parsing. This guarantees that 'teleport configure' will always dump a
  valid sample config file.

- Added a unit test which validates sample configuration and  verifies
  its correctness

- MakeSampleConfig() does not return an error anymore. It will
  default   to 'localhost' with error logged instead of failing. It
  makes no sense to fail when generating an example. Also this makes
  code cleaner.
2016-02-23 23:42:36 -08:00
Ev Kontsevoy e0f5696743 Wrote tests for configuration defaults 2016-02-16 13:18:58 -08:00
Ev Kontsevoy 4d6800623c Removed old configuration persistence
- Removed `yaml` structure attributes
- Removed "LoadFromYAML()" routine
- Removed YAML persistence tests

References #133
2016-02-13 21:17:30 -08:00
Ev Kontsevoy 2db4d98213 Incorporated PR comments from here:
https://github.com/gravitational/teleport/pull/115
2016-02-09 13:46:34 -08:00
Alex Lyulkov d2f50cf4b6 Fixed tests logging 2016-02-05 17:09:21 +03:00
Ev Kontsevoy 7bf35b02a8 Fixed log-related errors in tests 2016-02-04 15:39:50 -08:00
Ev Kontsevoy 83f2d30d12 Replaced our own logger with logrus 2016-02-02 17:53:21 -08:00
Alex Lyulkov 67bcda7b82 Added init encryption keys for auth backend config, backend configs are JSON now, all complex env configs are JSON now 2016-01-29 19:17:12 +03:00
Alex Lyulkov 2b1a05f53c Added provisioning token role information inside the output token string 2016-01-26 03:16:58 +03:00
Alex Lyulkov a56b5236ac Moved to go1.5 vendoring 2016-01-20 18:52:25 +03:00
Alex Lyulkov c6ed9ba9f9 Added scp for client, fixed scp receiveDir handler, made utils.NetAddr implement net.Addr 2015-12-18 00:40:42 +03:00
Alex Lyulkov 02b13a7ead Added period for labels 2015-12-10 14:01:34 +03:00
Alex Lyulkov c8332eba27 Added node labels, fixed limiter bugs 2015-12-07 23:05:54 +03:00
Alex Lyulkov 4168ae1555 Fixed teleport config 2015-12-04 20:07:59 +03:00
Alex Lyulkov 18c8ff180a Refactored: renamed fqdn to domainName, renaimed CAservice names 2015-11-20 13:15:48 -08:00
Alex Lyulkov 8c7f849805 Added tests for permissions, everythink works 2015-11-13 19:47:59 -08:00
klizhentas 00ef621e6b Apply apache license to teleport 2015-10-31 11:56:49 -07:00
klizhentas 2174ea71ba start adding support for preconfigured user and host certificate authoritites 2015-10-25 19:30:42 -07:00
klizhentas 47f98fc89d add support for pre-configured trusted authorities 2015-10-25 16:13:12 -07:00
klizhentas 8cb3f63f39 fix orbit integration, tests and configuration samples 2015-10-25 14:48:03 -07:00
klizhentas 34201615c5 add vendoring 2015-10-20 14:09:25 -07:00
klizhentas 01a44d3fdc removed extra stuff 2015-10-20 14:09:07 -07:00
klizhentas 65ca5cb094 fix tests 2015-10-19 09:09:11 -07:00
klizhentas c58654d55f orbit-compatible packaging and configuration for teleport and telescope 2015-10-14 20:01:25 -07:00