fix: credential list now reflects changes immediately#149
Merged
Conversation
Enable soft-fido2's built-in credential management by: - Setting cred_mgmt option to Some(true) in authenticator config - Removing custom 0x0a command handler that returned hardcoded responses The built-in implementation properly calls AuthenticatorCallbacks methods (enumerate_rps, list_credentials, etc.) which read from the actual storage backend, ensuring credential changes are reflected immediately. Resolves: #148
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.
Summary
cred_mgmttoSome(true)in the authenticator configAuthenticatorCallbacksmethods (enumerate_rps,list_credentials, etc.) which read from the actual storage backendProblem
When credentials (passkeys) were added, updated, or removed while the passless service was running, the changes were not reflected in
passless client list. The updated state only became visible after restarting the passless process.Root Cause
The custom credential management command handler (0x0a) was returning hardcoded responses instead of querying the actual storage backend. This was because:
cred_mgmtwas set toNonein the authenticator config, disabling soft-fido2's built-in credential managementSolution
cred_mgmt: Some(true)PasslessCallbacks::enumerate_rps()andPasslessCallbacks::list_credentials(), which properly read from the storage backendTesting
The changes ensure that
passless client listnow reflects credential changes immediately without requiring a restart.Resolves: #148