Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add options to set additional nginx headers (#3817)
* Add options to values.yaml and the nginx template for injecting extra add_header directives at the server and location levels. I haven't gone and stubbed this out for every location directive yet - I'd like directional feedback on the concept. The primary motivation here is that security tools (correctly) flag that `Access-Control-Allow-Origin '*'` is, in many cases, overly-permissive, and that the absence of a `Content-Security-Policy` header opens attack vectors for XSS and clickjacking. The default values supplied in `values.yaml` with this commit keep the CORS behavior consistent, by defaulting to the permissive approach. Users will now be able to override this permissive configuration to harden their application. The default values for CSP disallow iframe embedding to prevent clickjacking, and forbid pulling in sources (scripts, images, etc) from domains other than self, and Userway (an accessibility application leveraged by some Kubecost users). Users who embed Kubecost in an iframe in their own context would need to update their Helm charts to allow this behavior again. Signed-off-by: Neal Ormsbee <[email protected]> * Signed-off-by: jesse goodier <[email protected]> configurable cache control * Add additional whitelist sources to CSP Signed-off-by: Neal Ormsbee <[email protected]> * Remove support for per-route header configs. Only use global server header configs for now Signed-off-by: Neal Ormsbee <[email protected]> --------- Signed-off-by: Neal Ormsbee <[email protected]> Co-authored-by: jesse goodier <[email protected]>
- Loading branch information