public class TestSecureRESTServer extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
TestSecureRESTServer.EmptyCredentials |
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 MiniHBaseCluster |
CLUSTER |
private static String |
HOSTNAME |
private static org.apache.hadoop.minikdc.MiniKdc |
KDC |
private static org.slf4j.Logger |
LOG |
private static String |
REST_SERVER_PRINCIPAL |
private static HBaseRESTTestingUtility |
REST_TEST |
private static File |
restServerKeytab |
private static org.apache.hadoop.hbase.rest.RESTServer |
server |
private static String |
SERVICE_PRINCIPAL |
private static File |
serviceKeytab |
private static String |
SPNEGO_SERVICE_PRINCIPAL |
private static HBaseTestingUtility |
TEST_UTIL |
private static String |
WHEEL_PRINCIPAL |
private static File |
wheelKeytab |
Constructor and Description |
---|
TestSecureRESTServer() |
Modifier and Type | Method and Description |
---|---|
private org.apache.hadoop.hbase.util.Pair<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.client.protocol.HttpClientContext> |
getClient() |
private static void |
instertData() |
private static void |
setHdfsSecuredConfiguration(org.apache.hadoop.conf.Configuration conf) |
static void |
setupServer() |
static void |
stopServer() |
void |
testDoas() |
void |
testDoAs() |
void |
testNegativeAuthorization() |
void |
testPositiveAuthorization() |
void |
testProxy(String extraArgs,
String PRINCIPAL,
File keytab,
int responseCode) |
void |
testWithoutDoAs() |
private static void |
updateKerberosConfiguration(org.apache.hadoop.conf.Configuration conf,
String serverPrincipal,
String spnegoPrincipal,
File serverKeytab) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private static final HBaseRESTTestingUtility REST_TEST
private static MiniHBaseCluster CLUSTER
private static final String HOSTNAME
private static final String CLIENT_PRINCIPAL
private static final String WHEEL_PRINCIPAL
private static final String SPNEGO_SERVICE_PRINCIPAL
private static final String REST_SERVER_PRINCIPAL
private static final String SERVICE_PRINCIPAL
private static org.apache.hadoop.minikdc.MiniKdc KDC
private static org.apache.hadoop.hbase.rest.RESTServer server
private static File restServerKeytab
private static File clientKeytab
private static File wheelKeytab
private static File serviceKeytab
public TestSecureRESTServer()
public static void setupServer() throws Exception
Exception
public static void stopServer() throws Exception
Exception
private static void setHdfsSecuredConfiguration(org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
private static void updateKerberosConfiguration(org.apache.hadoop.conf.Configuration conf, String serverPrincipal, String spnegoPrincipal, File serverKeytab)
private static void instertData() throws IOException, InterruptedException
IOException
InterruptedException
public void testProxy(String extraArgs, String PRINCIPAL, File keytab, int responseCode) throws Exception
Exception
public void testPositiveAuthorization() throws Exception
Exception
public void testWithoutDoAs() throws Exception
Exception
public void testNegativeAuthorization() throws Exception
Exception
private org.apache.hadoop.hbase.util.Pair<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.client.protocol.HttpClientContext> getClient()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.