Score:0

How to do SSL termination on load balancer for HiveServer2?

us flag

I've currently set up a classic AWS loadbalancer with an SSL listener and a public certificate issued through AWS certificate manager, e.g. query.mydomain. This redirects to a HiveServer2/Thrift instance.

I'm connecting to the public endpoint using beeline like this:

beeline -u "jdbc:hive2://query.mydomain:10100/default;ssl=true" -n <username> -p <password> --verbose=true -d org.apache.hive.jdbc.HiveDriver

For some reason, the client complains about the hostname of the load balancer instance not being present in the certificate.

dig +short query.mydomain @resolver1.opendns.com                 

13.54.30.146
13.54.75.233
3.106.25.71
Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching ec2-13-54-30-146.ap-southeast-2.compute.amazonaws.com found.
    at java.base/sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:212)
    at java.base/sun.security.util.HostnameChecker.match(HostnameChecker.java:103)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:452)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:412)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:238)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
    at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:638)
    ... 46 more

Why is it expecting the loadbalancer instance hostname to be in the certificate? Am I doing something wrong?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.