private final javax.security.auth.login.Configuration baseConfig = javax.security.auth.login.Configuration
I expect pre-commit will flag a nitpick about indentation and line length exceeding 80 characters here, so we'll need one more patch revision.
I'm in favor of the approach though. This will help avoid some bugs until we can implement a long-term fix that makes use of
ZOOKEEPER-2139. There is already similar working code in Hive. (See the LlapZookeeperRegistryImpl class.) I know Sergey was able to demonstrate that this fix works through manual testing.
Arun Suresh, are you interested in reviewing this? I'll give it some time before I consider committing.