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

fix add ssh certificate with existing key #67

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

gartnera
Copy link
Contributor

Currently you cannot add or update a certificate if the key has already been loaded because AddTPMKey will exit if the public key fingerprint matches an existing key. It ignores the certificate that was provided in the request.

Let's unconditionally replace the key so that the certificate attribute will be updated.

This enables using short lived ssh certificates which are common in enterprise environments. These certificates typically expire in a few hours.

One notable thing that will still not work is having multiple certificates per key. This can happen if there are multiple authorities in your organization or a authority rotation is in progress. These scenarios could be tolerated, but I think we should just do a simple fix for now.

@Foxboron
Copy link
Owner

Cool, thanks!

@Foxboron Foxboron merged commit 3a3a959 into Foxboron:master Oct 27, 2024
5 checks passed
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.

2 participants