> On April 28, 2015, 1:10 a.m., Eugene Koontz wrote: > > src/java/main/org/apache/zookeeper/LoginFactory.java, line 30 > > <https://reviews.apache.org/r/32979/diff/1/?file=920929#file920929line30> > > > > I'm not sure that we need this factory class - I don't see where we > > have any multiple logins in the test code (or in non-test code). If we do > > only need this factory in the test code, then it might be better under the > > test/ directory. > > Yuliya Feldman wrote: > Yes - so far the use case for multiple logins is only in Tests where we > do both client and server.
Multiple login in test code is implicit - because you start both client and server within the same process. Ideally Login should be a singleton as you should be logging once per process, but in case of UnitTests it is not the case. I also could imagine some of those situations with Hbase (or other application) embedded ZookeeperServer - where the same process (HBaseMaster for example) can behave as ZK client and ZK server at the same time. - Yuliya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32979/#review81785 ----------------------------------------------------------- On April 29, 2015, 10:19 a.m., Yuliya Feldman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32979/ > ----------------------------------------------------------- > > (Updated April 29, 2015, 10:19 a.m.) > > > Review request for zookeeper, Eugene Koontz, Patrick Hunt, and Camille > Fournier. > > > Repository: zookeeper-git > > > Description > ------- > > Today SASLAuthenticationProvider is used for all SASL based authentications > which creates some "if/else" statements in ZookeeperSaslClient and > ZookeeperSaslServer code with just Kerberos and Digest. > We want to use yet another different SASL based authentication and adding one > more "if/else" with some code specific just to that new way does not make > much sense. > Proposal is to allow to plug custom SASL Authentication mechanism(s) without > further changes in Zookeeper code. > > > Diffs > ----- > > src/java/main/org/apache/zookeeper/Login.java 44b0bdf > src/java/main/org/apache/zookeeper/LoginFactory.java PRE-CREATION > src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 53f33e8 > src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java 1235faa > src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java 60711ee > src/java/main/org/apache/zookeeper/server/auth/AuthMethod.java PRE-CREATION > src/java/main/org/apache/zookeeper/server/auth/AuthRegistry.java > PRE-CREATION > src/java/main/org/apache/zookeeper/server/auth/DigestAuthMethod.java > PRE-CREATION > src/java/main/org/apache/zookeeper/server/auth/KerberosAuthMethod.java > PRE-CREATION > src/java/test/org/apache/zookeeper/test/SaslPluggableAuthTest.java > PRE-CREATION > src/java/test/org/apache/zookeeper/test/auth/util/GenericLoginModule.java > PRE-CREATION > src/java/test/org/apache/zookeeper/test/auth/util/SimpleAuthMethod.java > PRE-CREATION > src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslClient.java > PRE-CREATION > src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslProvider.java > PRE-CREATION > src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslServer.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/32979/diff/ > > > Testing > ------- > > UnitTests passed, New Unit Tests added > tested Digest and Kerberos(with real KDC) > > > Thanks, > > Yuliya Feldman > >
