onobc commented on code in PR #18358:
URL: https://github.com/apache/pulsar/pull/18358#discussion_r1025408082


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ClientConfigurationData.java:
##########
@@ -367,16 +370,49 @@ public class ClientConfigurationData implements 
Serializable, Cloneable {
     @Secret
     private String socks5ProxyPassword;
 
+    /**
+     * Gets the authentication settings for the client.
+     * <p>
+     * If the authentication has not been specified an attempt is made to 
determine one using auth-related
+     * properties. In this case, the {@code authPluginClassName} and one of 
{@code authParams} or {@code authParamMap}
+     * must be configured for the authentication to be determined. Otherwise, 
a default of
+     * {@link AuthenticationDisabled} is returned.
+     *
+     * @return authentication settings for the client
+     */
     public Authentication getAuthentication() {
         if (authentication == null) {
-            this.authentication = AuthenticationDisabled.INSTANCE;
+            setAuthenticationFromPropsIfAvailable();

Review Comment:
   I think we got to this point out of convenience. A few commits back it was 
doing the utility method approach and that utility was being called in the 
proper places. I agree w/ the concerns and am happy to move this back to 
https://github.com/apache/pulsar/pull/18358/commits/eeb182c092f215d2741fa18e48c372450c464752
 . @nodece wdyt? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to