pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] merlimat commented on a change in pull request #3568: Refresh Certs every X minutes
Date Thu, 14 Feb 2019 15:05:44 GMT
merlimat commented on a change in pull request #3568: Refresh Certs every X minutes
URL: https://github.com/apache/pulsar/pull/3568#discussion_r256871109
 
 

 ##########
 File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/AuthenticationDataProvider.java
 ##########
 @@ -107,4 +123,11 @@ default String getCommandData() {
         return null;
     }
 
+    /**
+     * Refresh Authentication Data.
+     * 
+     */
+    default void refresh() {
 
 Review comment:
   But shouldn't this be dealt internally by implementations? Why should we triggering it
from outside? 
   
   For example: when reading token credential you have different ways to refresh the token
data (eg: passing a `Supplier<String>` or by refreshing the token file). 
   
   The implementation will have more information about when it has to refresh, so it would
be better to leave the decision inside there.
   
   My point is that TLS plugin should do the caching in its own implementation, for example
by checking the last modified of cert file when client lib calls `getTlsCertificates()`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message