Review Board 1.7.22


ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop security configuration override

Review Request #3631 - Created Jan. 25, 2012 and updated

Eugene Koontz
trunk
ZOOKEEPER-1373
Reviewers
zookeeper
zookeeper-git
ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop security configuration override

Fix is to allow system property to designate the JAAS configuration section that the zookeeper client will use.
"ant test" java tests pass.
conf/zoo_sample.cfg
Revision aafb324 New Change
1
# The number of milliseconds of each tick
1
# The number of milliseconds of each tick
2
tickTime=2000
2
tickTime=2000
3
# The number of ticks that the initial 
3
# The number of ticks that the initial 
4
# synchronization phase can take
4
# synchronization phase can take
5
initLimit=10
5
initLimit=10
6
# The number of ticks that can pass between 
6
# The number of ticks that can pass between 
7
# sending a request and getting an acknowledgement
7
# sending a request and getting an acknowledgement
8
syncLimit=5
8
syncLimit=5
9
# the directory where the snapshot is stored.
9
# the directory where the snapshot is stored.
10
# do not use /tmp for storage, /tmp here is just 
10
# do not use /tmp for storage, /tmp here is just 
11
# example sakes.
11
# example sakes.
12
dataDir=/tmp/zookeeper
12
dataDir=/tmp/zookeeper
13
# the port at which the clients will connect
13
# the port at which the clients will connect
14
clientPort=2181
14
clientPort=2181
15
#
15
#
16
# Be sure to read the maintenance section of the 
16
# Be sure to read the maintenance section of the 
17
# administrator guide before turning on autopurge.
17
# administrator guide before turning on autopurge.
18
#
18
#
19
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
19
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
20
#
20
#
21
# The number of snapshots to retain in dataDir
21
# The number of snapshots to retain in dataDir
22
#autopurge.snapRetainCount=3
22
#autopurge.snapRetainCount=3
23
# Purge task interval in hours
23
# Purge task interval in hours
24
# Set to "0" to disable auto purge feature
24
# Set to "0" to disable auto purge feature
25
#autopurge.purgeInterval=1
25
#autopurge.purgeInterval=1

    
   
26
#

    
   
27
# The client will use the following value

    
   
28
# as the section of the JAAS configuration

    
   
29
# to use to authenticate with Zookeeper servers.

    
   
30
#sasl.clientconfig=Client
src/java/main/org/apache/zookeeper/ClientCnxn.java
Revision 6c25e40 New Change
 
src/java/main/org/apache/zookeeper/Login.java
Revision 6d2a38c New Change
 
src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java
Revision 722538e New Change
 
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java
New File
 
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java
New File
 
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java
New File
 
  1. conf/zoo_sample.cfg: Loading...
  2. src/java/main/org/apache/zookeeper/ClientCnxn.java: Loading...
  3. src/java/main/org/apache/zookeeper/Login.java: Loading...
  4. src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java: Loading...
  5. src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java: Loading...
  6. src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java: Loading...
  7. src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java: Loading...