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
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprotected static Fileprotected static X509TestContextProviderprotected org.apache.hadoop.hbase.ipc.RpcClientprotected org.apache.hadoop.hbase.ipc.RpcServerprivate org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterfacebooleanprotected static HBaseCommonTestingUtilprivate X509TestContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanUp()data()private voidinitialize(org.apache.hadoop.conf.Configuration serverConf, org.apache.hadoop.conf.Configuration clientConf) voidsetUp()static voidvoidtearDown()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:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
tearDown
- Throws:
IOException
-
testClientAuth
- Throws:
Exception
-