Closed goakley closed 8 years ago
Thanks for submitting this. This was actually the solution I was thinking about suggesting for the auth discussion. This looks like a good start, but you're missing the logic in (*bufferList).add()
to make sure the auth
value matches the current node.
The line that currently reads:
if (*cur).query != query || (*cur).full {
Should now read:
if (*cur).query != query || (*cur).auth != auth || (*cur).full {
Without that change, only the first auth header for a given batch of a query string will be used, probably causing problems in a multi-user scenario.
Also, you'll need to sign the InfluxData CLA before I can merge this: https://influxdata.com/community/cla/
Understood and resolved. I didn't consider that different users could cause subtle differences in behaviour on the backend for the exact same query.
I'll sign the CLA as soon as I get an okay to do so on my end (I ran into this issue since we're prototyping InfluxDB at Thumbtack)
@goakley Any update on signing the CLA? If you're not able to, then I'll close this and re-implement the pass-through.
@joelegasse sorry about the delay, our legal process is new and thus ill-defined. If I can't have it by the beginning of next week then you can go ahead and re-implement it (I mostly care that it's there, not that I wrote it). I'll let you know.
Any progress on getting this merged?
@goakley, can you either sign the CLA or close this PR with "the lawyers won't let me"? :-)
HTTP 408 Lawyers Timeout
If there's not a new one submitted by the time they get back to me I'll resubmit.
@joelegasse lo and behold, I signed the CLA.
Awesome! Also, for future reference, the proper HTTP status code is 451 :-)
I realize there is a discussion going on about auth for the relay ( #13 ) . This implementation proposes just blindly forwarding the
Authorization
header if it's present. It seems to encompass the spirit of the relay, which is just to forward the request to each server. Query-string auth currently works with the relay since the entire query-string is forwarded, but basic auth did not. Since Telegraf uses basic auth and not query-string auth, data from telegraf fails to pass through the relay without this fix, which is a major issue.