Min RK
a451f11cd3
give Spawners a handle on the Authenticator
...
band-aid for spawner-authenticator pairs
2015-09-11 11:57:41 +02:00
Min RK
63a476f9a6
remove some unused cruft from spawner
2015-09-11 11:23:00 +02:00
Min RK
02c8855d10
Merge pull request #264
...
add supplemental groups to single-user servers
closes #264
2015-07-07 12:31:33 -05:00
Min RK
b5877ac546
Catch failure to set gids
2015-07-07 12:28:17 -05:00
shreddd
d328015fe8
add supplemental groups to the local user notebook
...
Set the list of supplemental group ids for the user associated with the spawned notebook process. This allows users to access utilize their full complement of UNIX system groups. Currently the user is restricted to their default group - accessing a file owned by any other group does not work, even if a user is a member of that group. This patch fixes that.
2015-06-24 14:56:44 -07: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
86e31dffa5
add command traitlet
...
allows specifying commands as either strings or list.
This enables adding arguments to JupyterHub.proxy_cmd without breaking backward-compatibility.
2015-06-03 20:05:20 -08:00
Min RK
2890e27052
don't set empty values for HOME, SHELL
...
in weird cases (probably misconfigured systems),
these can be empty strings.
Leave them unset in such cases.
2015-04-12 11:04:17 -07:00
Min RK
12a1ec7f57
add missing allow_none=True in Spawner
2015-03-30 13:18:09 -07:00
James Davidheiser
7701b82f58
replace using server shell with user shell
...
Per discussion on PR, replaced the heavy-handed setting of the shell environment variable through the server environment variables.
2015-03-23 17:55:16 -07:00
James Davidheiser
7ca96e5c6c
spawner.py update for default shell
...
Update spawner.py to do a better job keeping the shell variable intact for terminals launched from within the notebook.
2015-03-23 17:55:16 -07:00
Min RK
545739472e
make default http timeout 30 seconds
...
some computers can be very slow to start
2015-03-13 12:04:07 -07:00
Scott Sanderson
0c3bce8b57
DEV: Make the timeout used by wait_for_http_server configurable.
2015-03-04 23:37:30 -05:00
Min RK
8043abc461
Merge pull request #161 from minrk/extra_args
...
add Spawner.args
2015-03-04 15:45:16 -08:00
Min RK
8ae0109322
make spawner IP configurable
...
mainly for localhost->127.0.0.1 config in pathological cases
2015-03-02 16:48:21 -08:00
Min RK
162a6a0ba7
add Spawner.args
...
easy access to specify extra args for `ipython notebook`
2015-03-02 16:46:03 -08:00
Min RK
8cd2a55aa8
give Spawners, Authenticators db access
...
as self.db
2015-01-16 16:38:30 -08:00
Min RK
53880f52b8
allow high latency spawners
...
such as VMs, batch and cloud services, etc. which can take minutes to start.
- Spawner.start_timeout sets a limit for true failure,
at which point spawner should be considered dead.
- Handler.spawn_single_user only waits up to 10 seconds
before returning. It can now return with a spawner still pending.
- Record User.spawn_pending state, and render 'pending' page
while server is starting but not started.
2014-12-22 13:27:23 -08:00
Min RK
c4913ffc96
remove sudo
...
add SudoSpawner in separate repo,
which works much better than this ever did.
2014-12-04 11:06:20 -08:00
Min RK
612e4ee332
make Spawner.notebook_dir configurable
...
resolved based on user's home dir
2014-11-04 13:53:01 -08:00
Min RK
f807a832e0
catch os.chdir errors
...
when spawning subprocesses.
Walk up until something works,
eventually falling back on a temper.
2014-11-04 13:52:18 -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
536b9b5e17
remove API token from spawner state
...
it's not needed - new tokens are created when spawners start
2014-10-27 17:29:45 -07:00
MinRK
0bd03f0861
remove cookie_secret from single-user servers
...
pass encrypted cookies to Hub for verification
2014-10-26 20:23:24 -07:00
MinRK
c9331702d5
use pgrep instead of ps to get sudo pid
...
not sure why it behaves differently, but it does.
2014-10-21 17:33:16 -07:00
MinRK
78bc79bcb9
use sudo kill
for signaling when subprocesses are started with sudo
...
In order for this to work, add to `/etc/sudoers`:
HUB_USER ALL=(JUPYTER_USERS) NOPASSWD:/bin/kill
2014-10-18 23:21:26 -07:00
MinRK
ed84a3e107
fix inappropriate clearing of API tokens
2014-10-15 11:27:30 -07:00
MinRK
a8548164cd
remove Spawner.fromJSON
...
load state on `__init__` instead
Makes more sense now that state can persist
across server instances (e.g. docker container_id)
2014-10-14 11:44:46 -07:00
MinRK
d8ef6d59c1
adjustments to Spawner.stop
...
- call start/stop_polling outside Spawner
(avoids need for custom spawners to reimplement)
- don't clear state when stopping Spawner
(should enable spawners to resume)
2014-10-08 13:54:17 -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
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
01323833bb
enable resuming Hub state from database
2014-09-21 22:50:01 -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
6f9b5107d2
mock out user-env
...
since tests don't use real users
2014-09-21 15:22:39 -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
MinRK
45e1822a2e
setgid and chdir before setuid
2014-09-20 18:31:27 -07:00
MinRK
83e9762845
add basic CLI and config file support
...
See `jupyterhub -h` for common shortcuts
default config file: `jupyter_hub_config.py`
generate config file with: `jupyterhub --generate-config`
non-default config file: `jupyterhub -f myconfig.py`
2014-09-16 14:47:48 -07:00
MinRK
eb225037ea
make shutdown timeouts configurable
2014-08-25 12:39:46 -07:00
MinRK
c0b83d2fa0
allow spawning with sudo
...
alternative to setuid
allows better restricted access, and doesn't require the server to run as root.
Enable with `--LocalProcessSpawner.set_user=sudo`
Since spawning with sudo is complicated, leave setuid as the default.
2014-08-25 12:39:00 -07:00
MinRK
87eb96d22a
pop environment variables in subprocess
...
avoid kernel processes inheriting server security values
2014-08-22 19:39:53 -07:00
MinRK
ef93fed9a4
spawn single-user servers as actual users
2014-08-20 11:31:09 -07:00
MinRK
a156d09d11
add configurable authentication
...
and coroutine auth and spawning
2014-08-20 11:16:45 -07:00
MinRK
c7acaec239
s/multiuser/jupyterhub
2014-08-19 17:44:30 -07:00