Package org.apache.hadoop.hbase.thrift
Class TestThriftSpnegoHttpFallbackServer
java.lang.Object
org.apache.hadoop.hbase.thrift.TestThriftHttpServerBase
org.apache.hadoop.hbase.thrift.TestThriftSpnegoHttpFallbackServer
@Tag("org.apache.hadoop.hbase.testclassification.ClientTests") @Tag("org.apache.hadoop.hbase.testclassification.LargeTests")
public class TestThriftSpnegoHttpFallbackServer
extends TestThriftHttpServerBase
Start the HBase Thrift HTTP server on a random port through the command-line interface and talk
to it from client side with SPNEGO security enabled. Supplemental test to
TestThriftSpnegoHttpServer which falls back to the original Kerberos principal and keytab
configuration properties, not the separate SPNEGO-specific properties.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Fileprivate static Stringprivate static org.apache.kerby.kerberos.kerb.server.SimpleKdcServerprivate static final org.slf4j.Loggerprivate static Fileprivate static Stringprivate static StringFields inherited from class org.apache.hadoop.hbase.thrift.TestThriftHttpServerBase
tableCreated, TEST_UTIL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddSecurityConfigurations(org.apache.hadoop.conf.Configuration conf) static voidafterAll()static voidprivate org.apache.http.impl.client.CloseableHttpClientprotected Supplier<org.apache.hadoop.hbase.thrift.ThriftServer>protected voidtalkToThriftServer(String url, int customHeaderSize) voidBlock call through to this method.Methods inherited from class org.apache.hadoop.hbase.thrift.TestThriftHttpServerBase
runThriftServer, setUpBeforeClass, tearDownAfterClass, testExceptionThrownWhenMisConfigured, testRunThriftServer
-
Field Details
-
LOG
-
kdc
-
serverKeytab
-
clientKeytab
-
clientPrincipal
-
serverPrincipal
-
spnegoServerPrincipal
-
-
Constructor Details
-
TestThriftSpnegoHttpFallbackServer
public TestThriftSpnegoHttpFallbackServer()
-
-
Method Details
-
addSecurityConfigurations
-
beforeAll
- Throws:
Exception
-
afterAll
- Throws:
Exception
-
talkToThriftServer
- Overrides:
talkToThriftServerin classTestThriftHttpServerBase- Throws:
Exception
-
createHttpClient
- Throws:
Exception
-
getThriftServerSupplier
- Overrides:
getThriftServerSupplierin classTestThriftHttpServerBase
-
testRunThriftServerWithHeaderBufferLength
Block call through to this method. It is a messy test that fails because of bad config and then succeeds only the first attempt adds a table which the second attempt doesn't want to be in place to succeed. Let the super impl of this test be responsible for verifying we fail if bad header size.- Overrides:
testRunThriftServerWithHeaderBufferLengthin classTestThriftHttpServerBase- Throws:
Exception
-