-
Notifications
You must be signed in to change notification settings - Fork 339
RuntimeWarning: Expected to see HubAuthenticatedHandler #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report! I'm looking into it. To alleviate security concerns while I do, exactly how hub auth gets patched into Jupyter Server handlers changed in a recent version of jupyterhub to be more efficient, so it patches the base handler class once on startup instead of repeatedly patching Handler instances on every request. This warning is the fallback where the one-time patch wasn't applied to a given handler, and the old way is taken instead (it is not removed to protect against exactly this eventuality), so auth should not be affected, but it will be a bit less efficient (and not any less efficient than it was a few months ago). This occurs when a handler isn't derived from the app's BaseHandler class. I have been able to reproduce this, and it occurs if you are using NotebookApp with jupyterlab as an Extension, since the jupyterlab extension uses the jupyter_server handlers, and only the Short answer, if you are using juptyerlab, set: c.Spawner.cmd = ["jupyter-labhub"] and the warning should go away because the old NotebookApp shouldn't be used anymore, everything ought to use jupyter_server and you should be set. The fix belongs in JupyterHub, to make sure we patch jupyter_server and notebook base handlers, because mixing the two is actually a valid thing to do, which I didn't fully realize. I'll transfer this issue to the jupyterhub repo, where the fix should reside. I'll also update the warning to include a reassurance that auth is still applied, just at a slightly different time to avoid causing undue stress. |
Oop, I don't seem to have permissions to transfer issues cross-org. No problem, I'll just link the PR to this issue. |
That's odd, I verified that you are an owner on the org. |
From the docs:
so it apparently can't be done. I could swear I've done it before, but who knows? 🤷 Not a big deal. jupyterhub/jupyterhub#3437 should fix it. |
Ahh, Meeseeks can do it though: jupyter/notebook#5996 (comment) |
Thanks a lot @minrk for the reassuring detailed answer. |
…rver and notebook and clarify warning when a base handler isn't patched that auth is still being applied - reorganize patch steps into functions for easier re-use - patch notebook and jupyter_server handlers if they are already imported - run patch after initialize to ensure extensions have done their importing before we check what's present - apply class-level patch even when instance-level patch is happening to avoid triggering patch on every request This change isn't as big as it looks, because it's mostly moving some re-used code to a couple of functions. closes jupyter-server/jupyter_server#488 Signed-off-by: Min RK <[email protected]>
jupyter-server/jupyter_server#488 might be causing our culling and missing defaultUrl issues. I do see the warning mentioned there present here. I think we're running ServerApp but we aren't 100% sure which is causing problems. Ref berkeley-dsep-infra#2452 Ref berkeley-dsep-infra#2460
jupyter-server/jupyter_server#488 might be causing our culling and missing defaultUrl issues. I do see the warning mentioned there present here. I think we're running ServerApp but we aren't 100% sure which is causing problems. Ref berkeley-dsep-infra/datahub#2452 Ref berkeley-dsep-infra/datahub#2460
jupyter-server/jupyter_server#488 might be causing our culling and missing defaultUrl issues. I do see the warning mentioned there present here. I think we're running ServerApp but we aren't 100% sure which is causing problems. Ref berkeley-dsep-infra/datahub#2452 Ref berkeley-dsep-infra/datahub#2460
jupyter-server/jupyter_server#488 might be causing our culling and missing defaultUrl issues. I do see the warning mentioned there present here. I think we're running ServerApp but we aren't 100% sure which is causing problems. Ref berkeley-dsep-infra/datahub#2452 Ref berkeley-dsep-infra/datahub#2460
jupyter-server/jupyter_server#488 might be causing our culling and missing defaultUrl issues. I do see the warning mentioned there present here. I think we're running ServerApp but we aren't 100% sure which is causing problems. Ref berkeley-dsep-infra/datahub#2452 Ref berkeley-dsep-infra/datahub#2460
Description
We have updated to JupyterLab 3 (and jupyter_server). And we are now seeing the following warning in the logs for all api handlers when starting JupyterLab user servers (using local process spawner):
Expected behavior
The warning is raising questions about the security of our infrastructure. Is it expected?
Context
jupyterlab 3.0.14 pyhd8ed1ab_0 conda-forge
The text was updated successfully, but these errors were encountered: