Netflix / vector

Vector is an on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser.
http://getvector.io/
Apache License 2.0
3.58k stars 253 forks source link

add support for proxy authorization header to pmapi service #181

Open martin2176 opened 6 years ago

martin2176 commented 6 years ago

Is there a way to enhance security for vector connecting to pmwebd?

going by "man pmwebd : section Security"--> restrict access to pmwebd by an Apache http proxy with authentication. Could vector handle the authentication requested by a proxy in such cases

regards

spiermar commented 6 years ago

@martin2176 Simple HTTP authentication?

fche commented 6 years ago

https://tools.ietf.org/html/rfc7235#section-4.3 probably

spiermar commented 6 years ago

HTTP header based, should be simple. I see that as an extra input in the expanded hostname area. Probably a flag to enable and disable it.

martin2176 commented 6 years ago

auth

martin2176 commented 6 years ago

The above pic is what I have in mind. The authentication is to enable vector be able to communicate with pmwebd using proxy in between.

spiermar commented 6 years ago

That's a bit different from what I had in mind. I was thinking about having a single pmwebd running, with the proxy in front of it, and use the hostspec to connect to the "secured" instances running PMCD.

Thoughts @fche @natoscott ?

martin2176 commented 6 years ago

Something like this? auth2

spiermar commented 6 years ago

Something like that I think.

"How to secure this?" Depends on the level of security you're talking about, but the iptables blocking could be applied in this scenario too.

martin2176 commented 6 years ago

1) other than iptables, I cant think of anything which would safely expose pmcd's PMAPI to pmwebd. any other suggestions pls do let me know 2) For client browser to pmwebd communication through a proxy, can vector do the "Proxy-Authorization"header to authenticate against the proxy.

spiermar commented 6 years ago

Not right now, but technically should be possible to change the header and include this.

martin2176 commented 6 years ago

in which case, would you be able to file this as an RFE.

spiermar commented 6 years ago

Yes