Code Monkey home page Code Monkey logo

Comments (2)

mahendrapaipuri avatar mahendrapaipuri commented on June 6, 2024

We noticed a similar behaviour in our announcement service which is based jupyterhub-announcement. The main take away is that when we put the GET method of announcement under authenticated decorator, these redirect loops happen.

This can be verified from the official service-announcement as well. Simply add web.authenticated to get method here and running the example as per instructions will show a bunch of redirects in browser console. Server logs show them as well:

[I 2024-04-10 18:44:31.501 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.502 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 1.63ms
[I 2024-04-10 18:44:31.588 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.588 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 1.42ms
[I 2024-04-10 18:44:31.621 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.621 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 1.69ms
[I 2024-04-10 18:44:31.664 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.665 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 5.38ms
[I 2024-04-10 18:44:31.681 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.682 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 2.75ms
[I 2024-04-10 18:44:31.696 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.697 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 3.04ms
[I 2024-04-10 18:44:31.713 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.714 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 2.86ms
[I 2024-04-10 18:44:31.724 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.724 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 1.64ms
[I 2024-04-10 18:44:31.733 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.733 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 1.43ms
[I 2024-04-10 18:44:31.742 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'818e4faa1d8443a683ad8e92b98af799:1104f2f2b64e4265b081fadaadfe1099' {'path': '/hub/'}
[I 2024-04-10 18:44:31.743 JupyterHub log:192] 302 GET /hub/login?next=%2Fservices%2Fannouncement%2F -> /services/announcement/ ([email protected]) 1.43ms

from jupyterhub.

minrk avatar minrk commented on June 6, 2024

I believe the whoami-api link would have stopped working in JupyterHub 2.0. It's not meant to work, as documented in the README for the example (it's api-only). #4797 fixes this to 403 instead of a redirect loop.

from jupyterhub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.