|
38 | 38 | import org.apache.hadoop.fs.CommonConfigurationKeys;
|
39 | 39 | import org.apache.hadoop.hive.conf.HiveConf;
|
40 | 40 | import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
|
41 |
| -import org.apache.hadoop.security.SecurityUtil; |
42 | 41 | import org.apache.hadoop.security.UserGroupInformation;
|
43 |
| -import org.apache.hadoop.security.authentication.server.AuthenticationFilter; |
44 | 42 | import org.apache.hadoop.security.authorize.AccessControlList;
|
45 | 43 | import org.apache.hadoop.hive.common.classification.InterfaceAudience;
|
46 | 44 | import org.apache.logging.log4j.LogManager;
|
|
61 | 59 | import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
62 | 60 | import org.eclipse.jetty.server.ServerConnector;
|
63 | 61 | import org.eclipse.jetty.servlet.DefaultServlet;
|
64 |
| -import org.eclipse.jetty.servlet.FilterHolder; |
65 |
| -import org.eclipse.jetty.servlet.FilterMapping; |
66 | 62 | import org.eclipse.jetty.servlet.ServletContextHandler;
|
67 |
| -import org.eclipse.jetty.servlet.ServletHandler; |
68 | 63 | import org.eclipse.jetty.servlet.ServletHolder;
|
69 | 64 | import org.eclipse.jetty.util.ssl.SslContextFactory;
|
70 | 65 | import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
@@ -315,24 +310,6 @@ WebAppContext createWebAppContext(Builder b) {
|
315 | 310 | return ctx;
|
316 | 311 | }
|
317 | 312 |
|
318 |
| - /** |
319 |
| - * Secure the web server with kerberos (AuthenticationFilter). |
320 |
| - */ |
321 |
| - void setupSpnegoFilter(Builder b) throws IOException { |
322 |
| - Map<String, String> params = new HashMap<String, String>(); |
323 |
| - params.put("kerberos.principal", |
324 |
| - SecurityUtil.getServerPrincipal(b.spnegoPrincipal, b.host)); |
325 |
| - params.put("kerberos.keytab", b.spnegoKeytab); |
326 |
| - params.put(AuthenticationFilter.AUTH_TYPE, "kerberos"); |
327 |
| - FilterHolder holder = new FilterHolder(); |
328 |
| - holder.setClassName(AuthenticationFilter.class.getName()); |
329 |
| - holder.setInitParameters(params); |
330 |
| - |
331 |
| - ServletHandler handler = webAppContext.getServletHandler(); |
332 |
| - handler.addFilterWithMapping( |
333 |
| - holder, "/*", FilterMapping.ALL); |
334 |
| - } |
335 |
| - |
336 | 313 | /**
|
337 | 314 | * Create a channel connector for "http/https" requests
|
338 | 315 | */
|
@@ -386,11 +363,6 @@ private void createWebServer(final Builder b) throws IOException {
|
386 | 363 | this.appDir = getWebAppsPath(b.name);
|
387 | 364 | this.webAppContext = createWebAppContext(b);
|
388 | 365 |
|
389 |
| - if (b.useSPNEGO) { |
390 |
| - // Secure the web server with kerberos |
391 |
| - setupSpnegoFilter(b); |
392 |
| - } |
393 |
| - |
394 | 366 | initializeWebServer(b, threadPool.getMaxThreads());
|
395 | 367 | }
|
396 | 368 |
|
|
0 commit comments