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

ssh-tpm-agent UX issues #3

Open
Foxboron opened this issue Jul 27, 2023 · 3 comments
Open

ssh-tpm-agent UX issues #3

Foxboron opened this issue Jul 27, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@Foxboron
Copy link
Owner

I'm struggling to picture the UX on how we should handle multiple keys.

ssh-agent is not really made for key creating this way, so there needs to be a secondary control thing for this.

@Foxboron
Copy link
Owner Author

Foxboron commented Jul 27, 2023

Current idea is to probably just mirror the existing ssh client tooling and rely on the same assumptions.

It turns out that all of the tools query the agent when getting a public key, so we don't actually have to care that much about what we do with our private TPM token.

General idea is as follows:

  • ssh-add -> ssh-tpm-add
  • ssh-agent -> ssh-tpm-agent
  • ssh-keygen -> ssh-tpm-keygen

Keys should have a .tpm_ssh extension.

ssh-tpm-agent

Starts the agent. It accepts a socket location, and a location to search for keys with the .tpm_ssh extension.

tpm-ssh-agent --install-user-units can optionally install systemd services for the given user (maybe).

ssh-tpm-keygen

Creates keys with the same flow as found in ssh-keygen. These files are installed into .ssh/ with id_edsa.pub and id_edsa.tpm_ssh.

ssh-tpm-add

Little bit unsure about the feature list we want, but generally things that are usually not supported by ssh-add. Generally we want the ability to import existing private keys, seal them towards the TPM.

This would allow people to move existing keys from their .ssh dir and sealed towards the TPM.

It should probably also be capable of adding new keys into the existing agent.

@Foxboron Foxboron added the help wanted Extra attention is needed label Jul 27, 2023
@Foxboron Foxboron changed the title Support multiple keys? tpm-ssh-agent UX issues Jul 27, 2023
@Foxboron
Copy link
Owner Author

Generally, when doing UX we can't do worse then whateverthefuck PKCS11 is currently doing; https://jade.fyi/blog/tpm-ssh/

@Foxboron Foxboron changed the title tpm-ssh-agent UX issues ssh-tpm-agent UX issues Jul 28, 2023
Foxboron added a commit that referenced this issue Jul 28, 2023
Part of #3

Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron
Copy link
Owner Author

Everything should be included with this change:

#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant