Commit Graph
130 Commits
Author SHA1 Message Date
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
a-palchikov 679941fc17 lib/web: add package-level logger (#4645)
* lib/web: update logging to go through a package-level logger.
Updates https://github.com/gravitational/teleport/issues/4110.
* Unify uses of package-level logger. Update e
* Fix linter warning and tests
* Address review comments
2020-11-05 20:46:54 +01:00
Ev Kontsevoy 3c6325f283 Code refactoring before trying to fix #669
Web UI backend used very generic and hard to follow naming conventions,
like "connect" or "connectHandler" or "newHandlerRequest".

Renaming everything to something easier to follow, like "makeTerminal"
or "newTerminalRequest"

Even the source file is renamed from "connect.go" to "terminal.go"
2016-12-31 16:14:56 -08:00
Sasha Klizhentas 98e613a4ea web tests recovered 2016-12-30 13:25:35 -08:00
Alexey Kontsevoy 733b88f8f4 (web) fix unit-tests and clean-up 2016-12-25 21:47:14 -05:00
Alexey Kontsevoy 44fdb226b2 Merge branch 'master' of github.com:gravitational/teleport into clr-dropdown 2016-12-25 13:01:11 -05:00
Sasha Klizhentas 8ab3add372 map OIDC scopes to roles, implements #620 2016-12-24 14:42:33 -08:00
Alexey Kontsevoy ca74e7c4d1 resolving merge conflicts 2016-12-24 15:14:05 -05:00
Alexey Kontsevoy 0d9335a4d8 Merge branch 'master' of github.com:gravitational/teleport into clr-dropdown 2016-12-24 15:08:13 -05:00
Alexey Kontsevoy a9c4fe7b2e expand webapi 2016-12-24 14:58:33 -05:00
Sasha Klizhentas aa41f032a3 more fixes 2016-12-20 14:01:46 -08:00
Sasha Klizhentas 0793fe1d82 fix possible panic in GetSession 2016-12-20 11:52:15 -08:00
Sasha Klizhentas 5abf6d44d5 continue fixing tests and code 2016-12-18 16:58:53 -08:00
Sasha Klizhentas cedacb92aa migrate users, add role per user 2016-12-16 11:25:17 -08:00
Sasha Klizhentas 2dceb42547 Merge branch 'master' into sasha/rbac 2016-12-14 16:36:55 -08:00
Sasha Klizhentas 7e97b10032 add support for namespaces almost everywhere 2016-12-14 15:48:36 -08:00
jcj83429 f2e589ee53 fix hiding of u2f-related things in web ui when u2f is disabled 2016-12-10 20:01:12 -08:00
Sasha Klizhentas 0f4db522b9 add interface support 2016-12-09 17:31:05 -08:00
Alex Charles 9e743f803a Some cleanup for PR. Mostly appId -> appID, U2f -> U2F 2016-12-08 02:23:51 -08:00
jcj83429 0f0cea1009 rename web APIs
signinpreauth -> signin/preauth
u2f/inviteregisterrequest -> u2f/signuptokens
u2f/newuser -> u2f/users
u2f/signrequest/:user -> u2f/users/:user/sign
2016-12-07 17:25:16 -08:00
Jay ade8b1dc7b Fixed merge conflicts with original repository 2016-11-30 17:08:20 -08:00
jcj83429 06b33cca59 rename u2f apis to remove underscores 2016-11-30 12:05:50 -08:00
Pablo Terradillos 638de1e251 Support for multiple oidc providers 2016-11-30 14:03:50 -03:00
jcj83429 4bbca0b2eb Merge branch 'master' into u2f 2016-11-29 20:54:17 -08:00
jcj83429 d795ca006e hide u2f related stuff from web ui if appid is set to empty
to allow the admin to disable u2f
2016-11-28 01:12:03 -08:00
jcj83429 c2e7b5312b add u2f appid to the config.js.
will make web ui hide u2f-related stuff if u2f appid is empty
2016-11-28 00:21:37 -08:00
Ev Kontsevoy b481739b80 Merge branch 'master' into ev/512 2016-11-17 20:29:24 -08:00
jcj83429 9f95057136 document the u2f related web endpoints 2016-11-10 19:05:00 -08:00
dmitri 977b610777 Set valid expiration time in the future in CreateSessionResponse. 2016-11-07 15:36:54 +01: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 c1b14333c8 Intermediate implementation
1. Everything works.
2. No tests.
2016-10-30 19:35:57 -07:00
jcj83429 a122452345 Merge branch 'master' into u2f
Conflicts:
	lib/config/fileconf.go
	web/src/app/services/auth.js
2016-10-30 17:39:50 -07:00
Ev Kontsevoy f356408c68 Merge branch 'master' into lib/update 2016-10-27 14:38:36 -07:00
Sasha Klizhentas bbd40bbe75 fix test 2016-10-26 15:54:26 -07:00
Sasha Klizhentas f10cdbeb90 Add method to customize web session output 2016-10-26 15:39:02 -07:00
Alexey Kontsevoy 5ab7b07feb updating babel and other libs 2016-10-26 13:01:30 -04:00
jcj83429 2cff2aaa66 Merge upstream 'master' into u2f
Conflicts:
	lib/config/fileconf.go
	tool/tsh/main.go
2016-10-24 00:08:26 -07:00
jcj83429 739308c5ae got u2f login working on the CLI client.
also grouped the u2f webapi endpoints together,
and fixed the default u2f AppID so it works out of the box
2016-10-22 20:43:44 -07:00
Ev Kontsevoy 25d23af77f Merged changes from master 2016-10-16 19:01:59 -07:00
jcj83429 bb0a25d617 Implemented U2F authentication on the server side 2016-10-16 14:03:43 -07:00
jcj83429 b79c4cffba Implmented U2F registration and some of authentication on the server side
I know comments are very lacking right now. Once things are stable I will add
proper comments. Minimal manual testing of the U2F registration API was done
with a hardware U2F key. Some of the code may need to be cleaned up later to
remove excessively long variable names...

Currently we return an error rightaway if the username/password combo is wrong.
It's difficult to do U2F without revealing either whether a user exists or
whether the password is correct. Returning error immediately reveals whether
the user/password combo is valid, while waiting until we get a signed response
from the U2F device to announce whether the user/pass combo is valid can reveal
which users exist since we need to return a keyHandle in the U2F SignRequest
and generating fake keyHandles for nonexistent users can be difficult to get
right since there is no rigid format for keyHandle.
2016-10-13 23:51:16 -07:00
Ev Kontsevoy 1dc2d9c414 Intermediate commit where "standalone mode" kind of works
What works:

1. You have to start all 3: node, proxy and auth.
2. Login using 'tsh' (so it will create a cert)
3. Then you can shut 'auth' down.
4. Proxy and node will stay up and tsh will be able to login.

What doesn't work:

1. Auth updates are not visible to proxy/node (like new servers)
2. Not sure if "trusted clusters" will work.
2016-10-10 21:19:55 -07:00
Ev Kontsevoy ec880ae700 Fixed resource leaks and removed dead code
Refs #508
2016-08-21 23:19:09 -07:00
Ev Kontsevoy af67bfb9a8 Changed "page size max" for stream fetching from 512Kb to 10MB 2016-05-09 14:43:05 -07:00
Ev Kontsevoy 5458e5e0d6 Properly set content-type for gzipped responses
Fixes #399
2016-05-08 21:23:28 -07:00
Ev Kontsevoy b175d92052 PR comments - implemented! 2016-05-07 21:51:35 -07:00
Ev Kontsevoy 1848bd3e82 Added gzip compression for chunk reading during replay 2016-05-06 15:27:46 -07:00
Ev Kontsevoy f2c53cd1b5 Experiment: 100% binary stream available for web session player 2016-05-06 13:50:15 -07:00
Ev Kontsevoy f27e207afc Replaced weg sockets with HTTP POST/GET chunks 2016-05-05 23:51:56 -07:00
Ev Kontsevoy be5e73dcd0 Bugfix 2016-05-04 14:55:14 -07:00