-
Notifications
You must be signed in to change notification settings - Fork 5
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
SLING-8029 Retrieve gpg key automatically if it is missing in keyring #2
base: master
Are you sure you want to change the base?
SLING-8029 Retrieve gpg key automatically if it is missing in keyring #2
Conversation
@ghenzler - should we actually do this? I am not sure since key import is a sensitive operation and we should not trust just any key. |
@rombert Just read through [1] - I think it should be fine (although it would be better if we all had cross-signed keys, at least I haven't done that). Updated the PR to use If we decide to not automatically retrieve the key we can just take out that option, now that the error is logged for the case there is one, it is better self-guiding than before (that was my main problem, I got the message signature "BAD" message when really just the key was missing). |
If I understand correctly, we should trust if the public keys are also listed in https://people.apache.org/keys/group/sling.asc, as that one contains the trusted list of public keys (as those require ASF credentials to add there). For more details see http://sling.apache.org/documentation/development/release-management.html#appendix-a-create-and-add-your-key-to-peopleapacheorg. Is it possible to validate against this list or directly import the public keys from there (as that is a trusted source)? |
The worst-case scenario I'm thinking of is the following:
Granted, it's a pretty convoluted scenario but it only needs one weakness - the Nexus account credentials from a PMC member. Not automatically importing GPG keys would add a second layer. It might be that I'm overthinking this and that this is not a really big issue :-) But I fully agree that at least displaying the error message from GPG would be a great improvement. |
For exactly this reason we only trust keys within https://people.apache.org/keys/group/sling.asc, right? Can we just import those? |
That scenario could happen now if someone lost control of their ASF account. It would just have a manual step to update the key. I would think though that the script should display a warning, display some explanation on how to update the key and have the user to perform the update. Ideally if it could display some sort of helpful information on whether the key is expired, revoked, etc that would be good to help determine if the key update can be trusted. |
If we do not use |
@rombert Please have a look if this makes sense for you (tested on OSX but should work on linux as well)