-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[FEATURE REQUEST] Simple gpg signature verification of file downloads #63143
Comments
I don't think this works as a state. It's a consistency check, not actually making any change if it fails. Also, your workaround is unnecessarily complex. You can just use Vaultwarden web vault signature is verified:
module.run:
- gpg.verify:
- filename: /tmp/web-vault-{{ warden.version_web_vault }}.tar.gz
- signature: /tmp/web-vault-{{ warden.version_web_vault }}.tar.gz.asc
- require:
- Vaultwarden key is actually present
- Vaultwarden web vault is downloaded All that's missing is the |
That state will always pass regardless of the verification result since It is a consistency check, yes, but you can act on its failure in subsequent states. I like that it's simple and explicit. An alternative would be to introduce a flag to |
Ah, I see. If acting on the result, the Vaultwarden web vault signature is verified:
test.fail_without_changes:
- unless:
- fun: gpg.verify:
filename: /tmp/web-vault-{{ warden.version_web_vault }}.tar.gz
signature: /tmp/web-vault-{{ warden.version_web_vault }}.tar.gz.asc
get_return: res
- require:
- Vaultwarden key is actually present
- Vaultwarden web vault is downloaded |
Huh, I didn't know about that. Thanks for showing me! This seems a bit simpler than using slots. I still think having a |
In any case, certainly the |
Yup, I will submit the |
gpg.verified
/gpg.signed_by
state
Is your feature request related to a problem? Please describe.
Sometimes I write formulae to install builds from Github releases (or similar). If they offer cryptographic signatures, I would like to be able to securely and easily verify them. This includes verifying the signature has been made by a particular (set of) key(s), not everything imported in my keyring (ref apt-key deprecation). (This has been split into a separate FR: #63166)
Describe the solution you'd like
Edit:
More semantical sense, with the caveat that an implementation needs to be properly validated because of how much those states already handle, would make to add
signature
andsource_hash_sig
(+supporting) parameters tofile.managed
andarchive.extracted
:Describe alternatives you've considered
This monster [does not contain the limitation to a particular (set of) key(s)]:
Additional context
Already wrote the implementation, PR pending me writing tests for it and fixing another related, quite aggravating issue with
gpg.receive_keys
/gpg.present
.The text was updated successfully, but these errors were encountered: