Skip to content
Draft
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 @@ -24,8 +24,8 @@
import org.apache.hc.client5.http.auth.AuthScope;
import org.apache.hc.client5.http.auth.Credentials;
import org.apache.hc.client5.http.auth.CredentialsProvider;
import org.apache.hc.client5.http.auth.KerberosConfig;
import org.apache.hc.client5.http.auth.KerberosCredentials;
import org.apache.hc.client5.http.auth.MutualKerberosConfig;
import org.apache.hc.client5.http.auth.StandardAuthScheme;
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
import org.apache.hc.client5.http.classic.methods.HttpPost;
Expand All @@ -34,7 +34,7 @@
import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider;
import org.apache.hc.client5.http.impl.auth.BasicSchemeFactory;
import org.apache.hc.client5.http.impl.auth.DigestSchemeFactory;
import org.apache.hc.client5.http.impl.auth.SPNegoSchemeFactory;
import org.apache.hc.client5.http.impl.auth.MutualSpnegoSchemeFactory;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
Expand Down Expand Up @@ -77,8 +77,8 @@ public class AvaticaCommonsHttpClientImpl implements AvaticaHttpClient, HttpClie
private static final boolean USE_CANONICAL_HOSTNAME = Boolean
.parseBoolean(System.getProperty("avatica.http.spnego.use_canonical_hostname", "true"));
private static final boolean STRIP_PORT_ON_SERVER_LOOKUP = true;
private static final KerberosConfig KERBEROS_CONFIG =
KerberosConfig.custom().setStripPort(STRIP_PORT_ON_SERVER_LOOKUP)
private static final MutualKerberosConfig KERBEROS_CONFIG =
MutualKerberosConfig.custom().setStripPort(STRIP_PORT_ON_SERVER_LOOKUP)
.setUseCanonicalHostname(USE_CANONICAL_HOSTNAME)
.build();
private static AuthScope anyAuthScope = new AuthScope(null, -1);
Expand Down Expand Up @@ -219,7 +219,7 @@ CloseableHttpResponse execute(HttpPost post, HttpClientContext context)

this.authRegistry = RegistryBuilder.<AuthSchemeFactory>create()
.register(StandardAuthScheme.SPNEGO,
new SPNegoSchemeFactory(KERBEROS_CONFIG, SystemDefaultDnsResolver.INSTANCE))
new MutualSpnegoSchemeFactory(KERBEROS_CONFIG, SystemDefaultDnsResolver.INSTANCE))
.build();

this.credentialsProvider = new BasicCredentialsProvider();
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ guava.version=32.1.1-jre
hamcrest.version=1.3
hsqldb.version=2.4.1
h2.version=1.4.197
httpclient5.version=5.4.1
httpcore5.version=5.3.1
httpclient5.version=5.5-alpha1-SNAPSHOT
httpcore5.version=5.3.2
jackson.version=2.15.4
jcip-annotations.version=1.0-1
jcommander.version=1.72
Expand Down
Loading