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

Support TPM-backed signing key storage #953

Open
charles-dyfis-net opened this issue Mar 31, 2021 · 2 comments · May be fixed by #955
Open

Support TPM-backed signing key storage #953

charles-dyfis-net opened this issue Mar 31, 2021 · 2 comments · May be fixed by #955
Assignees

Comments

@charles-dyfis-net
Copy link

  • Signing package repositories is good.
  • Letting the keys used to sign package repositories be copied off of the server authorized for that use is bad.
  • Hardware-backed key stores exist to provide a means of storing a private key that prevents it from being copied from software.
  • The Trusted Platform Module is a widely-adopted standard that provides for such private storage.
  • Frank Olbricht's tpmk library exists to allow TPM-backed keys to be operated on from Go.

Aptly should support signing packages with tpmk-backed keys; this way, even a user with all the privileges aptly itself has won't be able to copy that key off and put it to their own uses in the future (but will need to have a persistent compromise of a repo-signing server lasting for the entire duration of time in which they wish to corruptly/incorrectly sign keys).

Detailed Description

The proposal is to add an alternative to the current practice of passing a signing key (or a path to a signing key) and a password to aptly. For example, we might recognize a SecretKeyring of the form tpm:0x81000000 as an instruction to ask the tpmk to load a private key from the given address.

Context

This change will make it possible to trust users to use aptly without giving them enough permissions to impersonate that aptly server in the future.

@charles-dyfis-net
Copy link
Author

This issue is provided largely as a discussion piece. I'm happy to do work on this ticket myself, but want to be sure we've had enough up-front discussion to have reason to believe that it's likely to be considered mergable in-principle before going beyond a simple proof-of-concept.

@charles-dyfis-net
Copy link
Author

(One important caveat, while we're talking about upstream acceptability: It may be necessary to fork or vendor and patch https://pkg.go.dev/golang.org/x/crypto/openpgp -- at least, I had cause to do so last time I worked on something like this).

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 a pull request may close this issue.

2 participants