Using dummy authentication, the logged in user cannot exit

My environment is jupyterhub + k8s + jupyterlab, and the authentication uses dummy.

I can start and log in normally, but I can’t log out.

Configuration for authentication:

c.JupyterHub.authenticator_class = 'dummy'
c.Authenticator.admin_users = {'root'}
c.Authenticator.allowed_users = {'root','limy'}

log information of logout:

[I 2021-08-23 17:51:15,267 configurable_http_proxy] 200 GET /api/routes
[I 2021-08-23 17:51:15.286 JupyterHub proxy:347] Checking routes
[I 2021-08-23 17:52:06.310 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret] (limy@ 14.87ms
[I 2021-08-23 17:53:04.306 JupyterHub login:44] User logged out: limy
[I 2021-08-23 17:53:04.316 JupyterHub log:189] 302 GET /hub/logout -> /hub/login (@ 18.21ms
[I 2021-08-23 17:53:04.335 JupyterHub log:189] 302 GET /hub/login -> /user/limy/ (limy@ 7.23ms
[I 2021-08-23 17:53:04.406 JupyterHub log:189] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-limy&redirect_uri=%2Fuser%2Flimy%2Foauth_callback&response_type=code&state=[secret] -> /user/limy/oauth_callback?code=[secret]&state=[secret] (limy@ 16.16ms
[I 2021-08-23 17:53:04.451 JupyterHub log:189] 200 POST /hub/api/oauth2/token (limy@ 27.31ms
[I 2021-08-23 17:53:04.466 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret] (limy@ 11.73ms
[I 2021-08-23 17:53:11.183 JupyterHub login:44] User logged out: limy
[I 2021-08-23 17:53:11.191 JupyterHub log:189] 302 GET /hub/logout -> /hub/login (@ 12.54ms
[I 2021-08-23 17:53:11.218 JupyterHub log:189] 302 GET /hub/login -> /user/limy/ (limy@ 6.41ms
[I 2021-08-23 17:53:11.282 JupyterHub log:189] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-limy&redirect_uri=%2Fuser%2Flimy%2Foauth_callback&response_type=code&state=[secret] -> /user/limy/oauth_callback?code=[secret]&state=[secret] (limy@ 13.58ms
[I 2021-08-23 17:53:11.323 JupyterHub log:189] 200 POST /hub/api/oauth2/token (limy@ 23.23ms
[I 2021-08-23 17:53:11.340 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret] (limy@ 13.10ms
[W 2021-08-23 17:53:13.002 JupyterHub log:189] 403 POST /hub/api/users/qwe/activity (@ 3.79ms
[W 2021-08-23 17:53:13.551 JupyterHub log:189] 403 POST /hub/api/users/qwe/activity (@ 2.85ms
[W 2021-08-23 17:53:14.155 JupyterHub log:189] 403 POST /hub/api/users/qwe/activity (@ 3.28ms
[W 2021-08-23 17:53:15.172 JupyterHub log:189] 403 POST /hub/api/users/qwe/activity (@ 3.08ms

Screenshot of problem location:

Add self-test information:

When the logout invalid configurable-http-proxy is 0.2.1 version, and use pip to install.

I uninstall the PIP installation package, and use the NPM installation to log out.

The reason why I use pip to install configurable-http-proxy is that I need to rewrite the authenticator and run the jupyterhub project in pycharm, but the pycharm package cannot find configurable-http-proxy when running the project.

Is there a better way to handle the exception that configurable-http-proxy cannot be found when pycharm runs the jupyterhub project?

The Python implementation of configurable-http-proxy is separate from the official NPM, so there may be differences. If you have problems it’s best to test with the NPM version.

I’ve never used pycharm, but my guess is it’s not using the correct path to find the required executables.

Thanks !

I now use NPM’s configurable HTTP proxy for testing and can log out normally