-
Notifications
You must be signed in to change notification settings - Fork 29
Implement SearchKeys on tpmkms #927
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
base: master
Are you sure you want to change the base?
Conversation
This commit implements the experimental SearchKeys method on the tpmkms. With this method.
This commit fixes empty results on unsigned binaries when we search for keys in the secure enclave.
| } | ||
|
|
||
| // SearchKeys searches for keys according to the query URI in the request. By | ||
| // default, with the query "tpmkms:", it will return all keys and attestation |
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.
Minor, but this makes the distinction a little bit clearer:
| // default, with the query "tpmkms:", it will return all keys and attestation | |
| // default, with the query "tpmkms:", it will return all application and attestation |
| // - "tpmkms:" will return all keys and AKs managed by the KMS | ||
| // - "tpmkms:ak=true" will return all AKs managed by the KMS | ||
| // - "tpmkms:ak=false" will return all the keys managed by the KMS | ||
| // - "tpmkms:name=my-name" will only return the key with the selected name |
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.
This means it defaults to the behavior of ak=false? If so, that sounds OK.
| // - "tpmkms:name=my-name;ak=false" will only return the key with the selected name | ||
| // |
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.
It might be an option to include support for searching application keys by the AK they were attested by. Not a blocker, though.
| }}, | ||
| }, | ||
| }, assert.NoError}, | ||
| {"ok enpty", fields{sim, nil, nil}, args{&apiv1.SearchKeysRequest{Query: "tpmkms:name=not-found"}}, &apiv1.SearchKeysResponse{}, assert.NoError}, |
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.
| {"ok enpty", fields{sim, nil, nil}, args{&apiv1.SearchKeysRequest{Query: "tpmkms:name=not-found"}}, &apiv1.SearchKeysResponse{}, assert.NoError}, | |
| {"ok empty", fields{sim, nil, nil}, args{&apiv1.SearchKeysRequest{Query: "tpmkms:name=not-found"}}, &apiv1.SearchKeysResponse{}, assert.NoError}, |
This commit implements the experimental SearchKeys method on the tpmkms. With this method.