Repository navigation
Refactoring for ctap::storage - #847
Open
kaczmarczyck wants to merge 1 commit into
Open
kaczmarczyck wants to merge 1 commit into
kaczmarczyck wants to merge 1 commit into
Conversation
Use retry-centric names on Persist mutators while keeping fail counts in
storage, rename drifted keys in api::persist::keys, and split
ctap::storage into its owning CTAP modules:
- keys.rs: rename FRIENDLY_NAMES -> TEMPLATE_INFOS, UV_RETRIES ->
UV_FAILS, PIN_RETRIES -> PIN_FAILS (numeric IDs unchanged), and order
AAGUID (3) before ATTESTATION_ID (4).
- persist.rs: rename incr_pin_fails -> decr_pin_retries, incr_uv_fails
-> decr_uv_retries, and decr_uv_fails -> incr_uv_retries (matching
existing doc comments and reset_*_retries).
- Remove pure stub wrappers and dissolve ctap/storage.rs into:
- ctap/credential_store.rs (resident credential CRUD and iteration)
- ctap/client_pin.rs (pin_retries)
- ctap/fingerprint.rs (uv_retries)
- ctap/config_command.rs (toggle_always_uv, set_min_pin_length_rp_ids,
keeping the entire module behind #[cfg(feature = "config_command")])
- ctap/mod.rs (init, has_user_verification, min_pin_length,
min_pin_length_rp_ids, enterprise_attestation, has_always_uv)
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.
Before the
PersistAPI existed, we hadstorage.rs. We kept the calls to not have to update.Lately though, the unrefactored code has confused contributors with less understanding of the codebase (aka AI agents).
Therefore, we refactor it now to make the correct function to call more discoverable.
Generally, this PR does not change behavior, it is purely shifting around code.
Since we now don't have the storage layer to have retry-centric naming, we rename the
Persistfunctions to have CTAP naming. The implementation still counts failures. Also key names were outdated.Split ctap::storage into its owning CTAP modules:
UV_FAILS, PIN_RETRIES -> PIN_FAILS (numeric IDs unchanged), and order
AAGUID (3) before ATTESTATION_ID (4).