Skip to content
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

Command logic for credential management #256

Merged
merged 10 commits into from
Jan 20, 2021

Conversation

kaczmarczyck
Copy link
Collaborator

@kaczmarczyck kaczmarczyck commented Jan 13, 2021

Together with #253 and #254, this PR implements the credential management command. Its logic is equivalent to #107, with the difference of only storing keys for credentials as state between calls to EnumerateCredentialsGetNextCredential.

  • Tests pass

@kaczmarczyck kaczmarczyck self-assigned this Jan 13, 2021
@google-cla google-cla bot added the cla: yes label Jan 13, 2021
@kaczmarczyck kaczmarczyck changed the title adds the command logic for credential management Command logic for credential management Jan 13, 2021
@kaczmarczyck
Copy link
Collaborator Author

For storage review ( @ia0 ) this should be very quick, only using all changes made in #254.

ia0
ia0 previously approved these changes Jan 13, 2021
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed Ctrl-F persistent_storage in all files.

I added a task that maybe iter_credentials usability could be improved. I wonder if I can remove the need to have iter_result (with compromise of each item being a Result).

@kaczmarczyck
Copy link
Collaborator Author

I think that would be easier indeed!

@kaczmarczyck
Copy link
Collaborator Author

The command is tested against Chrome. To test, change the default permission in pin_protocol_v1.rs to

self.permissions = 0x03 | PinPermission::CredentialManagement as u8;

src/ctap/credential_management.rs Outdated Show resolved Hide resolved
src/ctap/credential_management.rs Outdated Show resolved Hide resolved
@kaczmarczyck
Copy link
Collaborator Author

The 2 new commits don't show up in the conversation, since I merged after. The first is addressing the memory state issue. The other reworks the command state more to always reset timeout and state when either check fails. @jmichelp PTAL

ia0
ia0 previously approved these changes Jan 19, 2021
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked occurrences of persistent_store.

src/ctap/credential_management.rs Show resolved Hide resolved
src/ctap/mod.rs Outdated Show resolved Hide resolved
src/ctap/mod.rs Show resolved Hide resolved
@kaczmarczyck kaczmarczyck mentioned this pull request Jan 20, 2021
1 task
src/ctap/mod.rs Outdated Show resolved Hide resolved
@kaczmarczyck kaczmarczyck merged commit 8bdfeb4 into google:develop Jan 20, 2021
@kaczmarczyck kaczmarczyck deleted the command-cred-mgmt branch January 20, 2021 14:05
@kaczmarczyck kaczmarczyck mentioned this pull request Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants