-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the Bug
We managed to accidentally delete an un-revoked certificate, because puppetserver ca clean is not atomic. As a result, we ended up with a valid certificate that can no longer be revoked and is not listed by puppetserver ca list.
How it probably happened (according to a user report and backed by logs):
- A call to
puppetserver ca cleanshould revoke and delete a certificate. The revoke-call succeeded, but for some unknown reason the delete-call was delayed for a full 51 seconds. I have no idea why or how or where it got stuck, but it happened. - While this delete-call was still pending, the user got impatient, called
puppetserver ca cleanagain (successful this time), re-ran ssl-bootstrap on the host, calledpuppetserver ca signand moved on. - Now the delete-call from the first
puppetserver ca cleaninvocation came through and deleted the newly signed certificate without revoking it first.
Expected Behavior
A puppetserver ca clean call should not delete certificates it did not revoke. It should probably use the /puppet-ca/v1/clean API instead of issuing separate revoke and delete calls, as suggested by the API docs.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working