-
Notifications
You must be signed in to change notification settings - Fork 556
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
PKCS11 signing support #985
Conversation
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
035250b
to
c4b18f7
Compare
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
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.
@garantir-km how feasible would it be to add some tests using SoftHSM like done here /~https://github.com/miekg/pkcs11/blob/master/parallel_test.go ?
@hectorj2f I think I can add some tests to validate both the PKCS11 URI implementation and the PKCS11 implementation of the Signer interface. |
Added PKCS11 tests. Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
@hectorj2f hopefully all workflows will pass now |
I was successfully able to test against SoftHSM v2.5.0 with RSA. |
One nit about doing the URI switching in a slightly lower level, I think that will reduce duplication in the verify and verify attestation commands as well. |
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.
lgtm, and works for me using softhsm2
Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
Thank you! Lgtm when tests pass! |
Summary
This PR provides support for PKCS11 tokens. The implementation relies on PKCS11 URIs, which makes it possible to use PKCS11 backed keys without adding extra flags and logic to cosign.
The PR also provides a new tool called
pkcs11-tool
which allows for retrieval of the PKCS11 URIs for keys in a particular token.Ticket Link
This PR is in relation with #396.
Release Notes
Signed-off-by: Kieran Miller kieran.miller@garantir.io