[ 
https://issues.apache.org/jira/browse/HBASE-28421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HBASE-28421:
-----------------------------------
    Labels: pull-request-available  (was: )

> Add ofs (Ozone Filesystem) support for acquireDelegationToken
> -------------------------------------------------------------
>
>                 Key: HBASE-28421
>                 URL: https://issues.apache.org/jira/browse/HBASE-28421
>             Project: HBase
>          Issue Type: Improvement
>          Components: security
>            Reporter: Pratyush Bhatt
>            Priority: Major
>              Labels: pull-request-available
>
> Currently acquireDelegationToken is hardcoded for checking swebhdfs, webhdfs 
> and hdfs(Refer below or 
> [here|[https://github.com/apache/hbase/blob/4f97ece9f5ab9288ea44f5842be55a4dbaa866e0/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/FsDelegationToken.java#L62-L84]]).
> We should add support for Ozone also. 
> {code:java}
> public void acquireDelegationToken(final FileSystem fs) throws IOException {
>   String tokenKind;
>   String scheme = fs.getUri().getScheme();
>   if (SWEBHDFS_SCHEME.equalsIgnoreCase(scheme)) {
>     tokenKind = SWEBHDFS_TOKEN_KIND.toString();
>   } else if (WEBHDFS_SCHEME.equalsIgnoreCase(scheme)) {
>     tokenKind = WEBHDFS_TOKEN_KIND.toString();
>   } else if (HDFS_URI_SCHEME.equalsIgnoreCase(scheme)) {
>     tokenKind = HDFS_DELEGATION_KIND.toString();
>   } else {
>     LOG.warn("Unknown FS URI scheme: " + scheme);
>     // Preserve default behavior
>     tokenKind = HDFS_DELEGATION_KIND.toString();
>   }
>   acquireDelegationToken(tokenKind, fs);
> } {code}
> This can impact jobs like BulkLoad on a secure environment.
> Thanks [~bszabolcs] for the debug help!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to