You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Arshad Mohammad (JIRA)" <ji...@apache.org> on 2015/09/03 16:45:46 UTC

[jira] [Resolved] (ZOOKEEPER-2257) Make zookeeper server principal configurable at zookeeper client side

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arshad Mohammad resolved ZOOKEEPER-2257.
----------------------------------------
    Resolution: Duplicate

Closing it as it is a duplicate of ZOOKEEPER-1467. 

> Make zookeeper server principal configurable at zookeeper client side
> ---------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2257
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2257
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Arshad Mohammad
>            Assignee: Arshad Mohammad
>
> Currently Zookeeper client expects zookeeper server's principal to be in the form of zookeeper.sasl.client.username/server-ip  for example zookeeper/192.162.1.100. 
> But this may not always be the case server principal can be some thing like zookeeper/hadoop.foo.com
> It would be better if we can make server principal configurable.
> Current Code:
> {code}
> String principalUserName = System.getProperty(ZK_SASL_CLIENT_USERNAME, "zookeeper");
> zooKeeperSaslClient = new ZooKeeperSaslClient(principalUserName + "/" + addr.getHostString());
> {code}
> Proposed Code:
> {code}
> String serverPrincipal = System.getProperty("zookeeper.server.principal");
> if (null != serverPrincipal) {
>     zooKeeperSaslClient = new ZooKeeperSaslClient(serverPrincipal);
> } else {
>     String principalUserName = System.getProperty(ZK_SASL_CLIENT_USERNAME, "zookeeper");
>     zooKeeperSaslClient = new ZooKeeperSaslClient(principalUserName + "/" + addr.getHostString());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)