Skip to content

Add possibility to provide headers for login requests#173

Merged
mraineri merged 2 commits intoDMTF:mainfrom
BFuhry:bfuhry/loginHeaders
Mar 7, 2025
Merged

Add possibility to provide headers for login requests#173
mraineri merged 2 commits intoDMTF:mainfrom
BFuhry:bfuhry/loginHeaders

Conversation

@BFuhry
Copy link
Copy Markdown
Contributor

@BFuhry BFuhry commented Mar 5, 2025

A generic change allowing to set arbitrary headers on the login request, which is already supported by, e.g., get, head, and post.

In my case, I want to access a RedFish endpoint, which is only reachable using local port forwarding. In such a situation, the authentication requests leads to a Base.1.12.AccessDenied. Presumably because the request is for localhost:<forward port> instead of <bmc ip>:<bmc port>. This can be resolved by setting the Host HTTP header to <bmc ip>, which I can easily do with the proposed change.

Signed-off-by: Benny Fuhry <benny@cheffu.de>
@BFuhry BFuhry force-pushed the bfuhry/loginHeaders branch from 343e1c3 to 5358981 Compare March 5, 2025 03:30
Comment thread src/redfish/rest/v1.py Outdated
Signed-off-by: Benny Fuhry <benny@cheffu.de>
@mraineri
Copy link
Copy Markdown
Contributor

mraineri commented Mar 5, 2025

Looks good on my end! We'll have a wider review later this week for formal acceptance

@mraineri
Copy link
Copy Markdown
Contributor

mraineri commented Mar 7, 2025

Approved 3/7

@mraineri mraineri merged commit 731101f into DMTF:main Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants