Package org.apache.hadoop.hbase.security
Class TestMutualTlsClientSideNonLocalhost
java.lang.Object
org.apache.hadoop.hbase.security.TestMutualTlsClientSideNonLocalhost
@Tag("org.apache.hadoop.hbase.testclassification.RPCTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestMutualTlsClientSideNonLocalhost
extends Object
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 TypeFieldDescriptionprivate static Fileprivate static X509TestContextProviderprivate org.apache.hadoop.hbase.ipc.RpcClientprivate org.apache.hadoop.hbase.ipc.RpcServerprivate org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterfaceprivate booleanprivate static HBaseCommonTestingUtilprivate X509TestContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanUp()private voidinitialize(org.apache.hadoop.conf.Configuration serverConf, org.apache.hadoop.conf.Configuration clientConf) static Stream<org.junit.jupiter.params.provider.Arguments>voidsetUp()static voidvoidtearDown()void
-
Field Details
-
UTIL
-
DIR
-
PROVIDER
-
x509TestContext
-
rpcServer
-
rpcClient
-
stub
private org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface stub -
supportPlaintext
-
-
Constructor Details
-
TestMutualTlsClientSideNonLocalhost
-
-
Method Details
-
parameters
-
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
-