Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LDAP with anonymous bind disabled #97

Merged
merged 2 commits into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public LdapAuthenticator(LdapConfig serverConfig)
.put(INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory")
.put(PROVIDER_URL, ldapUrl)
.build();
checkEnvironment(environment);
this.basicEnvironment = environment;
this.authenticationCache = CacheBuilder.newBuilder()
.expireAfterWrite(serverConfig.getLdapCacheTtl().toMillis(), MILLISECONDS)
Expand Down Expand Up @@ -175,16 +174,6 @@ private static String replaceUser(String pattern, String user)
return pattern.replaceAll("\\$\\{USER}", user);
}

private static void checkEnvironment(Map<String, String> environment)
{
try {
closeContext(createDirContext(environment));
}
catch (NamingException e) {
throw new RuntimeException(e);
}
}

private static void closeContext(DirContext context)
{
try {
Expand Down
2 changes: 1 addition & 1 deletion presto-product-tests/conf/docker/common/compose-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function export_canonical_path() {

source "${BASH_SOURCE%/*}/../../../bin/locations.sh"

export DOCKER_IMAGES_VERSION=${DOCKER_IMAGES_VERSION:-10}
export DOCKER_IMAGES_VERSION=${DOCKER_IMAGES_VERSION:-11}
export HADOOP_BASE_IMAGE=${HADOOP_BASE_IMAGE:-"prestodb/hdp2.6-hive"}

# The following variables are defined to enable running product tests with arbitrary/downloaded jars
Expand Down