-
Notifications
You must be signed in to change notification settings - Fork 55
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
Provide Subresource Integrity for Web Resources #1983
Comments
@EugenFischer so you want the SRI on every JSF resource produced with h:output script? Correct? |
@melloware, yep, on script and style resources |
You mean, the framework must auto generate the integrity (and probably crossorigin) attribute like OmniFaces CombinedResourceHandler does? Point taken, but for sake of clarity, you could for the time being manually set it as a passthrough attribute:
|
I approve this proposal btw. @tandraschko, WDYT? Candidate for 5.0? The W3C spec is currently still in draft mode but it could be final before close of 5.0. |
what should the JSF impl do? I wonder whats the benefit as our resource urls are all relativ to the current host? |
Right. This makes only sense for CDN resources. |
Will omnifaces load the remote resource now and store it here? |
Nope, I just didn't think through it. It makes indeed no sense for local web resources. On the other hand, h:outputScript/h:outputStylesheet have no support for CDN resources so it wouldn't be possible to use them for CDN resources in first place. @EugenFischer Did you have local or CDN resources in mind while opening this issue? Was you referring to OmniFaces CDNResource helper class in the statement "but you have to make do with many exceptions and restrictions"? Which problem exactly, ultimately, was you trying to solve which made you to come up with this issue? |
@BalusC |
Just add VersionedResourceHandler.
Entire combined resource returns 404 if that is the case so just check for response status. |
From my point of view, support for SRI for web resources would be necessary.
OmniFaces has a powerful way to handle web resources with CombinedResourceHandler.
But you have to make do with many exceptions and restrictions.
From a security point of view, it would make sense to equip the web resources with SRI out of the box.
What do you think, would such an extension be useful and feasible?
Many greetings
The text was updated successfully, but these errors were encountered: