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

Move integrity support to the Static Web Assets SDK from the Blazor WebAssembly SDK #47000

Closed
javiercn opened this issue Mar 2, 2023 · 4 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-razor-sdk Pillar: Technical Debt Priority:1 Work that is critical for the release, but we could probably ship without
Milestone

Comments

@javiercn
Copy link
Member

javiercn commented Mar 2, 2023

We do have a set of features for dealing with hashes ("integrity") on Blazor files as well as for applying fingerprints to files, we should move those to static web assets.

  • We will add two new properties to the definition of a static web asset "Fingerprint" and "Integrity".
    • Fingerprint is the Base36 encoding of the integrity hash that can be used to uniquely fingerprint the file.
    • Integrity will be the Base64 encoding of the SHA256 hash, which is what we currently put in the blazor.boot.json manifest.
  • We will update DefineStaticWebAssets to automatically compute the fingerprint and hash for the assets being defined.
    • The way I envision this working is via "token" replacements. We can support defining tokens in the file name, like asset.[Fingerprint].razor.js.
    • When we are constructing the asset relative path, we replace the [Fingerprint] bit with the actual computed fingerprint of the asset, which is stored in item metadata for the item.
    • We make comparisons based on the relative path and other aspects, so we might need a property separate from the relative path (RelativePathTemplate) or similar to make it easier to work.
@ghost
Copy link

ghost commented Mar 3, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@Bartmax
Copy link
Contributor

Bartmax commented Aug 8, 2023

As stated on this issue #49809 updating the server files every time one needs to publish a new version is not really a viable workaround, hope we get some options sooner rather than later.

If there are any other option that I may be missing please that would be very useful in the meantime.

Thanks.

@ghost
Copy link

ghost commented Dec 22, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the Priority:1 Work that is critical for the release, but we could probably ship without label Jan 9, 2024
@danroth27 danroth27 changed the title Move integrity support to the Static Web Assets SDK from the Blazor Webassembly SDK Move integrity support to the Static Web Assets SDK from the Blazor Webssembly SDK Jan 30, 2024
@danroth27 danroth27 changed the title Move integrity support to the Static Web Assets SDK from the Blazor Webssembly SDK Move integrity support to the Static Web Assets SDK from the Blazor WebAssembly SDK Jan 30, 2024
@javiercn javiercn modified the milestones: 9.0-preview3, 9.0-preview4 Mar 20, 2024
@javiercn javiercn modified the milestones: 9.0-preview4, 9.0.0 Apr 1, 2024
@javiercn
Copy link
Member Author

This was done as part of the WebAssembly fingeprinting integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-razor-sdk Pillar: Technical Debt Priority:1 Work that is critical for the release, but we could probably ship without
Projects
None yet
Development

No branches or pull requests

5 participants
@Bartmax @javiercn @MackinnonBuck @mkArtakMSFT and others