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

Set default frame-ancestors on default Content-Security-Policy #532

Open
rzhade3 opened this issue Oct 21, 2024 · 2 comments
Open

Set default frame-ancestors on default Content-Security-Policy #532

rzhade3 opened this issue Oct 21, 2024 · 2 comments

Comments

@rzhade3
Copy link
Contributor

rzhade3 commented Oct 21, 2024

We should consider setting a default frame-ancestors directive for the Content Security Policy. The frame-ancestors directive is the new iteration of the X-Frame-Options header, and as such setting a directive in both spots might be prudent.

style_src: %w('self' https: 'unsafe-inline')

Since our default XFO policy is sameorigin, if we decide to take upon this task, we should set the default frame-ancestors value to be self.

Some counterpoints: setting both the X-Frame-Options and the frame-ancestors directive will cause the XFO header to be overriden by the frame-ancestors directive. This means that if a user is trying to change some framing functionality, and only changes the XFO header, they might be confused as to why the functionality didn't actually change.

@misfir3
Copy link

misfir3 commented Oct 21, 2024

This means that if a user is trying to change some framing functionality, and only changes the XFO header, they might be confused as to why the functionality didn't actually change.

The override approach/mechanism wouldn't change, right? Just that they need to override both, correct?

Also, FWIW, I am for the :whynotboth: approach and the lack of a frame-ancestors default bothered me slightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@misfir3 @rzhade3 and others