public class TestSpnegoHttpServer extends HttpServerFunctionalTest
Modifier and Type | Field and Description |
---|---|
private static URL |
baseUrl |
static HBaseClassTestRule |
CLASS_RULE |
private static String |
CLIENT_PRINCIPAL |
private static File |
clientKeytab |
private static File |
infoServerKeytab |
private static org.apache.kerby.kerberos.kerb.server.SimpleKdcServer |
kdc |
private static String |
KDC_SERVER_HOST |
private static org.slf4j.Logger |
LOG |
private static org.apache.hadoop.hbase.http.HttpServer |
server |
TEST_BUILD_WEBAPPS
Constructor and Description |
---|
TestSpnegoHttpServer() |
Modifier and Type | Method and Description |
---|---|
private static org.apache.hadoop.conf.Configuration |
buildSpnegoConfiguration(org.apache.hadoop.conf.Configuration conf,
String serverPrincipal,
File serverKeytab) |
static void |
setupServer() |
private static void |
setupUser(org.apache.kerby.kerberos.kerb.server.SimpleKdcServer kdc,
File keytab,
String principal) |
static void |
stopServer() |
void |
testAllowedClient() |
void |
testMissingConfigurationThrowsException() |
void |
testUnauthorizedClientsDisallowed() |
access, createAndStartTestServer, createServer, createServer, createServer, createServer, createServer, createTestServer, createTestServer, createTestServer, createTestServer, createTestServerWithSecurity, createTestServerWithSecurityAndAcl, deleteRecursively, getFreePort, getServerURL, prepareTestWebapp, readOutput, stop
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final String KDC_SERVER_HOST
private static final String CLIENT_PRINCIPAL
private static org.apache.hadoop.hbase.http.HttpServer server
private static org.apache.kerby.kerberos.kerb.server.SimpleKdcServer kdc
private static File infoServerKeytab
private static File clientKeytab
public TestSpnegoHttpServer()
public static void setupServer() throws Exception
Exception
public static void stopServer() throws Exception
Exception
private static void setupUser(org.apache.kerby.kerberos.kerb.server.SimpleKdcServer kdc, File keytab, String principal) throws org.apache.kerby.kerberos.kerb.KrbException
org.apache.kerby.kerberos.kerb.KrbException
private static org.apache.hadoop.conf.Configuration buildSpnegoConfiguration(org.apache.hadoop.conf.Configuration conf, String serverPrincipal, File serverKeytab)
public void testUnauthorizedClientsDisallowed() throws IOException
IOException
public void testAllowedClient() throws Exception
Exception
public void testMissingConfigurationThrowsException() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.