-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add basic setup for multi-PIN #530
Merged
Merged
Conversation
This file contains 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
hcyang-google
commented
Aug 17, 2022
- Reserve the storage keys for maximum of 8 user slots. - Modify the storage functions to take a slot_id parameter. - Add the slot_count() customization. - Assume slot_id as a parameter when needed except these places: - Entrance functions of command processing that directly takes the command parameter structure. slot_id is set as 0, and will be parsed from the parameters when we enable the feature. - MakeCredential/GetAssertion/AuthenticatorConfig will take the slot_id from active token state when we enable the feature, resulting in an `Option<usize>`. Below code will act on the option value correctly. When the feature isn't enabled, we're always referring to the only PIN slot so set slot_id as Some(0). - GetInfo returns verdict of whether PIN is supported and enabled, and whether PIN needs to be forced changed. There will be new fields to represent those values when the feature is enabled, and the old fields will not be populated. So when the feature isn't enabled, we can treat slot_id as 0. Not covered in this commit: - Unittests for other slots. The existing tests all pass and I plan to add unittests for multi-slot case after the codebase allows enabling the feature. - Persisting and checking the slot_id in credentials. This is planned to come in the next commit.
hcyang-google
force-pushed
the
multi-pin
branch
from
August 18, 2022 07:26
3cd8eb9
to
fbba03b
Compare
* maximum working bumpalo version * explicit comment to explain version locking * removes incorrect comment * moves serde version lock to dev dependencies * removes serde dependencies * reverts serde removal in crypto library
Add support for concatenated values
Pull in the concatenated value storage support.
Fix bumpalo issue
kaczmarczyck
approved these changes
Aug 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion on my last comment, LGTM.
kaczmarczyck
approved these changes
Aug 23, 2022
Pull in the bumpalo fix.
kaczmarczyck
approved these changes
Aug 23, 2022
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.
command parameter structure. slot_id is set as 0, and will be
parsed from the parameters when we enable the feature.
slot_id from active token state when we enable the feature,
resulting in an
Option<usize>
. Below code will act on the optionvalue correctly. When the feature isn't enabled, we're always
referring to the only PIN slot so set slot_id as Some(0).
whether PIN needs to be forced changed. There will be new fields to
represent those values when the feature is enabled, and the old
fields will not be populated. So when the feature isn't enabled, we
can treat slot_id as 0.
Not covered in this commit:
add unittests for multi-slot case after the codebase allows enabling
the feature.
come in the next commit.