[#3337] improvement(hadoop-catalog): Support user impersonation for Hadoop catalog.#3352
[#3337] improvement(hadoop-catalog): Support user impersonation for Hadoop catalog.#3352yuqi1129 merged 20 commits intoapache:mainfrom
Conversation
...ommon/src/main/java/com/datastrato/gravitino/hadoop/authentication/AuthenticationConfig.java
Outdated
Show resolved
Hide resolved
|
Is it ready for review? |
I'm afraid we need to add some tests using the HDFS cluster, not just a mini cluster here. If this does not matter, I think it's ready for review. |
|
We could have a separate PR for e2e test, using mock test here to cover the logic should be enough. |
|
The following point needs clarification:
@jerryshao |
|
I would choose the option 2 as the bottom line. If we have a better solution to avoid code duplication while not changing Hadoop version, that would be better. |
|
@qqqttt123 @jerryshao |
|
@jerryshao |
|
All resolved, please help to double-check if it's okay now. |
...og-hadoop/src/main/java/com/datastrato/gravitino/catalog/hadoop/kerberos/KerberosClient.java
Outdated
Show resolved
Hide resolved
.../catalog-hadoop/src/main/java/com/datastrato/gravitino/catalog/hadoop/HadoopProxyPlugin.java
Outdated
Show resolved
Hide resolved
|
You need to notice this apache/uniffle#824 |
|
What configurations do you need if you support IAM? Could you configure it with kerberos at the same time? |
I would prefer to use another PR solution to support multiple KDCs and multiple tables in the Hadoop catalogs, I think the Hive catalog also needs to handle this issue. I may take some time to think about it and complete it. Currently, we don't have enough time to handle it in this version. |
Hive catalog doesn't need to handle this. |
I have added the following keys and other according changes: |
| .put( | ||
| AUTH_TYPE_KEY, | ||
| PropertyEntry.stringImmutablePropertyEntry( | ||
| AUTH_TYPE_KEY, "The uri of key tab for the catalog", false, null, false, false)) |
| import java.util.Map; | ||
|
|
||
| public class AuthenticationConfig extends Config { | ||
| public static final String AUTH_TYPE_KEY = "hadoop.authentication.type"; |
There was a problem hiding this comment.
Maybe we should use authentication.type.
There was a problem hiding this comment.
This is the configuration of Hadoop catalog, why do we need to remove hadoop here?
There was a problem hiding this comment.
Hadoop catalog properties don't start with hadoop. You can refer to location. hadoop is rebudant information.
| import org.apache.commons.lang3.StringUtils; | ||
|
|
||
| public class KerberosConfig extends AuthenticationConfig { | ||
| public static final String KEY_TAB_URI_KEY = "kerberos.keytab-uri"; |
There was a problem hiding this comment.
authentication.kerberos.keytab-uri?
|
LGTM, @jerryshao Could you check whether the config options are ok? |
… for Hadoop catalog. (apache#3352) ### What changes were proposed in this pull request? Add user impersonation for the Hadoop catalog. ### Why are the changes needed? We need authentication for the encrypted HDFS cluster. Fix: apache#3337 ### Does this PR introduce _any_ user-facing change? N/A. ### How was this patch tested? UT(TO add).

What changes were proposed in this pull request?
Add user impersonation for the Hadoop catalog.
Why are the changes needed?
We need authentication for the encrypted HDFS cluster.
Fix: #3337
Does this PR introduce any user-facing change?
N/A.
How was this patch tested?
UT(TO add).