public class TestProxyUserSpnegoHttpServer extends HttpServerFunctionalTest
Modifier and Type | Field and Description |
---|---|
private static URL |
baseUrl |
static HBaseClassTestRule |
CLASS_RULE |
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 String |
PRIVILEGED_PRINCIPAL |
private static String |
PRIVILEGED2_PRINCIPAL |
private static File |
privileged2Keytab |
private static File |
privilegedKeytab |
private static org.apache.hadoop.hbase.http.HttpServer |
server |
private static String |
UNPRIVILEGED_PRINCIPAL |
private static File |
unprivilegedKeytab |
private static String |
WHEEL_PRINCIPAL |
private static File |
wheelKeytab |
TEST_BUILD_WEBAPPS
Constructor and Description |
---|
TestProxyUserSpnegoHttpServer() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.security.authorize.AccessControlList |
buildAdminAcl(org.apache.hadoop.conf.Configuration conf)
Builds an ACL that will restrict the users who can issue commands to endpoints on the UI which
are meant only for administrators.
|
protected 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 |
testProxy(String clientPrincipal,
String doAs,
int responseCode,
String statusLine) |
void |
testProxyAllowed() |
void |
testProxyDisallowedForNotSudoAble() |
void |
testProxyDisallowedForUnprivileged() |
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 WHEEL_PRINCIPAL
private static final String UNPRIVILEGED_PRINCIPAL
private static final String PRIVILEGED_PRINCIPAL
private static final String PRIVILEGED2_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 wheelKeytab
private static File unprivilegedKeytab
private static File privilegedKeytab
private static File privileged2Keytab
public TestProxyUserSpnegoHttpServer()
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
protected static org.apache.hadoop.conf.Configuration buildSpnegoConfiguration(org.apache.hadoop.conf.Configuration conf, String serverPrincipal, File serverKeytab)
public static org.apache.hadoop.security.authorize.AccessControlList buildAdminAcl(org.apache.hadoop.conf.Configuration conf)
public void testProxyAllowed() throws Exception
Exception
public void testProxyDisallowedForUnprivileged() throws Exception
Exception
public void testProxyDisallowedForNotSudoAble() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.