OpenConext / OpenConext/OpenConext-engineblock
WAYF pagina needs `unsafe-inline` CSP because of embedded json/js
Open
@tvdijen is already working on this.
Since Feb 24, 2025.
- Dominant language
- PHP
- Stars
- 17
- Forks
- 25
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.