krassowski
88189d54d9
Add a test for allow_unauthenticated_access
(xfail)
2024-04-10 10:58:21 +01:00
Min RK
d2a07aaf1b
forward-port 4.1.0
2024-03-20 13:21:34 +01:00
Min RK
83ce6d3f6b
forward-port 4.1.0
2024-03-19 18:45:58 +01:00
Min RK
c281c82220
resolve paths in disable_user_config
...
handles home directory being a symlink
2024-02-27 13:25:53 +01:00
pre-commit-ci[bot]
ef568e3d61
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-02-05 20:27:29 +00:00
Min RK
6da692523c
avoid setting unused oauth state cookies on API requests
...
get_login_url may raise 403 to short-circuit redirects,
so don't create the oauth state cookie until _after_ that has happened
2023-11-13 10:16:38 +01:00
Min RK
3a52b5be72
test: ensure test server is added to proxy before talking to it
...
this should fix some flaky test failures in test_singleuser
not sure why it doesn't _always_ fail
2023-10-27 12:21:19 +02:00
Min RK
ff51aa40a5
jupyverse doesn't implement Jupyter-standard token auth
2023-09-12 09:49:16 +02:00
Min RK
3b2af29653
singleuser extension: persist token from ?token=... url in cookie
...
matches pre-extension behavior
2023-09-11 14:35:31 +02:00
pre-commit-ci[bot]
9f208881d9
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-08-21 14:41:52 +00:00
David Brochart
f45ad335c3
Move pytest skip to test function decorator
2023-08-21 16:38:47 +02:00
David Brochart
d1cf683fff
Skip some jupyter-server specific tests
2023-08-03 15:32:29 +02:00
Min RK
bb2c91dd1e
skip notebook dir extension test without jupyter-server 2
2023-07-07 08:17:29 -07:00
Min RK
0528a06e03
fix singleuser extension typo
...
Co-authored-by: Simon Li <orpheus+devel@gmail.com >
2023-07-07 08:17:29 -07:00
Min RK
e28dbe949e
set root_dir when using singleuser extension
...
and make sure Spawner.notebook_dir config is tested
2023-07-03 12:56:08 +02:00
Min RK
4c1df3f3fe
fix hub_host links with subdomains
...
- fixes missing hub_host in singleuser mixins
- fixes test to match extension behavior, which is correct
2023-02-16 14:16:46 +01:00
Min RK
9a49d06b21
consolidate disable_user_config implementation
...
found some fixes required to run on ServerApp to affect extensions,
which were not affected before
2023-02-10 08:21:02 +01:00
Min RK
58dccdb59b
jupyterhub-singleuser as a Jupyter Server 2.0 extension
...
mostly a copy (fork) of singleuser app
using public APIs instead of lots of patching.
opt-in via `JUPYTERHUB_SINGLEUSER_EXTENSION=1`
related changes:
- stop running a test single-user server in a thread. It's complicated and fragile.
Instead, run it normally, and get the info we need from a custom handler registered via an extension
via the `full_spawn` fixture
2023-02-02 16:14:06 +01:00
Min RK
abe1136cba
Use XSRF tokens for cross-site protections
...
Removes all Referer checks, which have proven unreliable and have never been particularly strong
We can use XSRF on paths for more robust inter-path protections.
- `_xsrf` is added for forms via hidden input
- xsrf check is additionally applied to GET requests on API endpoints
2023-01-16 09:35:33 +01:00
pre-commit-ci[bot]
865d5f7646
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-11-16 14:53:12 +00:00
Erik Sundell
75e03ef1d9
Merge pull request #3976 from minrk/bump-versions
...
Require Python 3.7
2022-07-29 10:42:15 +02:00
Min RK
cef241a80b
test: handle possibility that notebook is unavailable
...
no longer a strict dependency of other test deps
2022-07-14 21:07:57 -07:00
Min RK
a7cced506b
Remove 3.6 compatibility shims
...
- asyncio.all_tasks/current_task
- pytest-asyncio 0.17
- contextmanager.nullcontext
2022-07-14 09:05:01 -07:00
Min RK
1cb7177597
ensure custom template is loaded with jupyter-server notebook extension
...
our patches to page.html didn't affect nbclassic,
which gets its own jinja environment
regression test included
2022-06-01 16:13:10 +02:00
Min RK
7a9778249f
run pre-commit with isort
2022-03-31 12:33:26 +02:00
Min RK
4082006039
2.0: jupyterlab by default
...
swaps from default nbclassic and opt-in to lab, to now default to lab and opt-in to nbclassic
defaults to jupyterlab *if* lab 3.1 is available,
so should still work without configuration if lab is unavailable (or too old)
2021-09-23 14:52:14 +02:00
0mar
7a3b237bb3
Refactored scope names and updated docs to reflect this
2021-06-15 13:00:15 +02:00
Min RK
1dab57af6f
remove invalid access scope test
2021-06-08 09:48:11 +02:00
Min RK
fbea31d00a
support groups in _intersect_scopes
...
Requires db resolution
2021-06-08 09:35:45 +02:00
Min RK
69d2839ba3
test access scopes in authorize handler
...
- provider.add_client returns the client
- fix Spawner access scopes
- debug logging in mock spawners
- Assign service access scopes
2021-06-07 14:02:10 +02:00
Min RK
b552e364f3
Merge master into rbac
2021-03-22 12:29:48 +01:00
0mar
c5ebee0ca0
Fixed scope related tests
2021-03-12 09:40:36 +01:00
Min RK
d3147f3fb7
make_singleuser_app: patch-in HubAuthenticatedHandler at lower priority
...
apply patch directly to BaseHandler instead of each handler instance
so that overrides can still take effect (i.e. APIHandler raising 403 instead of redirecting)
2021-01-29 14:07:05 +01:00
Erik Sundell
4cbc0bad34
Merge branch 'master' into remove-unused-imports
2020-10-01 12:07:37 +02:00
Min RK
d0da677813
infer default mixins from $JUPYTERHUB_SINGLEUSER_APP
...
set to e.g. JUPYTERHUB_SINGLEUSER_APP=jupyterlab.labapp.LabApp for JupyterLab
2020-07-24 13:06:35 +02:00
Steffen Vogel
e93cc83d58
remove unused imports
2020-04-16 12:12:22 +02:00
Min RK
5e60582ef3
run autoformat
...
apologies to anyone finding this commit via git blame or log
run the autoformatting by
pre-commit run --all-files
2019-02-19 17:00:10 +01:00
Min RK
37cdba370f
update tests for pytest-asyncio
...
- remove gen_test marker
- use async def
- find/replace yield->await approximately one million times
2018-12-12 13:06:10 +01:00
Min RK
03aa48a88c
update tests with oauth confirmation
...
cross-user / service oauth tests must submit oauth confirmation form
to complete authorization
2018-09-10 15:18:12 +02:00
Min RK
2bded65c7e
update singleuser auth test url check
...
handle `?redirects`
2018-03-21 12:58:59 +01:00
Min RK
684afed3f1
restore user.running property
...
it was made a method for handing named_servers,
but that made things way more complicated and replaced a boolean flag with a callable,
which would behave unexpectedly but without error if a boolean flag was expected.
Spawners have properties for dealing with this now, so use spawners
Restore `user.running` as an alias for `user.spawner.ready`
2017-08-03 11:09:27 +02:00
Min RK
91d042f6f3
get the rest of tests running without threads
...
all tests pass!
2017-07-27 11:29:58 +02:00
Min RK
4b5aad41b1
make user.running a method
...
accept server names
2017-07-18 14:48:29 +02:00
Min RK
fe85a79ae3
403 in services_auth tests
2017-06-08 19:00:35 +02:00
Min RK
dda3762b48
raise 403 on disallowed user, rather than redirect to login url
...
raise UserNotAllowed exception in generic `check_hub_user`
when a user or service is identified and not allowed.
turn it into `HTTPError(403)` in tornado `get_current_user` wrapper,
caching `None` so that subsequent calls don't re-trigger the same error.
2017-06-07 15:30:12 +02:00
Carol Willing
5df16371e1
Rename class used in test cases to StubSingleUserSpawner
2017-01-20 10:49:59 -08:00
Min RK
080cf7a29b
exercise single-user help output
...
and tweak some of its output
2016-09-15 13:04:09 +02:00
Min RK
26b00578a1
remove redundant user_url utility
...
public_url works for users now
2016-09-02 13:22:49 +02:00
Min RK
844381e7c9
use HubAuthenticated in jupyterhub-singleuser
2016-05-31 13:20:21 +02:00