Package org.apache.hadoop.hbase.http
Class TestSpnegoHttpServer
java.lang.Object
org.apache.hadoop.hbase.http.HttpServerFunctionalTest
org.apache.hadoop.hbase.http.TestSpnegoHttpServer
Test class for SPNEGO authentication on the HttpServer. Uses Kerby's MiniKDC and Apache
HttpComponents to verify that a simple Servlet is reachable via SPNEGO and unreachable w/o.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static URL
static final HBaseClassTestRule
private static final String
private static File
private static File
private static org.apache.kerby.kerberos.kerb.server.SimpleKdcServer
private static final String
private static final org.slf4j.Logger
private static org.apache.hadoop.hbase.http.HttpServer
Fields inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
TEST_BUILD_WEBAPPS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.conf.Configuration
buildSpnegoConfiguration
(org.apache.hadoop.conf.Configuration conf, String serverPrincipal, File serverKeytab) static void
private static void
static void
void
void
void
Methods inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
access, createAndStartTestServer, createServer, createServer, createServer, createServer, createServer, createTestServer, createTestServer, createTestServer, createTestServer, createTestServerWithSecurity, createTestServerWithSecurityAndAcl, deleteRecursively, getFreePort, getServerURL, prepareTestWebapp, readOutput, stop
-
Field Details
-
CLASS_RULE
-
LOG
-
KDC_SERVER_HOST
- See Also:
-
CLIENT_PRINCIPAL
- See Also:
-
server
-
baseUrl
-
kdc
-
infoServerKeytab
-
clientKeytab
-
-
Constructor Details
-
TestSpnegoHttpServer
public TestSpnegoHttpServer()
-
-
Method Details
-
setupServer
- Throws:
Exception
-
stopServer
- Throws:
Exception
-
setupUser
private static void setupUser(org.apache.kerby.kerberos.kerb.server.SimpleKdcServer kdc, File keytab, String principal) throws org.apache.kerby.kerberos.kerb.KrbException - Throws:
org.apache.kerby.kerberos.kerb.KrbException
-
buildSpnegoConfiguration
private static org.apache.hadoop.conf.Configuration buildSpnegoConfiguration(org.apache.hadoop.conf.Configuration conf, String serverPrincipal, File serverKeytab) -
testUnauthorizedClientsDisallowed
- Throws:
IOException
-
testAllowedClient
- Throws:
Exception
-
testMissingConfigurationThrowsException
- Throws:
Exception
-