mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Add support for kerberos token based auth (#5809)
* Add support for kerberos token based auth * Added kerb_ticket as attribute to HDFSFileSystem * Lint fix for config schema * Updated black style changes * Removed staticmethod decorator from hdfs
This commit is contained in:
@@ -172,7 +172,7 @@ SCHEMA = {
|
||||
"allow_agent": Bool,
|
||||
**REMOTE_COMMON,
|
||||
},
|
||||
"hdfs": {"user": str, **REMOTE_COMMON},
|
||||
"hdfs": {"user": str, "kerb_ticket": str, **REMOTE_COMMON},
|
||||
"webhdfs": {
|
||||
"hdfscli_config": str,
|
||||
"webhdfs_token": str,
|
||||
|
||||
+4
-2
@@ -84,8 +84,9 @@ class HDFSFileSystem(BaseFileSystem):
|
||||
path=parsed.path,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def hdfs(path_info):
|
||||
self.kerb_ticket = config.get("kerb_ticket")
|
||||
|
||||
def hdfs(self, path_info):
|
||||
import pyarrow.fs
|
||||
|
||||
# NOTE: HadoopFileSystem is not meant to be closed by us and doesn't
|
||||
@@ -100,6 +101,7 @@ class HDFSFileSystem(BaseFileSystem):
|
||||
path_info.host,
|
||||
path_info.port,
|
||||
user=path_info.user,
|
||||
kerb_ticket=self.kerb_ticket,
|
||||
)
|
||||
|
||||
@contextmanager
|
||||
|
||||
Reference in New Issue
Block a user