Commit graph

73 commits

Author SHA1 Message Date
Alex Charles 9e743f803a Some cleanup for PR. Mostly appId -> appID, U2f -> U2F 2016-12-08 02:23:51 -08:00
jcj83429 0274afba8d group the u2f configs in auth_service
OLD:
auth_service:
  u2fappid: https://mycorp.com/appid.js
  u2ftrustedfacets:
  - https://proxy1.mycorp.com:3080
  - https://proxy2.mycorp.com:3080

NEW:
auth_service:
  u2f:
    enabled: yes
    appid: https://mycorp.com/appid.js
    facets:
    - https://proxy1.mycorp.com:3080
    - https://proxy2.mycorp.com:3080
2016-12-07 19:37:22 -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
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 0a7733ff52 add U2F Trusted Facets to configuration files. Trusted facets must include
the domain names of all proxies that users will log in with U2F from.
2016-10-16 21:03:09 -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 baafe3a332 Renamed GetLocalDomain() to GetDomainName() 2016-10-09 17:27:56 -07:00
Ev Kontsevoy 263ec1ca1e Added "samples" directory with sample configurations
Also some minor changes around error reporting...
2016-10-09 16:33:18 -07:00
Ev Kontsevoy 9f9c586989 Account lock after N unsuccessful login attempts 2016-05-30 16:17:47 -07:00
Ev Kontsevoy 7a1d799137 Fixed tests 2016-05-16 20:36:03 -07:00
Ev Kontsevoy 18e8a7c56b Added a nicer error message ...
for when a user tries to delete a statically configured token
2016-05-16 20:32:17 -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 b6f3fc529b Minor refactorings and configs for the vagrant environment 2016-05-12 20:57:36 -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 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 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
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 5e01bc3d55 Merge branch 'ev/log' of github.com:gravitational/teleport into ev/log 2016-04-28 17:42:14 -07:00
klizhentas ce33368e58 fix various 2FA and OIDC login hiccups 2016-04-19 14:56:01 -07:00
klizhentas c77be08521 simplify API 2016-04-14 17:50:54 -07:00
klizhentas d68e693cad migrate to trace errors 2016-04-12 11:07:14 -07:00
klizhentas d2a76a323e add ability to bypass user check 2016-04-10 15:44:01 -07:00
klizhentas e1808b8579 some interface adjustments 2016-04-10 13:29:32 -07:00
klizhentas fb1ec24af6 fix logins 2016-04-05 10:53:08 -07:00
klizhentas 383ebe2858 implement pluggable user models 2016-04-05 09:58:16 -07:00
klizhentas f281770786 introdoce user interface 2016-04-04 18:58:36 -07:00
klizhentas e3ab6b3708 allow to log in 2016-04-04 17:26:15 -07:00
klizhentas f398534515 moving code around and splitting interfaces 2016-04-04 17:09:00 -07:00
klizhentas 8874d916de Merge branch 'master' into sasha/oidc 2016-04-04 13:21:02 -07:00
klizhentas 6f885e443a take expiry provided by OIDC into consideration 2016-04-04 11:58:52 -07:00
klizhentas 4ff59c59b5 support draft console login 2016-04-03 15:06:50 -07:00
Ev Kontsevoy 757c34a755 Added the ability to stop teleport without restarting the process 2016-04-03 12:17:28 -07:00
klizhentas 949df66eb3 implement OIDC web server side flow 2016-04-03 11:34:59 -07:00
klizhentas 84cade14c5 draft OIDC support 2016-04-02 22:20:51 -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
klizhentas 7263a3fd18 remove backend PGP encryption 2016-03-10 09:41:01 -08:00
klizhentas 0e503ca376 Add proper integration with OpenSSH on both sides 2016-03-09 19:39:15 -08:00
Ev Kontsevoy 3bed94a7c6 Hostname handling changes:
1. `--name` setting is passed through into AuthServer as "AuthServiceName".
   This will be used in UIs when there are multiple clusters, and also
   in places like Google Authenticator

2. `tctl nodes ls` now lists both host name and host UUID

3. Changed `--name` setting to `--nodename` to be consistent with the
   config file.

Closes #194
2016-03-05 16:54:58 -08:00
Ev Kontsevoy 6151ab208a Bugfix: --proxy=localhost did not work
`web.SSHAgentLogin(proxyAddr string)` expects proxyAddr string to be a
URL, while everywhere else we address servers by host:port pair.

Because of that, `--proxy=host` sytax was broken.
2016-03-04 20:14:41 -08:00
Ev Kontsevoy 2d66f99f48 Adding new host does not require a name 2016-03-04 18:13:00 -08:00
Ev Kontsevoy 42f55959ed Intermediate commit 2016-03-04 16:27:52 -08:00
klizhentas dbca78bd3e add session renewal, faster expiration times, race conditions fixes 2016-02-26 14:57:51 -08:00
klizhentas 16b0f15dc5 return user structure instead of name 2016-02-25 11:30:59 -08:00
klizhentas d5f24e5c39 implement new session management and user signup API 2016-02-23 17:26:23 -08:00
Ev Kontsevoy ddcd4bf704 Brought back configure/cstrings 2016-02-22 17:12:59 -08:00
Ev Kontsevoy 0a63a557bc Merge remote-tracking branch 'origin/master' into ev/133-newconf
Conflicts:
	lib/reversetunnel/srv.go
2016-02-22 14:18:51 -08:00
Ev Kontsevoy e230447f2e Properly vendored dependencies
- removed `gravitational/configure`
2016-02-22 14:11:31 -08:00
klizhentas 1f4afad8f4 add support for direct access to sites without reverse tunnels, fixes #114 2016-02-21 14:39:32 -08:00