Package org.apache.hadoop.hbase.security
Class TestMutualTlsClientSideNonLocalhost
java.lang.Object
org.apache.hadoop.hbase.security.TestMutualTlsClientSideNonLocalhost
Tests for client-side mTLS focusing on client hostname verification in the case when client and
server are on different hosts. We try to simulate this behaviour by querying the hostname with
InetAddress.getLocalHost()
Certificates are generated with the hostname in Subject Alternative Names, server binds non-localhost interface and client connects via remote IP address. Parameter is set to verify both TLS/plaintext and TLS-only cases.-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
protected static File
protected static X509TestContextProvider
protected org.apache.hadoop.hbase.ipc.RpcClient
protected org.apache.hadoop.hbase.ipc.RpcServer
private org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface
boolean
protected static HBaseCommonTestingUtil
private X509TestContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanUp()
data()
private void
initialize
(org.apache.hadoop.conf.Configuration serverConf, org.apache.hadoop.conf.Configuration clientConf) void
setUp()
static void
void
tearDown()
void
-
Field Details
-
CLASS_RULE
-
UTIL
-
DIR
-
PROVIDER
-
x509TestContext
-
rpcServer
-
rpcClient
-
stub
private org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface stub -
supportPlaintext
-
-
Constructor Details
-
TestMutualTlsClientSideNonLocalhost
public TestMutualTlsClientSideNonLocalhost()
-
-
Method Details
-
data
-
setUpBeforeClass
- Throws:
IOException
-
cleanUp
-
setUp
- Throws:
Exception
-
initialize
private void initialize(org.apache.hadoop.conf.Configuration serverConf, org.apache.hadoop.conf.Configuration clientConf) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityException
IOException
org.bouncycastle.operator.OperatorCreationException
-
tearDown
- Throws:
IOException
-
testClientAuth
- Throws:
Exception
-