-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Force cert reload on a daily basis. #14535
Conversation
…event any discrepancy due to FileWatcher in reloading the certs.
Refactored the reloadSSL method to be used by both FileWatcher and Scheduled Thread. Made the reloadSSL synchronized so that it is thread safe.
Refactored the reloadSSL method to be used by both FileWatcher and Scheduled Thread. Made the reloadSSL synchronized so that it is thread safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High level question: Is it watcher based triggering right now? Seems reloadSslFactoryWhenFileStoreChanges()
is also executed in a separate executor, is it possible to have a single entry point which monitors both triggering condition and interval?
pinot-common/src/main/java/org/apache/pinot/common/utils/tls/RenewableTlsUtils.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/utils/tls/RenewableTlsUtils.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14535 +/- ##
============================================
+ Coverage 61.75% 63.91% +2.16%
- Complexity 207 1569 +1362
============================================
Files 2436 2675 +239
Lines 133233 146985 +13752
Branches 20636 22559 +1923
============================================
+ Hits 82274 93952 +11678
- Misses 44911 46105 +1194
- Partials 6048 6928 +880
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@Jackie-Jiang - Yes, the current flow is watcher based. We want to keep both separate since this is a backup to make sure that the certs are reloaded everyday. FileWatcher thread just has to run once after restart to set up the FileWatcher and the new executor is to make sure that it runs once a day to reload the SSL. |
(cherry picked from commit 34b43a3)
Forcing SSL reload once a day using a scheduled thread. This is to prevent any discrepancy due to FileWatcher in reloading the certs.
There has been scenarios where the FileWatcher is not reliable in detecting changes and reloading the certs as expected when changed. The certs were reloaded successfully in few components but it was never detected and run in others. This will result in few components with stale certificates. In order to prevent this issue, we are adding a new scheduled thread which will run once a day and reload the certs.