Repository navigation
fix(ctxutil): restore password callback hook for embedded age prompts - #3590
Merged
dominikschulz merged 3 commits intoSep 9, 2026
Merged
Conversation
Co-authored-by: dominikschulz <1449175+dominikschulz@users.noreply.github.com>
Co-authored-by: dominikschulz <1449175+dominikschulz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Bring back ctxutil.WithPasswordCallback function
fix(ctxutil): restore password callback hook for embedded age prompts
Sep 7, 2026
dominikschulz
approved these changes
Sep 7, 2026
dominikschulz
marked this pull request as ready for review
September 7, 2026 09:57
dominikschulz
approved these changes
Sep 9, 2026
dominikschulz
deleted the
copilot/bring-back-ctxutil-withpasswordcallback
branch
September 9, 2026 19:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Library consumers lost the
ctxutil.WithPasswordCallbackhook in 1.17.0, which removed the supported way to intercept age identity passphrase prompts and route them through host-provided UI. This change restores that embedding path without changing the default interactive CLI flow.Restore public callback API
ctxutil.PasswordCallbackandctxutil.PasswordPurgeCallbackWith/Has/GetPasswordCallbackandWith/Has/GetPasswordPurgeCallbackGetPasswordCallbackby returningErrNoCallbackwhen unsetWire callbacks back into the age backend
internal/backend/crypto/age.Newto pick up password and purge callbacks from the contextWithAgePassphrasesupport for fixed non-interactive passphrasesDocument the embedding contract
pkg/gopassgodoc to point embedders toctxutil.WithPasswordCallbackfor interactive passphrase handlingWithAgePassphraseremains the fixed-passphrase alternativeExample:
ctxutil.WithPasswordCallback? #3589