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

WAYF pagina needs unsafe-inline CSP because of embedded json/js #1331

Open
Tracked by #1776
baszoetekouw opened this issue Oct 21, 2024 · 0 comments
Open
Tracked by #1776

WAYF pagina needs unsafe-inline CSP because of embedded json/js #1331

baszoetekouw opened this issue Oct 21, 2024 · 0 comments

Comments

@baszoetekouw
Copy link
Member

The WAYF page currently requires setting a (non-recommended) value unsafe-inline for the CSP script-src property. This is needed because of the dynamic inclusion of the json with available IdPs.

It would be nice if we could change this. I see two possible solutions:

  • instead of embedding the json in javascript, load it from an external API call. This had the advantage that the WAYF page itself can because completely static HTML and all logic can be in the API call. Might be quite some work though.
  • use a nonce-system, in which a non-guessable none is added to both the CSP header and the embedded javascript. Disadvantage is that the nonce value will need to be communicated to the web server in some way, or the page will have to set its own CSP header.
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

1 participant