mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 13:49:15 -05:00
[GH-ISSUE #1698] HTTP Basic Auth not working #10742
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jln-brtn on GitHub (Oct 19, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1698
Originally assigned to: @jln-brtn on GitHub.
Describe the Bug
According to the discussion #1682 , using the Basic Auth authentication failed in some situation, while it shouldn't. The user is therefor redirected to the pangolin login page.
However, it's working with Curl and Postman. The first analysis lead to an issue related to the browser use.
I'm investigating this issue.
Environment
To Reproduce
Expected Behavior
@jln-brtn commented on GitHub (Oct 19, 2025):
The problem has been identified: Browsers and some HTTP libraries do not send the Authorization header unless explicitly challenged.
This behavior is described in RFC 7617 :
The current implementation only works with clients that include the
Authorizationheader in the first request (like curl or Postman).To also support browsers, the authentication flow should follow this sequence :
Therefor, We need to decide which flow to adopt @oschwartz10612 :
Authorizationheader is provided. This forces the client to supply credentials.Side effect: the Pangolin login page will never be reached, effectively disabling SSO login.
protected.example.com, createapi.protected.example.comorprotected-api.example.com. Side effect: some web applications behind the proxy that cannot handle multiple domains may experience conflicts.If you have any other idea ?
@oschwartz10612 commented on GitHub (Oct 30, 2025):
@jln-brtn I am sorry for the delay in responding to this!
I am thinking maybe we go with option 1 but we make it an optional checkbox. So if you enable header auth you can choose to select the check box to "challenge browsers" with a code. This could be in the options when you set it up with a small explanation and warning about the consequences. That way if the option is not chosen you can still use header auth with the other auth methods. What do you think?
I was also thinking that we could try to have it so in the 401 response a simple html page is returned with a link to the login page for the resource. This way the user would not get confused and would have the option to fail the login challenge and then click the link to go to the regular auth. What do you think about that?
@jln-brtn commented on GitHub (Oct 30, 2025):
No worries !
I completely agree with both suggestions! I’ll start implementing these changes right away and aim to share progress soon.
@oschwartz10612 commented on GitHub (Oct 30, 2025):
Sounds good thanks so much for your help!!
For the returning the 401 page let me know what you think with that. We
might need to update gerbil to be able to do this if its even possible
with traefik the more I think about it.
@github-actions[bot] commented on GitHub (Nov 14, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@jln-brtn commented on GitHub (Nov 26, 2025):
UPDATE : Development is progressing well, but given my current workload and the upcoming holiday season, completion may take a bit more time than initially expected. I’m aiming to provide an update and deliver the final version in early 2026.
@oschwartz10612 commented on GitHub (Nov 26, 2025):
Thanks for the update @jln-brtn! Appreciate the help managing this feature.
@jln-brtn commented on GitHub (Dec 1, 2025):
Great news 🎉
I successfully solved this issue. Even better, I managed to include the redirection. This feature involves two modifications:
Please provide any feedback you may have.