Add overlord unsecured paths to coordinator when using combined service (#5579)

* Add overlord unsecured paths to coordinator when using combined service

* PR comment
This commit is contained in:
Jonathan Wei 2018-04-05 14:16:06 -07:00 committed by GitHub
parent 7239f56131
commit 818091ec60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,6 @@ package io.druid.cli;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.inject.Binder;
import com.google.inject.Injector;
import com.google.inject.Key;
@ -118,7 +117,7 @@ public class CliOverlord extends ServerRunnable
{
private static Logger log = new Logger(CliOverlord.class);
private static List<String> UNSECURED_PATHS = Lists.newArrayList(
protected static List<String> UNSECURED_PATHS = ImmutableList.of(
"/",
"/console.html",
"/old-console/*",

View File

@ -118,6 +118,10 @@ class CoordinatorJettyServerInitializer implements JettyServerInitializer
// perform no-op authorization for these resources
AuthenticationUtils.addNoopAuthorizationFilters(root, UNSECURED_PATHS);
if (beOverlord) {
AuthenticationUtils.addNoopAuthorizationFilters(root, CliOverlord.UNSECURED_PATHS);
}
authenticators = authenticatorMapper.getAuthenticatorChain();
AuthenticationUtils.addAuthenticationFilterChain(root, authenticators);