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

start: enable pinentry passphrase caching #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toobuntu
Copy link
Contributor

@toobuntu toobuntu commented Dec 4, 2024

@toobuntu
Copy link
Contributor Author

toobuntu commented Dec 4, 2024

It feels like caching should be an opt-in feature, but this does seem like what most users would want.

Note: In the referenced docs there is mention of SETKEYINFO, but in my testing (set as "SETKEYINFO n/homebrew-autoupdate") it seemed harmful because it saves the passphrase in the macOS login keychain with no expiry under the name GnuPG, which can be seen in Keychain Access.app. Pinentry then uses the saved credentials on each subsequent invocation and sudo --reset-timestamp doesn't stop it because pinentry gets the passphrase directly from the keychain and supplies it to sudo. We would seemingly need to ensure that this key is deleted from the keychain, for example before exiting the SUDO_ASKPASS script (security delete-generic-password -a "homebrew-autoupdate" -D "application password" -s GnuPG). Not doing so could cause problems should the user later change the admin password (and it seems like the user should anyway be made aware of the persistent key storage). So I left it out.

@toobuntu
Copy link
Contributor Author

toobuntu commented Dec 4, 2024

@DomT4 The CI failure should be addressed by #153.

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

Successfully merging this pull request may close these issues.

Admin password is asked multiple times
1 participant