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

Add support for custom authentication headers #3224

Open
soapergem opened this issue Feb 5, 2023 · 0 comments
Open

Add support for custom authentication headers #3224

soapergem opened this issue Feb 5, 2023 · 0 comments

Comments

@soapergem
Copy link

I would like to propose adding support for specifying custom HTTP headers to be sent to the Luigi scheduler. I am specifically thinking about customizing the Authorization header but I don't think there's any reason to limit things to that header only.

Zero Trust Networking is becoming a more common pattern and often involves proxying services through an Identity-Aware Proxy. So for instance, someone might front their deployment of the Luigi Scheduler with an IaP, meaning that when you try to access the scheduler web endpoint, you will first be redirected to an Identity Provider's (IdP) login form to complete an OAuth follow before being served the Luigi Scheduler web page. Practically speaking this means a special auth header is used to validate that you are authorized to access the scheduler. This is true for both the visualizer (which already works under this model) and for programmatic access, e.g. submitting jobs (which does not currently work behind an IaP). Without the appropriate header included, one wouldn't be able to submit any jobs, when configured with an IaP as described.

Thus, I'm envisioning submitting jobs with custom headers with the introduction of an --add-header argument, like this:

$ luigi --module top_artists AggregateArtists --scheduler-host luigi.my-domain.com --scheduler-port 8082 --add-header "Authorization: Bearer my-custom-header-value"

I suppose we would also want to come up with some contract for expressing multiple add_header options in a config file as well. I'm open to suggestions on how to name and format those.

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

No branches or pull requests

1 participant