-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[HTTP] No default-src
fallback specified for CSP
#177732
Comments
Pinging @elastic/kibana-core (Team:Core) |
Pinging @elastic/kibana-security (Team:Security) |
Regardless, I think we should probably add
WDYT? |
Thanks @jloleysens! I like the idea of having plugins register known external sources/endpoints, but don't have a clear idea of how daunting of an ask that might be to some teams, or if it's always feasible (e.g. if there might be some end user config to consider in some cases). I'll bring this up with the team to discuss at our next sync. I see this is referenced from a couple of other items - how urgent would you say this is? |
I fully agree re scope. It'd be great to learn of other possible approaches, these were just my first 3 ideas. Ideally we can find something more incremental, as registering a value will currently get us into the more strict CSP that led to this issue. The biggest benefit of plugin owners registering endpoints is that they have all the context about where a link is coming from and how it is set (e.g. via kibana.yml, hardcoded etc) and can add test code to back it up.
Overall not high urgency :) . I don't think this is blocking anything. I also don't know how many on-prem/cloud are running into this. Only known issue is blocking Telemetry on serverless. Also, this is old code so I'm guessing it's not causing wide-spread problems. For our purposes the workaround is to just set CSP accordingly in kibana.yml. |
@jloleysens The Kibana Maps app allows users to load external layers not served by Elasticsearch or Elastic Maps Service. If I understand this correctly, the proposed change would prevent users from loading any layers unless they are white-listed by their Kibana admins, right? I've created a public minimal dashboard in our cloud that loads a Web Map Service layer as an example of this feature so you can check the external requests in a production environment. @elastic/kibana-presentation |
@jsanz I guess that is one possibility. We could also choose to keep I'd say this issue is more about figuring out if we want to get to a place that is more strict CSP overall. Such that adding a piece config:
Allows Kibana to work as it should while allowing additional domains to be reached. Right now adding this config results in a much stricter CSP which is not what I was expecting -- and why chose to classify this as a bug... Perhaps my expectation was wrong though! |
Without a default value for
default-src
certain other directives likeconnect-src
will currently fallback to "allow all" (today's default). This can lead to a regression because adding the following config:Will actually result in the following CSP:
This is far stricter than the original "allow anything" and can lead to, for example, telemetry endpoints not being reachable using JS APIs like
fetch
when callingtelemetry-thingy.elastic.co
.We could approach this in a few ways:
default-src: 'none'
, will require an audit to make sure we aren't breaking something (almost definitely will break something), this does not seem desirablecsp.*
requires additional config to allow things like telemetry to work (also not very desirable imo)default-src
untouched in this case so that we don't kick up the work in the first approach.Tasks
The text was updated successfully, but these errors were encountered: