fix(auth): honor HERMES_DASHBOARD_PUBLIC_URL for self-hosted OIDC callback (#42780)#42937
Open
rodboev wants to merge 1 commit into
Open
fix(auth): honor HERMES_DASHBOARD_PUBLIC_URL for self-hosted OIDC callback (#42780)#42937rodboev wants to merge 1 commit into
rodboev wants to merge 1 commit into
Conversation
Contributor
|
Positive verification — clean security fix. The approach of persisting Observations:
No issues found. |
4d06527 to
754845e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Self-hosted dashboard OIDC login could still build an
http://.../auth/callbackredirect behind Docker and reverse proxies even whenHERMES_DASHBOARD_PUBLIC_URLwas set to the correct publichttps://...origin. This PR makes the env-backed public URL path authoritative for the self-hosted callback flow and adds a regression so proxy-derived scheme inference cannot override it.What Changed
hermes_cli/dashboard_auth/prefix.pyand/orhermes_cli/dashboard_auth/routes.py: keep self-hosted callback construction on the documented public-url authority pathhttps://<public>/auth/callbackwhen onlyHERMES_DASHBOARD_PUBLIC_URLis configuredWhy It Matters
Operators running Hermes behind reverse proxies should not have to duplicate the public callback origin into
config.yamlwhen the documented env override is already present. This restores the advertised Docker/reverse-proxy deployment behavior and prevents OIDC providers from rejecting the callback before login even begins.Verification