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

Alignment with Subresource Integrity #112

Open
geovanisouza92 opened this issue Jul 23, 2018 · 3 comments
Open

Alignment with Subresource Integrity #112

geovanisouza92 opened this issue Jul 23, 2018 · 3 comments

Comments

@geovanisouza92
Copy link

This is a proposal for allowing another separator in checksum: As of Subresource Integrity states:

An integrity value begins with at least one string, with each string including a prefix indicating a particular hash algorithm (currently the allowed prefixes are sha256, sha384, and sha512), followed by a dash, and ending with the actual base64-encoded hash.

I suggest adding a dash as an alternative separator at checksum detection, along side with another checksum option sha384 (go doc).

The case I have in mind is something similar to what was discussed at ry/deno#200, specifically for FaaS context: import modules (maybe using dynamic import()) with canonical URLs that can be checked by the runtime before execution.

@tisba
Copy link

tisba commented Nov 14, 2018

I would also really like this change. Would you accept a PR for this?

@mitchellh
Copy link
Contributor

I'm supportive of this if anyone wants to take a stab.

@geovanisouza92
Copy link
Author

Apparently, to be fully aligned with Subresource Integrity, the checksum would need to be encoded as base64, instead of hexadecimal, but it doesn't seems to be a requirement for the lib right now, right?

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

Successfully merging a pull request may close this issue.

3 participants