Commit Graph

6911 Commits

Author SHA1 Message Date
MinRK
e2f12f7071 raise 400 when failing to create users 2014-09-25 14:49:06 -07:00
Min RK
2c8af78141 Merge pull request #53 from minrk/add_user
Add Authenticator.add_user hook
2014-09-24 22:01:09 -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
9178e361b9 export port 8000 in dockerfile 2014-09-24 21:10:41 -07:00
Min RK
5b4d41de85 Merge pull request #54 from minrk/dockerfile
derive Dockerfile from ipython/ipython:master
2014-09-24 21:07:31 -07:00
MinRK
c5926ff1bc derive Dockerfile from ipython/ipython:master
add ONBUILD ADD jupyter_hub_config.py so derivative images
can configure the hub server.
2014-09-24 20:53:08 -07:00
MinRK
9f07b51ec1 update user.last_activity when she visits the hub 2014-09-24 17:15:51 -07:00
MinRK
878535cfc4 use login_url on logout page 2014-09-24 10:47:44 -07:00
Min RK
8b84f91bab Merge pull request #52 from minrk/env
whitelist env to pass to spawned subprocesses
2014-09-23 11:41:24 -07:00
MinRK
d690ccf0ae whitelist env to pass to spawned subprocesses
rather than starting with everything.
Reduces risk of leaking security-related environment variables to kernels.
2014-09-23 11:33:38 -07:00
Min RK
a3e2837877 Merge pull request #51 from minrk/oauthtor
more hooks for authenticators
2014-09-22 22:20:42 -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
2393a30dec use '/api/routes' instead of '/api/routes/'
avoids need for recent fix in configproxy
2014-09-22 21:41:33 -07:00
Min RK
ee5ad66ba7 Merge pull request #50 from minrk/last_activity
store last_activity in the database
2014-09-22 20:02:37 -07:00
MinRK
bb9ca0e040 store last_activity in the database
fetch it periodically (10 minutes) from the proxy
and display it on the admin page
2014-09-22 17:25:10 -07:00
MinRK
34cebb5dba add Proxy.fetch_routes
and DRY up the api requests
2014-09-22 17:24:09 -07:00
Min RK
d19403e58e Merge pull request #49 from minrk/poll-spawners
periodically poll single-user servers
2014-09-22 16:56:33 -07:00
MinRK
7af715864c periodically poll single-user servers
If they aren't running, unregister them
and remove them from the proxy so that future
logins are handled by the hub, and spawn new servers.
2014-09-22 16:04:17 -07:00
MinRK
1f3fe9c84d simplify temporary login css 2014-09-22 12:19:04 -07:00
Min RK
f33bf7fea8 Merge pull request #43 from Carreau/better-login
improve login page styling
2014-09-22 11:56:04 -07:00
Matthias Bussonnier
e3946831d9 improve login page styling
fixup css
2014-09-22 08:17:58 +02:00
Min RK
ea04bdb30c Merge pull request #48 from minrk/resume-from-db
enable resuming Hub state from database
2014-09-21 22:57:17 -07:00
MinRK
f120ae6154 update mocking with load-from-db changes 2014-09-21 22:50:02 -07:00
MinRK
2a46893448 update proxy with already-running users at startup 2014-09-21 22:50:01 -07:00
MinRK
01323833bb enable resuming Hub state from database 2014-09-21 22:50:01 -07:00
MinRK
485ddd039c check if spawners are running before starting new ones 2014-09-21 22:44:51 -07:00
MinRK
fc93f1b0c2 allow resetting the database 2014-09-21 22:44:50 -07:00
MinRK
363d81a380 fix inverted logic in Server.is_up() 2014-09-21 22:44:50 -07:00
MinRK
3a0f19f1a4 cookie_secret is no longer bytes
add utils.random_hex for generating a unicode object
with random hex bytes
2014-09-21 22:44:50 -07:00
MinRK
2eb42eb0b3 add orm.User.find and orm.[Foo]Token.find
for simple get-by-name access
2014-09-21 22:44:50 -07:00
Min RK
cf64828d32 Merge pull request #46 from minrk/setuid-env
fix env when using setuid
2014-09-21 18:00:57 -07:00
MinRK
6f9b5107d2 mock out user-env
since tests don't use real users
2014-09-21 15:22:39 -07:00
Min RK
e4848e6432 Merge pull request #47 from minrk/single-user-auth-failure
handle failure to check authorization
2014-09-21 15:17:17 -07:00
MinRK
2cc0b1fbab handle failure to check authorization
JPY_* auth env variables are non-optional.
Refuse to start if they are undefined.
2014-09-21 15:13:52 -07:00
MinRK
b685ed902e fix env when using setuid
avoids subprocess identifying as root
2014-09-21 15:03:25 -07:00
MinRK
2bcc25e31d add Spawner.debug
for easy debugging of the single-process output
2014-09-21 15:00:38 -07:00
Min RK
6aa3e897ce Merge pull request #45 from minrk/singleuser-logout
send single-user logout to the Hub logout page
2014-09-21 13:46:35 -07:00
MinRK
deae294858 use 302 redirects 2014-09-21 13:45:51 -07:00
Min RK
50105b9e96 Merge pull request #44 from Carreau/fix-redirect
add some redirects
2014-09-21 13:43:32 -07:00
MinRK
54d63c19ea send single-user logout to the Hub logout page 2014-09-21 13:41:41 -07:00
Matthias Bussonnier
d56e8b9186 fix some redirect.
login redict to home if already loged in
/hub redirect to /hub/
2014-09-21 19:56:54 +02:00
Min RK
7b2fd29657 Merge pull request #42 from minrk/master
pass config to spawner
2014-09-20 18:34:27 -07:00
MinRK
45e1822a2e setgid and chdir before setuid 2014-09-20 18:31:27 -07:00
MinRK
0a2ddb7994 pass config to spawner 2014-09-20 18:31:00 -07:00
Min RK
f4544eb3e9 Merge pull request #41 from minrk/kernel_argv_2.x
don't pass notebook app args to kernel
2014-09-20 13:10:23 -07:00
MinRK
93a9acfa21 don't pass notebook app args to kernel
2.x compatibility fix
2014-09-20 12:13:24 -07:00
Min RK
43113689b5 Merge pull request #38 from minrk/restart-proxy
restart the proxy if it goes down
2014-09-19 17:25:09 -07:00
MinRK
82c06ebe98 always use transient IOLoop for run_sync 2014-09-19 17:21:55 -07:00
MinRK
24eebd94e4 make HTTP requests to the proxy async 2014-09-18 17:16:33 -07:00
MinRK
58b32f634a restart the proxy if it goes down
and populate its table from the database
2014-09-18 17:04:17 -07:00