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

Add support for hardware security module (HSM) signing. #503

Merged
merged 3 commits into from
Apr 20, 2023

Conversation

mdwn
Copy link
Contributor

@mdwn mdwn commented Mar 8, 2023

goxmldsig was recently updated to support HSMs. This is done by supporting signing using the crypto.Signer directly, which is how HSMs are able to sign things in golang.

This commit adds a new field Signer to the IdentityProvider which takes precedence over the Key field when creating the SigningContext. The Key field has been left in place to maintain backwards compatibility.

Tests have been updated to verify that this functions, and the samlidp example identity provider has been updated such that it now supports a Signer option. Additionally, NewIdentifyProviderTest has been corrected to NewIdentityProviderTest.

@crewjam
Copy link
Owner

crewjam commented Apr 3, 2023

LGTM.

Note to self: fix linter then merge. :)

@mdwn
Copy link
Contributor Author

mdwn commented Apr 11, 2023

Hi @crewjam! Is there anything I can do to assist with this? Let me know!

Note: Just rebased on top of current main.

Mike Wilson added 2 commits April 11, 2023 15:37
goxmldsig was recently updated to support HSMs. This is done by supporting
signing using the `crypto.Signer` directly, which is how HSMs are able to
sign things in golang.

This commit adds a new field `Signer` to the `IdentityProvider` which takes
precedence over the `Key` field when creating the `SigningContext`. The `Key`
field has been left in place to maintain backwards compatibility.

Tests have been updated to verify that this functions, and the `samlidp`
example identity provider has been updated such that it now supports a
`Signer` option. Additionally, `NewIdentifyProviderTest` has been corrected to
`NewIdentityProviderTest`.
@mdwn
Copy link
Contributor Author

mdwn commented Apr 19, 2023

@crewjam Hey, sorry to bother. Any way this could get merged soon? Thank you!

@crewjam crewjam merged commit 34930b2 into crewjam:main Apr 20, 2023
mdwn pushed a commit to gravitational/teleport that referenced this pull request Apr 20, 2023
Update the crewjam/saml dependency to pull in HSM support from
crewjam/saml#503.
@mdwn mdwn deleted the support-hsm branch April 20, 2023 12:59
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this pull request Apr 20, 2023
Update the crewjam/saml dependency to pull in HSM support from
crewjam/saml#503.
github-actions bot pushed a commit to gravitational/teleport that referenced this pull request Apr 20, 2023
Update the crewjam/saml dependency to pull in HSM support from
crewjam/saml#503.
mdwn pushed a commit to gravitational/teleport that referenced this pull request Apr 20, 2023
Update the crewjam/saml dependency to pull in HSM support from
crewjam/saml#503.
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this pull request Apr 20, 2023
Update the crewjam/saml dependency to pull in HSM support from
crewjam/saml#503.
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this pull request Apr 20, 2023
* Update crewjam/saml dependency.

Update the crewjam/saml dependency to pull in HSM support from
crewjam/saml#503.

* Fix /x/time location in go.mod
@kevinchen253
Copy link

Hi, @mdwn @crewjam could we extend this support to ServiceProvider end too?

mgyongyosi pushed a commit to grafana/saml that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants