hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiaoyu Yao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11073) Credential Provider related Unit Tests Failure on Windows
Date Sun, 07 Sep 2014 18:27:29 GMT

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

Xiaoyu Yao commented on HADOOP-11073:
-------------------------------------

I hit error in the following test on my Windows VM. Maybe it is just specific to my setup.

{code}

TestSSLFactory#testNoClientCertsInitialization 

java.security.cert.CertificateException: Subject class type invalid.
info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(owner));     <---owner = "CN=localhost,
O=server" --->

Stack: 
	at sun.security.x509.X509CertInfo.setSubject(X509CertInfo.java:888)
	at sun.security.x509.X509CertInfo.set(X509CertInfo.java:415)
	at org.apache.hadoop.security.ssl.KeyStoreTestUtil.generateCertificate(KeyStoreTestUtil.java:96)
	at org.apache.hadoop.security.ssl.KeyStoreTestUtil.setupSSLConfig(KeyStoreTestUtil.java:268)
	at org.apache.hadoop.security.ssl.TestSSLFactory.createConfiguration(TestSSLFactory.java:64)
	at org.apache.hadoop.security.ssl.TestSSLFactory.testNoClientCertsInitialization(TestSSLFactory.java:338)
{code}


> Credential Provider related Unit Tests Failure on Windows
> ---------------------------------------------------------
>
>                 Key: HADOOP-11073
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11073
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: security
>    Affects Versions: 2.4.1
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>         Attachments: HADOOP-11073.0.patch, HADOOP-11073.1.patch
>
>
> Reported by: Xiaomara and investigated by [~cnauroth].
> The credential provider related unit tests failed on Windows. The tests try to set up
a URI by taking the build test directory and concatenating it with other strings containing
the rest of the URI format, i.e.:
> {code}
>   public void testFactory() throws Exception {
>     Configuration conf = new Configuration();
>     conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH,
>         UserProvider.SCHEME_NAME + ":///," +
>             JavaKeyStoreProvider.SCHEME_NAME + "://file" + tmpDir + "/test.jks");
> {code}
> This logic is incorrect on Windows, because the file path separator will be '\', which
violates URI syntax. Forward slash is not permitted. 
> The proper fix is to always do path/URI construction through the org.apache.hadoop.fs.Path
class, specifically using the constructors that take explicit parent and child arguments.
> The affected unit tests are:
> {code}
> * TestKeyProviderFactory
> * TestLdapGroupsMapping
> * TestCredentialProviderFactory
> * KeyStoreTestUtil
> * TestSSLFactory
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message