Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
ClientContext::get gets the context from CACHE via a config setting based name, then KeyProviderCache stored in ClientContext gets the key provider cached by URI from the configuration, too. These would return the same KeyProvider regardless of current UGI.
KMSClientProvider caches the UGI (actualUgi) in ctor; that means in particular that all the users of DFS with KMSClientProvider in a process will get the KMS token (along with other credentials) of the first user, via the above cache.
Either KMSClientProvider shouldn't store the UGI, or one of the caches should be UGI-aware, like the FS object cache.
Side note: the comment in createConnection that purports to handle the different UGI doesn't seem to cover what it says it covers. In our case, we have two unrelated UGIs with no auth (createRemoteUser) with bunch of tokens, including a KMS token, added.
Attachments
Attachments
Issue Links
- breaks
-
HADOOP-13748 TestKMS fails in testProxyUserSimple and testDelegationTokensOpsSimple
- Resolved
- duplicates
-
HADOOP-13381 KMS clients should use KMS Delegation Tokens from current UGI.
- Resolved
- is required by
-
HADOOP-13988 KMSClientProvider does not work with WebHDFS and Apache Knox w/ProxyUser
- Resolved
- relates to
-
HADOOP-13748 TestKMS fails in testProxyUserSimple and testDelegationTokensOpsSimple
- Resolved