hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David McGinnis (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-16105) WASB in secure mode does not set connectingUsingSAS
Date Wed, 13 Feb 2019 15:22:00 GMT

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

David McGinnis edited comment on HADOOP-16105 at 2/13/19 3:21 PM:
------------------------------------------------------------------

[~stevel@apache.org]: The fix itself looks fine. Thanks for taking care of this.

As for your testing, you mention above you aren't sure how best to test it. I am fairly certain
there is a way to do a positive test on this that shows the fix works, but after putting in
3-4 hours a couple of nights ago on it, I wasn't able to get it exactly right. I was going
to put more time in last night on this, but got tied up in other things. I'm including the
test below as I have it now. I'm fairly certain this code (when tweaked to be correct of course)
will give an Unauthorized exception without the change, and pass with the change. Feel free
to use or not.

 

 
{code:java}
@Test
 public void testConnectUsingSecureSASSuccess() throws Exception {
    // Create the test account with SAS credentials.          
    Configuration conf = new Configuration();         
    conf.setBoolean(AzureNativeFileSystemStore.KEY_USE_SECURE_MODE, true);     
    testAccount = AzureBlobStorageTestAccount.create("",                  

        EnumSet.of(CreateOptions.UseSas, CreateOptions.CreateContainer),          
        conf);
    assumeNotNull(testAccount);    
    
    CloudBlobContainer container = testAccount.getRealContainer();          
    AzureFileSystemInstrumentation instrumentation = new AzureFileSystemInstrumentation(conf);
    AzureNativeFileSystemStore store = new AzureNativeFileSystemStore();     
    store.initialize(container.getUri(), conf, instrumentation);         
    store.list("/", -1, -1);   
}
{code}
 


was (Author: mcginnda):
[~stevel@apache.org]: The fix itself looks fine. Thanks for taking care of this.

As for your testing, you mention above you aren't sure how best to test it. I am fairly certain
there is a way to do a positive test on this that shows the fix works, but after putting in
3-4 hours a couple of nights ago on it, I wasn't able to get it exactly right. I was going
to put more time in last night on this, but got tied up in other things. I'm including the
test below as I have it now. I'm fairly certain this code (when tweaked to be correct of course)
will give an Unauthorized exception without the change, and pass with the change. Feel free
to use or not.

 

@Test
public void testConnectUsingSecureSASSuccess() throws Exception {    

    // Create the test account with SAS credentials.    

    Configuration conf = new Configuration();    

    conf.setBoolean(AzureNativeFileSystemStore.KEY_USE_SECURE_MODE, true);    

    testAccount = AzureBlobStorageTestAccount.create("",          

        EnumSet.of(CreateOptions.UseSas, CreateOptions.CreateContainer),        

        conf);     

    assumeNotNull(testAccount);    

    CloudBlobContainer container = testAccount.getRealContainer();     

    AzureFileSystemInstrumentation instrumentation = new AzureFileSystemInstrumentation(conf);
   

    AzureNativeFileSystemStore store = new AzureNativeFileSystemStore();    

    store.initialize(container.getUri(), conf, instrumentation);    

    store.list("/", -1, -1);  

}

> WASB in secure mode does not set connectingUsingSAS
> ---------------------------------------------------
>
>                 Key: HADOOP-16105
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16105
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/azure
>    Affects Versions: 2.8.5, 3.1.2
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Major
>         Attachments: HADOOP-16105-001.patch, HADOOP-16105-002.patch
>
>
> If you run WASB in secure mode, it doesn't set {{connectingUsingSAS}} to true, which
can break things



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message