Commit Graph

126 Commits

Author SHA1 Message Date
Min RK
beb2dae6ce add username_map 2016-01-13 14:02:50 +01:00
Min RK
887fdaf9d3 add username normalization
Handlers call `get_authenticated_user`, which in turn calls

- authenticate
- normalize_username
- check_whitelist

get_authenticated_user shouldn't need to be overridden.

Normalization can be handled via overriding normalize_username.
2016-01-13 14:02:50 +01:00
Brian E. Granger
77b31d8542 Minor fixes to the PR on docs and the default command. 2015-12-13 12:15:31 +01:00
Min RK
8fca4e859d create users with adduser
instead of useradd (on Linux).

- still user `pw useradd` on BSD
- allow complete custom add_user_cmd for specifying directories, etc.
2015-12-13 12:15:31 +01:00
David Blockow
d512ee9f65 Fixed to cope with a None handler passed in tests 2015-12-08 15:50:54 +10:30
David Blockow
e59b3f3ab1 Remote IP logged for failed authentication attempts 2015-12-08 15:00:29 +10:30
Min RK
fa8756767d add LocalAuthenticator.system_user_home 2015-12-01 10:36:06 +01:00
Min RK
6f2aefb990 add pre/post-spawn hooks for Authenticators
allows setup/cleanup to be performed by the authenticator

use this to open PAM sessions at spawn
and close them at stop,
rather than open at login and never close.
2015-10-16 12:02:44 +02:00
Min RK
15e50529ff use pamela instead of simplepam
and open PAM sessions after successful auth
2015-09-09 13:55:02 +02:00
Min RK
c289cdfaec remove dependency on IPython
- Standalone traitlets has been released, use it directly.
- Copy url_path_join from notebook
2015-06-22 16:02:45 -07:00
Min RK
b30be43d22 move admin_users from JupyterHub to Authenticator 2015-04-12 14:12:02 -07:00
Min RK
04b7056591 fix group-whitelist checks
and test it
2015-04-07 15:49:25 -07:00
Min RK
1bc8d50261 add "Login with..." button
for custom authenticators that use external services (e.g. OAuth)
2015-03-31 13:56:49 -07:00
Scott Sanderson
ed94c2d774 BUG: group_whitelist is a set, not a scalar. 2015-03-22 14:51:10 -04:00
Scott Sanderson
77c66d8b27 DEV: Make group/user whitelist mutually exclusive.
If group whitelist is provided, it takes precedence.
2015-03-19 10:42:55 -04:00
Scott Sanderson
33a4f31520 DEV: Allow setting a whitelist_group on LocalAuthenticator.
Any user in the group is considered in the whitelist.
2015-03-18 19:20:10 -04:00
Min RK
8cd2a55aa8 give Spawners, Authenticators db access
as self.db
2015-01-16 16:38:30 -08:00
Scott Sanderson
4c5de826c4 DEV: Make login a base-class default on Authenticator.get_handlers.
Rather than a module-level default.  Makes it easier for custom
Authenticators to unmount /login.
2015-01-14 17:40:57 -05:00
Min RK
d657d42c9a allow some auth methods to be async
- add_user
- add_system_user
- system_user_exists
- delete_user
2015-01-12 16:26:37 -08:00
Min RK
40a99e61ac drop support for old Python, IPython < 3
Require IPython >= 3.0, Python >= 3.3
2014-11-02 15:51:06 -08:00
MinRK
e07affe28f system_user_exists and add_system_user are static methods 2014-09-25 14:57:25 -07:00
MinRK
1a29328d06 Add Authenticator.add_user hook
and .delete_user

This hook can be used to trigger events,
such as user validation, or creating of system users.

Adds a LocalAuthenticator class that implements
checking for and rudimentary creation of system users.
2014-09-24 21:51:25 -07:00
MinRK
0577e10276 more hooks for authenticators
Allow authenticators to:

- register custom handlers
- change login and logout URLs
- replace the entire login form

This appears to be enough to get oauth working.
2014-09-22 22:17:00 -07:00
MinRK
5d701b7fd1 add Authenticator.whitelist
default behavior is to allow any user to attempt login
2014-09-13 13:45:05 -07:00
MinRK
8ca425fd8a make it a proper package
both jupyterhub and configurable-http-proxy
2014-08-20 20:26:02 -07:00
MinRK
a156d09d11 add configurable authentication
and coroutine auth and spawning
2014-08-20 11:16:45 -07:00