Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Accommodate reverse-proxying for salt-api #63928

Open
nf-brentsaner opened this issue Mar 22, 2023 · 2 comments
Open

[FEATURE REQUEST] Accommodate reverse-proxying for salt-api #63928

nf-brentsaner opened this issue Mar 22, 2023 · 2 comments
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage Salt-API

Comments

@nf-brentsaner
Copy link

nf-brentsaner commented Mar 22, 2023

(Note: below references rest_cherrpy; I presume the same would be applicable for rest_tornado and maybe? rest_wsgi.)

Is your feature request related to a problem? Please describe.
Currently there is no way to define api_acl if reverse-proxying, as all requests will appear to come from the proxy server itself.

Describe the solution you'd like
A configuration directive should be provided for that can be used to assume the "real" client IP address, which would be passed by the reverse proxy. This is precisely what X-Forwarded-For and X-Forwarded-By (and, to a lesser extent, X-Forwarded-Proto) are for.

Describe alternatives you've considered
Implementing this directly on the reverse proxy, which is a PITA because eauth login is performed via the body instead of headers or HTTP Basic Authentication.

(That reminds me, HTTP Basic Auth per RFC 9110 could be implemented by using the realm space as the eauth method. But that's not what this FR is about.)

Additional context
N/A

Please Note
If this feature request would be considered a substantial change or addition, this should go through a SEP process here https://github.com/saltstack/salt-enhancement-proposals, instead of a feature request.

@nf-brentsaner nf-brentsaner added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Mar 22, 2023
@OrangeDog
Copy link
Contributor

Don't forget Forwarded

@nf-brentsaner
Copy link
Author

Don't forget Forwarded

7239, yep- good call!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage Salt-API
Projects
None yet
Development

No branches or pull requests

2 participants