turnilo icon indicating copy to clipboard operation
turnilo copied to clipboard

Forward X-Headers (Trust Proxy) option

Open satybald opened this issue 6 years ago • 5 comments

We're running turnilo behind OAuth proxy and want to enable basic authorization control on druid broker server based on X-Forwarded-user header with Turnilo. I found there's a setting trustPoxy, however, as it based on express.js [1] it doesn't do the trick [2].

Is there a way how to pass X-Forward-User/X-Forward-email headers? Any advice is highly appreciated.

Related to: https://github.com/allegro/turnilo/issues/88

Sources:

[1] https://github.com/allegro/turnilo/blob/master/src/server/app.ts#L65 [2] https://expressjs.com/en/guide/behind-proxies.html

satybald avatar Feb 09 '19 08:02 satybald

I guess it will be really cool if Turnilo can trust all X-Forward* headers if it's behind a proxy and pass forward to the druid. cc: @mkuthan @adrianmroz

satybald avatar Feb 11 '19 13:02 satybald

Hey! I see your request but sadly I'm not well versed with express to help.

adrianmroz avatar Feb 12 '19 09:02 adrianmroz

would you agree with the approach that if turnilo is behind a proxy it should trust all X-Forward headers and Authorization header? @adrianmroz

satybald avatar Feb 13 '19 15:02 satybald

before jumping to any implementation, just want to understand what does core contributors think about the approach.

satybald avatar Feb 13 '19 15:02 satybald

Before jumping to further discussion it would be better to check plywood and plywood-druid-requester - Turnilo could forward anything but if the underlying libraries do not support additional headers it won't help anyway.

mkuthan avatar Feb 13 '19 20:02 mkuthan