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

Sammi Chen commented on HADOOP-15671:
-------------------------------------

Thanks [~wujinhu] for the work. Some comments, 

1.  What's the time unit of the default value. Would you please add a comment? 
public static final long ASSUMED_ROLE_DURATION_DEFAULT = 30 * 60;   

2. "will be generated" and “." period is missed at the end.  
   Session name for the assumed role, must be valid characters
        according to Aliyun API. It is optional, will generated by
        oss java sdk if it is empty

   same "." missing at end of "Default is 30 minutes"

3. when "fs.oss.credentials.provider" is  
"org.apache.hadoop.fs.aliyun.oss.AssumedRoleCredentialProvider", are 
"fs.oss.accessKeyId" and "fs.oss.accessKeySecret" still mandatory property?  

4. import  * is now recommended in Hadoop code style.  
  import static org.apache.hadoop.fs.aliyun.oss.Constants.*; 
  import com.aliyun.oss.common.auth.*;

5. Invalid parameter cases are verified in TestAliyunCredentials while there is 
no success cases. Would you please add more UT to verify that the new 
credential provider works as expected. 

6. Java doc is not updated for new getCredentialsProvider API. The " throws 
IOException {" statement can be in the same line with " URI uri, Configuration 
conf)"

7. In AssumedRoleCredentialProvider, when getCredentials is called, 
crendentials are retrieved from stsCredentialsProvider, which makes 
setCredentials useless. Is it an expected behavior?   Also please try to add 
"final" to fields as long as it fits.  

8.  I agree with Steve Loughran. Please fire another JIRA to raise the OSS JDK 
version.  That one can be committed first. 



> AliyunOSS: Support Assume Roles in AliyunOSS
> --------------------------------------------
>
>                 Key: HADOOP-15671
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15671
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs/oss
>    Affects Versions: 3.1.0, 2.10.0, 2.9.1, 3.2.0, 3.0.3
>            Reporter: wujinhu
>            Assignee: wujinhu
>            Priority: Major
>         Attachments: HADOOP-15671.001.patch, HADOOP-15671.002.patch
>
>
> We will add assume role function in Aliyun OSS.
> For details about assume role and sts token, click the link below:
> [https://www.alibabacloud.com/help/doc-detail/31935.html?spm=a2c5t.11065259.1996646101.searchclickresult.1fad155aKOUvJZ]
>  
> Major Changes:
>  # Stabilise the constructor of CredentialsProvider so that other developers 
> can have their own implementations.
>  # change version of oss java sdk from 2.8.3 to 3.0.0 since new version 
> contains the basic function of assumed role credentials provider.
>  #  add assumed role functions for hadoop aliyun module



--
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