[
https://issues.apache.org/jira/browse/HADOOP-10868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14134107#comment-14134107
]
Alejandro Abdelnur commented on HADOOP-10868:
---------------------------------------------
*JaasConfiguration.java*:
* Rename this class to something more specific, ie {{ZKSignerJaasConfiguration}}
* no need for a Map of entries, a JaasConfiguration has a single entry, we can
keep the name and the AppConfigurationEntry[] and return if it matches, also it
does need to be static, ie:
{code}
...
private AppConfigurationEntry[] entry;
private String entryName;
public JaasConfiguration(String entryName, ...) {
this.entryName = entryName;
...
AppConfigurationEntry appEntry = ...
entry = new AppConfiguratioEntry[] { appEntr };
}
public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
return (entryName.equals(name)) ? entry : null;
}
...
{code}
*SignerSecretProvider.java*:
* the {{init()}} method does not need the configPrefix, the passed configs
should be already deprefixed.
*ZKSignerSecretProvider.java*:
* make a {{CONFIG_PREFIX}} constant for {{signer.secret.provider.zookeeper.}}
and use it in all constants.
* the value set under the sysprop {{LOGIN_CONTEXT_NAME_KEY}}, instead 'Client'
make it ’SecretSignerClient', this uniqueness will help troubleshooting in case
there is something else in the system playing with zookeeper. (BTW, I’m sure
this will bite us eventually, I would open a ZK JIRA to allow Jaas configs per
ZK client instance).
*Testcases*
* make sure you unset the sysprop of the ZK client with @After
+1 after this is taken care of.
> Create a ZooKeeper-backed secret provider
> -----------------------------------------
>
> Key: HADOOP-10868
> URL: https://issues.apache.org/jira/browse/HADOOP-10868
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: security
> Affects Versions: 2.4.1
> Reporter: Robert Kanter
> Assignee: Robert Kanter
> Attachments: HADOOP-10868.patch, HADOOP-10868.patch,
> HADOOP-10868.patch, HADOOP-10868.patch, HADOOP-10868.patch,
> HADOOP-10868_branch-2.patch, HADOOP-10868_branch-2.patch,
> HADOOP-10868_branch-2.patch, HADOOP-10868_branch-2.patch,
> HADOOP-10868_branch-2.patch
>
>
> Create a secret provider (see HADOOP-10791) that is backed by ZooKeeper and
> can synchronize amongst different servers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)