ivankelly commented on a change in pull request #2188: client configuration on authentication page is out of date URL: https://github.com/apache/incubator-pulsar/pull/2188#discussion_r203433454
########## File path: site/docs/latest/security/authorization.md ########## @@ -74,36 +74,19 @@ needs to be able to publish to other clusters' topics. ## Pulsar admin authentication -```java -String authPluginClassName = "com.org.MyAuthPluginClass"; -String authParams = "param1:value1"; -boolean useTls = false; -boolean tlsAllowInsecureConnection = false; -String tlsTrustCertsFilePath = null; - -ClientConfiguration config = new ClientConfiguration(); -config.setAuthentication(authPluginClassName, authParams); -config.setUseTls(useTls); -config.setTlsAllowInsecureConnection(tlsAllowInsecureConnection); -config.setTlsTrustCertsFilePath(tlsTrustCertsFilePath); - -PulsarAdmin admin = new PulsarAdmin(url, config); -``` - To use TLS: ```java +String url = "https://my-broker.example.com:8443"; String authPluginClassName = "com.org.MyAuthPluginClass"; String authParams = "param1:value1"; -boolean useTls = false; boolean tlsAllowInsecureConnection = false; -String tlsTrustCertsFilePath = null; - -ClientConfiguration config = new ClientConfiguration(); -config.setAuthentication(authPluginClassName, authParams); -config.setUseTls(useTls); -config.setTlsAllowInsecureConnection(tlsAllowInsecureConnection); -config.setTlsTrustCertsFilePath(tlsTrustCertsFilePath); - -PulsarAdmin admin = new PulsarAdmin(url, config); +String tlsTrustCertsFilePath = "/path/to/tls-trust-certs-file"; Review comment: The filename is usually something like cacert.pem or ca.cert.pem. We should use one of them here. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
