[ 
https://issues.apache.org/jira/browse/HADOOP-12862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16404935#comment-16404935
 ] 

Wei-Chiu Chuang commented on HADOOP-12862:
------------------------------------------

[~shv] 

Thanks for your suggestion. In fact, if you look at the implementation of 
Configuration.getPassword(), 
{code:java}
/**
 * Get the value for a known password configuration element.
 * In order to enable the elimination of clear text passwords in config,
 * this method attempts to resolve the property name as an alias through
 * the CredentialProvider API and conditionally fallsback to config.
 * @param name property name
 * @return password
 */
public char[] getPassword(String name) throws IOException {
  char[] pass = null;

  pass = getPasswordFromCredentialProviders(name);

  if (pass == null) {
    pass = getPasswordFromConfig(name);
  }

  return pass;
}
{code}
It first tries to get password from a credential file, which is encrypted with 
a password. It reads password from config only if the first step fails. So 
that's even secure than a plain text password file.

How about we provide an option for getPassword() so it optionally does not fall 
back to read password from configuration?

I want to propose this solution, because Cloudera Manager supports only reading 
passwords from credential files, which is in fact a superior approach from a 
security perspective. I am not sure how Ambari reads passwords though. 

> LDAP Group Mapping over SSL can not specify trust store
> -------------------------------------------------------
>
>                 Key: HADOOP-12862
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12862
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>         Attachments: HADOOP-12862.001.patch, HADOOP-12862.002.patch, 
> HADOOP-12862.003.patch, HADOOP-12862.004.patch, HADOOP-12862.005.patch, 
> HADOOP-12862.006.patch, HADOOP-12862.007.patch, HADOOP-12862.008.patch
>
>
> In a secure environment, SSL is used to encrypt LDAP request for group 
> mapping resolution.
> We (+[~yoderme], +[~tgrayson]) have found that its implementation is strange.
> For information, Hadoop name node, as an LDAP client, talks to a LDAP server 
> to resolve the group mapping of a user. In the case of LDAP over SSL, a 
> typical scenario is to establish one-way authentication (the client verifies 
> the server's certificate is real) by storing the server's certificate in the 
> client's truststore.
> A rarer scenario is to establish two-way authentication: in addition to store 
> truststore for the client to verify the server, the server also verifies the 
> client's certificate is real, and the client stores its own certificate in 
> its keystore.
> However, the current implementation for LDAP over SSL does not seem to be 
> correct in that it only configures keystore but no truststore (so LDAP server 
> can verify Hadoop's certificate, but Hadoop may not be able to verify LDAP 
> server's certificate)
> I think there should an extra pair of properties to specify the 
> truststore/password for LDAP server, and use that to configure system 
> properties {{javax.net.ssl.trustStore}}/{{javax.net.ssl.trustStorePassword}}
> I am a security layman so my words can be imprecise. But I hope this makes 
> sense.
> Oracle's SSL LDAP documentation: 
> http://docs.oracle.com/javase/jndi/tutorial/ldap/security/ssl.html
> JSSE reference guide: 
> http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to