Skip to content

Conversation

@pivotal-david-osullivan
Copy link
Contributor

Previously, both the certificate and private key file were watched for changes and upon a change to either, both values were read and used to update the KeyManager. This caused an infrequent race-condition (see #8) where a mix of old and new data was left in the KeyManager until the next key/cert rotation. This resulted in apps that used client cert authentication to receive bad_certificate errors from the server side.

This PR disables the Filewatcher & callback for the private key file, as changes to the certificate file alone should indicate the presence of new key & cert values since the cert will be updated after the key. Both new values will therefore be updated to the KeyManager upon a cert file change.

Fixes #8
Supersedes #10 & #9

@pivotal-david-osullivan pivotal-david-osullivan merged commit 794ec39 into main Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid certificate update results in bad_certificate requests

2 participants