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
FieldsModifier and TypeFieldDescriptionprivate static URLstatic final HBaseClassTestRuleprivate static final Stringprivate static Fileprivate static Fileprivate static org.apache.kerby.kerberos.kerb.server.SimpleKdcServerprivate static final Stringprivate static final org.slf4j.Loggerprivate static org.apache.hadoop.hbase.http.HttpServerFields inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
TEST_BUILD_WEBAPPS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.conf.ConfigurationbuildSpnegoConfiguration(org.apache.hadoop.conf.Configuration conf, String serverPrincipal, File serverKeytab) static voidprivate static voidstatic voidvoidvoidvoidMethods 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
-