Interface JGroupsCertificateProvider
- All Superinterfaces:
Provider
- All Known Implementing Classes:
DatabaseJGroupsCertificateProvider,FileJGroupsCertificateProvider
Provider for the TLS certificate for JGroups communication.
Implementation notes
If the method isEnabled() returns true, then the implementation must also implement
keyManager() and trustManager().
If the method supportRotateAndReload() returns true, then the implementation must also implement
rotateCertificate(), reloadCertificate() and nextRotation().
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()default booleandefault KeyManagerReturns a managedKeyManager.default DurationReturns when the next certificate rotation is required.default voidReloads the most recent certificate and apply it to theKeyManagerandTrustManager.default voidA new certificate must be generated.default booleandefault TrustManagerReturns a managedTrustManager.
-
Field Details
-
DISABLED
-
-
Method Details
-
rotateCertificate
default void rotateCertificate()A new certificate must be generated.The generated certificate should not be used immediately, but only after
reloadCertificate()is invoked.This method must be implemented when
supportRotateAndReload()returnstrue. -
reloadCertificate
default void reloadCertificate()Reloads the most recent certificate and apply it to theKeyManagerandTrustManager.This method must be implemented when
supportRotateAndReload()returnstrue. -
nextRotation
Returns when the next certificate rotation is required.It is used to automatically rotate certificates periodically.
This method must be implemented when
supportRotateAndReload()returnstrue.- Returns:
- The time until the next rotation.
-
keyManager
Returns a managedKeyManager.If
supportRotateAndReload()returnstrue, the instance returned must be updated with the new certificate whenreloadCertificate(). This method is invoked only once at boot time.This method must be implemented when
isEnabled()returnstrue.- Returns:
- The
KeyManagerto use by theSSLContext.
-
trustManager
Returns a managedTrustManager.If
supportRotateAndReload()returnstrue, the instance returned must be updated with the new certificate whenreloadCertificate(). This method is invoked only once at boot time.This method must be implemented when
isEnabled()returnstrue.- Returns:
- The
TrustManagerto use by theSSLContext.
-
supportRotateAndReload
default boolean supportRotateAndReload()- Returns:
trueif rotation and reload requests is possible.
-
isEnabled
default boolean isEnabled()- Returns:
trueif TLS is enabled for JGroups communication.
-
close
default void close()
-