Skip to content

Commit

Permalink
Lower KRB ticket lifetime in EnvMultinodeTlsKerberosDelegation
Browse files Browse the repository at this point in the history
In 36b7553 the HadoopKerberos
environment's ticket lifetime was lowered to be able to test Keberos
constrained delegation support in the JDBC driver. The HadoopKerberos
environment is a base environment and multiple environments inherit from
it. Changing the Kerberos config should be done in dedicated
environments to make sure we don't indicentally affect other envs or
tests which depend on HadoopKerberos environment.
  • Loading branch information
hashhar committed Sep 13, 2023
1 parent b0fe9a6 commit 77e5bd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public void extendEnvironment(Environment.Builder builder)
});
builder.configureContainer(TESTS, container -> {
container.setDockerImageName(dockerImageName);
container.withCopyFileToContainer(forHostPath(configDir.getPath("krb5_client.conf")), "/etc/krb5.conf");
});
configureTempto(builder, configDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import static com.google.common.base.Verify.verify;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.configureTempto;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.worker;
import static io.trino.tests.product.launcher.env.common.Hadoop.CONTAINER_TRINO_HIVE_PROPERTIES;
Expand Down Expand Up @@ -87,6 +88,10 @@ public void extendEnvironment(Environment.Builder builder)
builder.addConnector("iceberg", forHostPath(dockerFiles.getDockerFilesHostPath("conf/environment/multinode-tls-kerberos/iceberg.properties")), CONTAINER_TRINO_ICEBERG_PROPERTIES);

builder.addContainers(createTrinoWorker(worker(1)), createTrinoWorker(worker(2)));
builder.configureContainer(TESTS, container -> {
// Configures a low ticket lifetime to ensure tickets get expired during tests
container.withCopyFileToContainer(forHostPath(configDir.getPath("krb5_client.conf")), "/etc/krb5.conf");
});
configureTempto(builder, configDir);
}

Expand Down

0 comments on commit 77e5bd2

Please sign in to comment.