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

use explicit hsm label key in signer configs #232

Open
g-k opened this issue Jan 22, 2019 · 3 comments
Open

use explicit hsm label key in signer configs #232

g-k opened this issue Jan 22, 2019 · 3 comments

Comments

@g-k
Copy link
Contributor

g-k commented Jan 22, 2019

Instead of trying to load signer.PrivateKey as PEM then falling back to loading it as an HSM label use explicit hsmlabels as the config key e.g.

signers:
  - id: example
    hsmlabel: examplehsm

This should make it easier to find signers using the HSM (instead of relying on heuristics like the length of the private key or starts with a PEM prefix) for test key gen, management, and rotation for #210 #211 #222

@jvehent
Copy link
Contributor

jvehent commented Jan 22, 2019

fine by me

@g-k
Copy link
Contributor Author

g-k commented Jan 22, 2019

Cool. This is a nice to have. It will require:

  • decide whether hsmlabel and privatekey are mutually exclusive (I'm leaning toward yes) or if not which one takes precedence (i.e. maintain current order of privatekey before hsmlabel)
  • change code, probably signer GetPrivateKey and GetKeysAndRand (TODO: finish looking into this)
  • a tag a major release (since backwards incompatible change)
  • migrate stage and configs for autograph and dependent services using dev configs (i.e. addons-server)

@jvehent
Copy link
Contributor

jvehent commented Jan 22, 2019

decide whether hsmlabel and privatekey are mutually exclusive

yes, avoids confusion. we can be strict about these things.

change code

https://github.com/mozilla-services/autograph/blob/master/signer/signer.go#L200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants