[codex] Add per-database quick unlock selection#154
Draft
SirAndrosBot wants to merge 1 commit into
Draft
Conversation
|
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.



What changed
Use Windows Hello only for selected open databasesmode to the plugin options.CredDeletefailures now propagate, except when the credential is already absent.Why
Issue #91 asks for biometric quick unlock to be enabled only for selected databases. The plugin previously had one global enable switch and cached every eligible database key after normal unlock.
This implementation adds an explicit opt-in allowlist while preserving the current default for existing users. Enforcement happens both before Windows Hello unlock and before caching a key, including the secure-desktop restart path.
Database identity
KeePassWinHello must decide whether a database is selected before that database is unlocked. A stable internal database UUID is therefore unavailable at the decision point. The implementation uses the exact KeePass connection path/location, hashed before storing it in the new config value.
This is intentionally fail-closed:
The existing Credential Manager storage remains path-based and is unchanged.
Security and revocation behavior
Changing the selection policy revokes all cached keys, including persistent Credential Manager entries. This is conservative but prevents deselected databases from retaining usable cached material.
A worker review found that the first implementation could save the new policy after a silent credential-deletion failure. The final implementation checks each deletion, performs revocation before writing settings, and cancels Options closing if revocation fails.
This security/revocation behavior was explicitly approved before publication.
Refs #91
Validation
git diff --checkpassed with only Git LF-to-CRLF working-copy warnings.MSBuild.exe src\KeePassWinHello.csproj /t:Rebuild /p:Configuration=Release /p:DefineConstants=MONO /p:FrameworkPathOverride=C:\Windows\Microsoft.NET\Framework\v4.0.30319 /p:ReferencePath=C:\proj\KeePassWinHello\libpassed with 0 warnings and 0 errors.Manual test required