__download: pgp/gpg signature verification #22
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ungleich-public/cdist#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
as discussed in chat. dumping notes for future.
make
--sumoptional and make it very clear in manual that it's then user's responsibility to verify integrity of downloaded file.add two new parameters:
--gpg-pubkeyand--gpg-signatureor--pgp-pubkeyand--pgp-signature.both can be path to file or url. if url then key and signature must be downloaded. can we call type inside type itself?. extra effort must go into avoiding code duplication, because now multiple downloads may happen with one run. also
__downloadcan operate both locally and in target (remote).--gpg-pubkeycan also be path to local keyring (e.g--gpg-pubkey "$HOME/.gnupg/pubring.gpg") because dearmored pubkey is keyring already (just one key inside). at least this is how gnupg takes it.if
--gpg-pubkeyis not given, then existing local or remote gnupghome will be used (option/envvar for gnupg not set). otherwise temporary gnupghome will be created both locally or remotely, depending where download happens. for example if user already have pubkey in local pubring or keys are deployed to remote using different method.should we support other PGP implementations?
should we implement this feature as separate type to keep
__downloadsimple? not sure yet how much complexity it adds.what else? @matze, please add your thoughts.
Writing here the thoughts and concerns from @ssrq from chat:
I would say yes to separate types like
__gpg_verifyand__checksum_verifywhich could be used from other types or the user directly. But I think__downloadshould provide a short-hand way to utilize these types, too.My current need is to set an extra url for the type (like this: https://download.nextcloud.com/server/releases/nextcloud-20.0.0.tar.bz2.asc) which contains a signature. With this signature and and a valid/trusted pubkey, which would be at best be trusted from the config host instance (which doesn't work if will be downloaded on the target), the type should validate the downloaded content.
Because a type which utilize
__download(it's__nextcloudfor my case) may be used from users without trusting that signature, it might be problematic doing that. Should the key rather be provided by that type (e.g. via argument) or simply skip if the user doesn't want it? then, how the user opt in/out? Not all users want to handle the signature/checksum stuff, rather to just install it via the type.I mean, we need to think how the type
__downloadcan be utilized by other types. Should we completely pass everything up to the user or how? I mean it's a bit different if you call this type via your initial manifest or if you let your type depend on a version number passed down by a parameter.changed the description
changed the description
changed the description
changed the description
changed the description
changed the description
changed title from __download: gpg signature verification to __download: {+pgp/+}gpg signature verification
changed the description
changed the description
changed the description
changed title from {-[__download]-} gpg signature verification to {+__download:+} gpg signature verification