[Editor] Add support for editor template integrity and signature verification. #112380
+317
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since there are persistent issue with downloading templates from GitHub (see #108952) users might be tempted to download templates from unverified sources. It's good to have a way to verify that templates were not modified and safe to use in the editor itself (it's highly unlikely most user will do it manually, even if hashes for files are provided).
Export templates can be signed by running the following commands in the template folder before zipping it, using RSA key:
Built-in public key(s) for the custom build can be added to
editor/export/keys/, it's also possible to add custom keys in runtime, usingexport/template_trusted_public_keyseditor setting.Unsigned templates can still be installed with an additional warning dialog:
Click me
Templates with hash errors, invalid signature or missing/extra files are rejected:
Click me
TODO:
Note: key in this PR is intended for testing only and correspond to the following private key:
Click me