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

Feature request: Set security headers #6820

Closed
jmcarp opened this issue Dec 5, 2016 · 7 comments
Closed

Feature request: Set security headers #6820

jmcarp opened this issue Dec 5, 2016 · 7 comments
Labels
help wanted prio/medium Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature-request

Comments

@jmcarp
Copy link

jmcarp commented Dec 5, 2016

It would be useful if grafana could be configured to set security-related headers (x-xss-protection, x-frame-options, content-security-policy, etc). In my specific use case, I need to add these headers to comply with nist guidelines, but adding them would also add extra protection against xss and other attacks. Would you all be interested in using a library like https://github.com/unrolled/secure, or in adding the headers that it adds manually?

@jmcarp jmcarp changed the title Feature request: set security headers Feature request: Set security headers Dec 5, 2016
@torkelo torkelo added this to the 4.1.0 milestone Dec 5, 2016
@torkelo torkelo added prio/medium Important over the long term, but may not be staffed and/or may need multiple releases to complete. help wanted labels Dec 5, 2016
jmcarp added a commit to jmcarp/grafana that referenced this issue Dec 5, 2016
@torkelo torkelo removed this from the 4.1.0 milestone Dec 14, 2016
@rluba
Copy link

rluba commented Oct 25, 2018

I’ve tried to secure our Grafana installation with CSP headers. But Grafana would require script-src: 'unsafe-eval' 'unsafe-inline' so I don’t see a way of enforcing sane CSP headers without modifying how Grafana bootstraps.

@Sytten
Copy link
Contributor

Sytten commented Apr 5, 2019

@rluba Care to comment a bit more on what you tested? I am also trying to secure a grafana for multi-tenant access and I was looking at CSP headers to help me. It's pretty scary to let unsafe-eval...

@marefr
Copy link
Member

marefr commented Apr 5, 2019

Related to #14189

@rluba
Copy link

rluba commented Sep 13, 2019

@Sytten I’ve found no way to enforce a sane CSP with Grafana. If you just need single-tenant access, you can add another layer of authorization in front of Grafana.

If you need multi-tenant access, I’m afraid you’re out of luck.

@Sytten
Copy link
Contributor

Sytten commented Sep 13, 2019

Yeah same for us. My fear is that we are seeing a lot of roll out of grafana as multi-tenant (latest I have seen is logz.io) the same way we do it (auth proxy in front of it). It would be nice of them to help us provide better security for all users.
To reduce the impact of it, we plan to use a different auth/token for grafana than the rest of the system so an XSS would "only" impact this service (still very bad though).

@aknuds1 aknuds1 added this to Inbox in Backend Platform Backlog via automation Dec 10, 2020
@aknuds1 aknuds1 moved this from Inbox to Features in Backend Platform Backlog Dec 10, 2020
@aknuds1
Copy link
Contributor

aknuds1 commented Dec 10, 2020

Just noting to ourselves to analyze what's needed to fulfill this request.

@marefr
Copy link
Member

marefr commented Mar 23, 2021

All mentioned headers in issue description are supported since a while back. Closing this as fixed. Let us know if you don't agree and we'll consider reopen this.

@marefr marefr closed this as completed Mar 23, 2021
Backend Platform Backlog automation moved this from Features to Done Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted prio/medium Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature-request
Projects
No open projects
6 participants