FANNG1 commented on code in PR #11901:
URL: https://github.com/apache/gravitino/pull/11901#discussion_r3533135406
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java:
##########
@@ -123,9 +124,22 @@ private static JdbcCatalog loadJdbcCatalog(IcebergConfig
icebergConfig) {
HdfsConfiguration hdfsConfiguration = new HdfsConfiguration();
properties.forEach(hdfsConfiguration::set);
- jdbcCatalog.setConf(hdfsConfiguration);
+ AuthenticationConfig authenticationConfig = new
AuthenticationConfig(properties);
try {
- jdbcCatalog.initialize(icebergCatalogName, properties);
+ if (authenticationConfig.isSimpleAuth()) {
+ jdbcCatalog.setConf(hdfsConfiguration);
+ jdbcCatalog.setHadoopConf(hdfsConfiguration);
Review Comment:
Requiring every caller to invoke both `setConf` and `setHadoopConf` with the
same object is a bit of a trap — forgetting `setHadoopConf` surfaces later as
an NPE during Kerberos init. Since the separate field only exists because
Iceberg's `JdbcCatalog.setConf(Object)` has no getter, how about overriding
`setConf` in `ClosableJdbcCatalog` to also capture the `Configuration`, and
dropping `setHadoopConf`/`getHadoopConf` (the getter is currently unused)?
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ClosableJdbcCatalog.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.iceberg.common;
+
+import com.google.common.base.Preconditions;
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Map;
+import java.util.function.Function;
+import org.apache.gravitino.catalog.hadoop.auth.KerberosAuthUtils;
+import org.apache.gravitino.catalog.hadoop.auth.KerberosClient;
+import org.apache.gravitino.iceberg.common.authentication.AuthenticationConfig;
+import org.apache.gravitino.iceberg.common.authentication.SupportsKerberos;
+import
org.apache.gravitino.iceberg.common.authentication.kerberos.KerberosConfig;
+import org.apache.gravitino.utils.PrincipalUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.iceberg.io.FileIO;
+import org.apache.iceberg.jdbc.JdbcCatalog;
+import org.apache.iceberg.jdbc.JdbcClientPool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * ClosableJdbcCatalog is a wrapper class to wrap Iceberg JdbcCatalog to do
some clean-up work like
+ * closing resources and supporting Kerberos authentication for HDFS access.
+ */
+public class ClosableJdbcCatalog extends JdbcCatalog implements Closeable,
SupportsKerberos {
+
+ private static final Logger LOGGER =
LoggerFactory.getLogger(ClosableJdbcCatalog.class);
+
+ private KerberosClient kerberosClient;
+
+ private Configuration hadoopConf;
+
+ public ClosableJdbcCatalog() {
+ super();
+ }
+
+ public ClosableJdbcCatalog(
+ Function<Map<String, String>, FileIO> ioBuilder,
+ Function<Map<String, String>, JdbcClientPool> clientPoolBuilder,
+ boolean initializeCatalogTables) {
+ super(ioBuilder, clientPoolBuilder, initializeCatalogTables);
+ }
+
+ /**
+ * Initialize the ClosableJdbcCatalog with the given input name and
properties.
+ *
+ * <p>Note: This method can only be called once as it will create new client
pools.
+ *
+ * @param inputName name of the catalog
+ * @param properties properties for the catalog
+ */
+ @Override
+ public void initialize(String inputName, Map<String, String> properties) {
+ super.initialize(inputName, properties);
+
+ AuthenticationConfig authenticationConfig = new
AuthenticationConfig(properties);
+ if (authenticationConfig.isKerberosAuth()) {
+ this.kerberosClient = initKerberosClient();
+ }
+ }
+
+ /** Returns the Hadoop configuration used for Kerberos login and HDFS
access. */
+ public Configuration getHadoopConf() {
+ return hadoopConf;
+ }
+
+ /** Sets the Hadoop configuration used for Kerberos login and HDFS access. */
+ public void setHadoopConf(Configuration hadoopConf) {
+ this.hadoopConf = hadoopConf;
+ }
+
+ @Override
+ public void close() {
+ if (kerberosClient != null) {
+ try {
+ kerberosClient.close();
+ } catch (Exception e) {
+ LOGGER.warn("Failed to close KerberosClient", e);
+ }
+ }
+ try {
+ super.close();
+ } catch (Exception e) {
+ LOGGER.warn("Failed to close JdbcCatalog", e);
+ }
+ }
+
+ @Override
+ public <R> R doKerberosOperations(Executable<R> executable) throws Throwable
{
Review Comment:
`doKerberosOperations` and `initKerberosClient` are near-verbatim copies
from `ClosableHiveCatalog` (this one is identical minus the delegation-token
block) — ~70 lines of security-sensitive logic that a future fix to
principal/realm handling or keytab fetching would have to land twice.
Extracting a shared helper (composition class or default methods on
`SupportsKerberos`) would help; also fine as a follow-up issue if you prefer to
keep this PR aligned with the existing pattern.
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ClosableJdbcCatalog.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.iceberg.common;
+
+import com.google.common.base.Preconditions;
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Map;
+import java.util.function.Function;
+import org.apache.gravitino.catalog.hadoop.auth.KerberosAuthUtils;
+import org.apache.gravitino.catalog.hadoop.auth.KerberosClient;
+import org.apache.gravitino.iceberg.common.authentication.AuthenticationConfig;
+import org.apache.gravitino.iceberg.common.authentication.SupportsKerberos;
+import
org.apache.gravitino.iceberg.common.authentication.kerberos.KerberosConfig;
+import org.apache.gravitino.utils.PrincipalUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.iceberg.io.FileIO;
+import org.apache.iceberg.jdbc.JdbcCatalog;
+import org.apache.iceberg.jdbc.JdbcClientPool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * ClosableJdbcCatalog is a wrapper class to wrap Iceberg JdbcCatalog to do
some clean-up work like
+ * closing resources and supporting Kerberos authentication for HDFS access.
+ */
+public class ClosableJdbcCatalog extends JdbcCatalog implements Closeable,
SupportsKerberos {
+
+ private static final Logger LOGGER =
LoggerFactory.getLogger(ClosableJdbcCatalog.class);
+
+ private KerberosClient kerberosClient;
+
+ private Configuration hadoopConf;
+
+ public ClosableJdbcCatalog() {
+ super();
+ }
+
+ public ClosableJdbcCatalog(
+ Function<Map<String, String>, FileIO> ioBuilder,
+ Function<Map<String, String>, JdbcClientPool> clientPoolBuilder,
+ boolean initializeCatalogTables) {
+ super(ioBuilder, clientPoolBuilder, initializeCatalogTables);
+ }
+
+ /**
+ * Initialize the ClosableJdbcCatalog with the given input name and
properties.
+ *
+ * <p>Note: This method can only be called once as it will create new client
pools.
+ *
+ * @param inputName name of the catalog
+ * @param properties properties for the catalog
+ */
+ @Override
+ public void initialize(String inputName, Map<String, String> properties) {
+ super.initialize(inputName, properties);
+
+ AuthenticationConfig authenticationConfig = new
AuthenticationConfig(properties);
+ if (authenticationConfig.isKerberosAuth()) {
+ this.kerberosClient = initKerberosClient();
Review Comment:
`super.initialize()` creates the JDBC client pool first; if
`initKerberosClient()` then throws, nothing closes the pool. Suggest wrapping
the Kerberos init in try/catch, calling `close()` before rethrowing. (Same
pre-existing pattern in `ClosableHiveCatalog`, but cheap to get right in the
new class.)
##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ClosableJdbcCatalog.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.iceberg.common;
+
+import com.google.common.base.Preconditions;
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Map;
+import java.util.function.Function;
+import org.apache.gravitino.catalog.hadoop.auth.KerberosAuthUtils;
+import org.apache.gravitino.catalog.hadoop.auth.KerberosClient;
+import org.apache.gravitino.iceberg.common.authentication.AuthenticationConfig;
+import org.apache.gravitino.iceberg.common.authentication.SupportsKerberos;
+import
org.apache.gravitino.iceberg.common.authentication.kerberos.KerberosConfig;
+import org.apache.gravitino.utils.PrincipalUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.iceberg.io.FileIO;
+import org.apache.iceberg.jdbc.JdbcCatalog;
+import org.apache.iceberg.jdbc.JdbcClientPool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * ClosableJdbcCatalog is a wrapper class to wrap Iceberg JdbcCatalog to do
some clean-up work like
+ * closing resources and supporting Kerberos authentication for HDFS access.
+ */
+public class ClosableJdbcCatalog extends JdbcCatalog implements Closeable,
SupportsKerberos {
+
+ private static final Logger LOGGER =
LoggerFactory.getLogger(ClosableJdbcCatalog.class);
+
+ private KerberosClient kerberosClient;
+
+ private Configuration hadoopConf;
+
+ public ClosableJdbcCatalog() {
+ super();
+ }
+
+ public ClosableJdbcCatalog(
+ Function<Map<String, String>, FileIO> ioBuilder,
+ Function<Map<String, String>, JdbcClientPool> clientPoolBuilder,
+ boolean initializeCatalogTables) {
+ super(ioBuilder, clientPoolBuilder, initializeCatalogTables);
+ }
+
+ /**
+ * Initialize the ClosableJdbcCatalog with the given input name and
properties.
+ *
+ * <p>Note: This method can only be called once as it will create new client
pools.
+ *
+ * @param inputName name of the catalog
+ * @param properties properties for the catalog
+ */
+ @Override
+ public void initialize(String inputName, Map<String, String> properties) {
+ super.initialize(inputName, properties);
+
+ AuthenticationConfig authenticationConfig = new
AuthenticationConfig(properties);
+ if (authenticationConfig.isKerberosAuth()) {
+ this.kerberosClient = initKerberosClient();
+ }
+ }
+
+ /** Returns the Hadoop configuration used for Kerberos login and HDFS
access. */
+ public Configuration getHadoopConf() {
+ return hadoopConf;
+ }
+
+ /** Sets the Hadoop configuration used for Kerberos login and HDFS access. */
+ public void setHadoopConf(Configuration hadoopConf) {
+ this.hadoopConf = hadoopConf;
+ }
+
+ @Override
+ public void close() {
+ if (kerberosClient != null) {
+ try {
+ kerberosClient.close();
+ } catch (Exception e) {
+ LOGGER.warn("Failed to close KerberosClient", e);
+ }
+ }
+ try {
+ super.close();
+ } catch (Exception e) {
+ LOGGER.warn("Failed to close JdbcCatalog", e);
+ }
+ }
+
+ @Override
+ public <R> R doKerberosOperations(Executable<R> executable) throws Throwable
{
+ Map<String, String> properties = this.properties();
+ AuthenticationConfig authenticationConfig = new
AuthenticationConfig(properties);
+
+ final String finalPrincipalName;
+ String proxyKerberosPrincipalName =
PrincipalUtils.getCurrentPrincipal().getName();
+
+ if (!proxyKerberosPrincipalName.contains("@")) {
+ finalPrincipalName =
+ String.format("%s@%s", proxyKerberosPrincipalName,
kerberosClient.getRealm());
+ } else {
+ finalPrincipalName = proxyKerberosPrincipalName;
+ }
+
+ UserGroupInformation realUser =
+ authenticationConfig.isImpersonationEnabled()
+ ? UserGroupInformation.createProxyUser(
+ finalPrincipalName, kerberosClient.getLoginUser())
+ : kerberosClient.getLoginUser();
+
+ return realUser.doAs(
+ (PrivilegedExceptionAction<R>)
+ () -> {
+ try {
+ return executable.execute();
+ } catch (Throwable e) {
+ if (RuntimeException.class.isAssignableFrom(e.getClass())) {
+ throw (RuntimeException) e;
+ }
+ throw new RuntimeException("Failed to invoke method", e);
+ }
+ });
+ }
+
+ private KerberosClient initKerberosClient() {
+ try {
+ Configuration conf =
+ Preconditions.checkNotNull(
+ hadoopConf, "Hadoop configuration must be set before Kerberos
initialization");
+ KerberosConfig kerberosConfig = new KerberosConfig(this.properties());
+ KerberosClient client =
+ KerberosClient.builder(kerberosConfig.getPrincipalName(), conf)
+ .loginMode(KerberosAuthUtils.LoginMode.CURRENT_USER)
+ .checkIntervalSec(kerberosConfig.getCheckIntervalSec())
+ .build();
+ // catalog_uuid always exists for Gravitino managed catalogs, `0` is
just a fallback value.
+ String catalogUUID = properties().getOrDefault("catalog_uuid", "0");
Review Comment:
Pre-existing issue that this PR doubles the surface of: in the standalone
REST server `catalog_uuid` is never set, so every Kerberos catalog (Hive or
JDBC) falls back to `"0"` and shares the same keytab path, and
`saveKeytabFromUri` deletes-then-rewrites it — two catalogs with different
keytabs would clobber each other. Worth a follow-up issue (e.g. fall back to
catalog name instead of `"0"`).
##########
iceberg/iceberg-common/src/test/java/org/apache/gravitino/iceberg/common/TestClosableJdbcCatalog.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.iceberg.common;
+
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.gravitino.catalog.lakehouse.iceberg.IcebergConstants;
+import org.apache.gravitino.iceberg.common.authentication.AuthenticationConfig;
+import
org.apache.gravitino.iceberg.common.authentication.kerberos.KerberosConfig;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hdfs.HdfsConfiguration;
+import org.apache.iceberg.CatalogProperties;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+public class TestClosableJdbcCatalog {
+
+ @TempDir private Path warehouse;
+
+ @Test
+ void testSimpleAuthInitializeWithoutKerberos() {
+ ClosableJdbcCatalog catalog = new ClosableJdbcCatalog();
+ Configuration conf = new HdfsConfiguration();
+ catalog.setHadoopConf(conf);
+ catalog.initialize("test", newJdbcCatalogProperties());
+
+ Assertions.assertDoesNotThrow(catalog::close);
+ }
+
+ @Test
+ void testKerberosInitializeRequiresHadoopConf() {
+ ClosableJdbcCatalog catalog = new ClosableJdbcCatalog();
+ Map<String, String> properties = newJdbcCatalogProperties();
+ properties.put(AuthenticationConfig.AUTH_TYPE_KEY, "kerberos");
+ properties.put(KerberosConfig.PRINCIPAL_KEY, "cli@HADOOPKRB");
+ properties.put(KerberosConfig.KET_TAB_URI_KEY, "/tmp/missing.keytab");
+
Review Comment:
Nit: asserting an NPE from `Preconditions.checkNotNull` treats a
misconfiguration as a programming error; `checkState`/`IllegalStateException`
would be a friendlier signal. (Becomes moot if the `setConf` override
suggestion in `IcebergCatalogUtil` is adopted.)
##########
conf/gravitino-iceberg-rest-server.conf.template:
##########
@@ -63,3 +63,33 @@ gravitino.iceberg-rest.warehouse = /tmp
# gravitino.iceberg-rest.s3-secret-access-key = xxx
# gravitino.iceberg-rest.s3-endpoint = http://192.168.215.4:9010
# gravitino.iceberg-rest.s3-region = xxx
+
+# THE CONFIGURATION EXAMPLE FOR JDBC CATALOG BACKEND WITH KERBEROS-SECURED
HDFS WAREHOUSE
+# JDBC username/password authenticates the metadata store; Kerberos
authenticates HDFS access.
+
+# gravitino.iceberg-rest.catalog-backend = jdbc
+# gravitino.iceberg-rest.jdbc-driver = org.postgresql.Driver
+# gravitino.iceberg-rest.uri = jdbc:postgresql://127.0.0.1:5432/iceberg
+# gravitino.iceberg-rest.jdbc-user = iceberg
+# gravitino.iceberg-rest.jdbc-password = secret
+# gravitino.iceberg-rest.jdbc-initialize = true
+# gravitino.iceberg-rest.warehouse =
hdfs://127.0.0.1:9000/user/hive/warehouse-jdbc
+# gravitino.iceberg-rest.authentication.type = kerberos
+# gravitino.iceberg-rest.authentication.kerberos.principal =
[email protected]
+# gravitino.iceberg-rest.authentication.kerberos.keytab-uri =
file:///etc/security/keytabs/iceberg.keytab
+# gravitino.iceberg-rest.hadoop.security.authentication = kerberos
+# gravitino.iceberg-rest.dfs.namenode.kerberos.principal =
hdfs/[email protected]
+
+# THE CONFIGURATION EXAMPLE FOR HIVE CATALOG BACKEND WITH KERBEROS
Review Comment:
The Hive-with-Kerberos example block is beyond this PR's scope (JDBC
backend) and overlaps with the doc examples — consider trimming it, or keeping
only the JDBC block here.
##########
iceberg/iceberg-common/src/test/java/org/apache/gravitino/iceberg/common/utils/TestIcebergCatalogUtil.java:
##########
@@ -80,6 +81,7 @@ void testLoadCatalog() {
catalog =
IcebergCatalogUtil.loadCatalogBackend(
IcebergCatalogBackend.JDBC, new IcebergConfig(properties));
+ Assertions.assertInstanceOf(ClosableJdbcCatalog.class, catalog);
Assertions.assertTrue(catalog instanceof JdbcCatalog);
Review Comment:
Nit: this `assertTrue(catalog instanceof JdbcCatalog)` is now redundant
given the `assertInstanceOf(ClosableJdbcCatalog.class, catalog)` above — one of
the two can go.
##########
iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRestKerberosJdbcCatalogIT.java:
##########
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.gravitino.iceberg.integration.test;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.apache.commons.io.FileUtils;
+import org.apache.gravitino.catalog.lakehouse.iceberg.IcebergCatalogBackend;
+import org.apache.gravitino.catalog.lakehouse.iceberg.IcebergConstants;
+import org.apache.gravitino.iceberg.common.IcebergConfig;
+import org.apache.gravitino.integration.test.container.ContainerSuite;
+import org.apache.gravitino.integration.test.container.HiveContainer;
+import org.apache.gravitino.integration.test.util.GravitinoITUtils;
+import org.apache.gravitino.integration.test.util.ITUtils;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.TestInstance.Lifecycle;
+import org.junit.jupiter.api.condition.EnabledIf;
+
+@Tag("gravitino-docker-test")
+@TestInstance(Lifecycle.PER_CLASS)
+@EnabledIf("isEmbedded")
+public class IcebergRestKerberosJdbcCatalogIT extends IcebergRESTServiceIT {
+
+ private static final ContainerSuite containerSuite =
ContainerSuite.getInstance();
+
+ private static final String HDFS_CLIENT_PRINCIPAL = "cli@HADOOPKRB";
+ private static final String HDFS_CLIENT_KEYTAB = "/client.keytab";
+
+ private static String tempDir;
+
+ public IcebergRestKerberosJdbcCatalogIT() {
+ catalogType = IcebergCatalogBackend.JDBC;
+ }
+
+ @Override
+ void initEnv() {
Review Comment:
`initEnv`/`refreshKerberosConfig`/`resetDefaultRealm` and the krb5.conf
rewriting duplicate `IcebergRestKerberosHiveCatalogIT`. A shared base class (or
static util) would let the two ITs differ only in `getCatalogConfig()` — fine
as a follow-up too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]