|  | @@ -196,7 +196,7 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |          ClusterService clusterService = ClusterServiceUtils.createClusterService(threadPool);
 | 
	
		
			
				|  |  |          tokenService = new TokenService(settings, Clock.systemUTC(), client, securityIndex, clusterService);
 | 
	
		
			
				|  |  |          service = new AuthenticationService(settings, realms, auditTrail,
 | 
	
		
			
				|  |  | -                new DefaultAuthenticationFailureHandler(), threadPool, new AnonymousUser(settings), tokenService);
 | 
	
		
			
				|  |  | +                new DefaultAuthenticationFailureHandler(Collections.emptyMap()), threadPool, new AnonymousUser(settings), tokenService);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @After
 | 
	
	
		
			
				|  | @@ -461,8 +461,8 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              ThreadContext threadContext1 = threadPool1.getThreadContext();
 | 
	
		
			
				|  |  |              service = new AuthenticationService(Settings.EMPTY, realms, auditTrail,
 | 
	
		
			
				|  |  | -                    new DefaultAuthenticationFailureHandler(), threadPool1, new AnonymousUser(Settings.EMPTY), tokenService);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +                new DefaultAuthenticationFailureHandler(Collections.emptyMap()), threadPool1, new AnonymousUser(Settings.EMPTY),
 | 
	
		
			
				|  |  | +                tokenService);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              threadContext1.putTransient(AuthenticationField.AUTHENTICATION_KEY, authRef.get());
 | 
	
		
			
				|  |  |              threadContext1.putHeader(AuthenticationField.AUTHENTICATION_KEY, authHeaderRef.get());
 | 
	
	
		
			
				|  | @@ -485,7 +485,8 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |              final String header;
 | 
	
		
			
				|  |  |              try (ThreadContext.StoredContext ignore = threadContext2.stashContext()) {
 | 
	
		
			
				|  |  |                  service = new AuthenticationService(Settings.EMPTY, realms, auditTrail,
 | 
	
		
			
				|  |  | -                        new DefaultAuthenticationFailureHandler(), threadPool2, new AnonymousUser(Settings.EMPTY), tokenService);
 | 
	
		
			
				|  |  | +                    new DefaultAuthenticationFailureHandler(Collections.emptyMap()), threadPool2, new AnonymousUser(Settings.EMPTY),
 | 
	
		
			
				|  |  | +                    tokenService);
 | 
	
		
			
				|  |  |                  threadContext2.putHeader(AuthenticationField.AUTHENTICATION_KEY, authHeaderRef.get());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  BytesStreamOutput output = new BytesStreamOutput();
 | 
	
	
		
			
				|  | @@ -498,7 +499,8 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              threadPool2.getThreadContext().putHeader(AuthenticationField.AUTHENTICATION_KEY, header);
 | 
	
		
			
				|  |  |              service = new AuthenticationService(Settings.EMPTY, realms, auditTrail,
 | 
	
		
			
				|  |  | -                    new DefaultAuthenticationFailureHandler(), threadPool2, new AnonymousUser(Settings.EMPTY), tokenService);
 | 
	
		
			
				|  |  | +                new DefaultAuthenticationFailureHandler(Collections.emptyMap()), threadPool2, new AnonymousUser(Settings.EMPTY),
 | 
	
		
			
				|  |  | +                tokenService);
 | 
	
		
			
				|  |  |              service.authenticate("_action", new InternalMessage(), SystemUser.INSTANCE, ActionListener.wrap(result -> {
 | 
	
		
			
				|  |  |                  assertThat(result, notNullValue());
 | 
	
		
			
				|  |  |                  assertThat(result.getUser(), equalTo(user1));
 | 
	
	
		
			
				|  | @@ -533,8 +535,8 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          Settings settings = builder.build();
 | 
	
		
			
				|  |  |          final AnonymousUser anonymousUser = new AnonymousUser(settings);
 | 
	
		
			
				|  |  | -        service = new AuthenticationService(settings, realms, auditTrail, new DefaultAuthenticationFailureHandler(),
 | 
	
		
			
				|  |  | -                threadPool, anonymousUser, tokenService);
 | 
	
		
			
				|  |  | +        service = new AuthenticationService(settings, realms, auditTrail, new DefaultAuthenticationFailureHandler(Collections.emptyMap()),
 | 
	
		
			
				|  |  | +            threadPool, anonymousUser, tokenService);
 | 
	
		
			
				|  |  |          RestRequest request = new FakeRestRequest();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Authentication result = authenticateBlocking(request);
 | 
	
	
		
			
				|  | @@ -551,8 +553,8 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |                  .putList(AnonymousUser.ROLES_SETTING.getKey(), "r1", "r2", "r3")
 | 
	
		
			
				|  |  |                  .build();
 | 
	
		
			
				|  |  |          final AnonymousUser anonymousUser = new AnonymousUser(settings);
 | 
	
		
			
				|  |  | -        service = new AuthenticationService(settings, realms, auditTrail,
 | 
	
		
			
				|  |  | -                new DefaultAuthenticationFailureHandler(), threadPool, anonymousUser, tokenService);
 | 
	
		
			
				|  |  | +        service = new AuthenticationService(settings, realms, auditTrail, new DefaultAuthenticationFailureHandler(Collections.emptyMap()),
 | 
	
		
			
				|  |  | +            threadPool, anonymousUser, tokenService);
 | 
	
		
			
				|  |  |          InternalMessage message = new InternalMessage();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Authentication result = authenticateBlocking("_action", message, null);
 | 
	
	
		
			
				|  | @@ -566,8 +568,8 @@ public class AuthenticationServiceTests extends ESTestCase {
 | 
	
		
			
				|  |  |                  .putList(AnonymousUser.ROLES_SETTING.getKey(), "r1", "r2", "r3")
 | 
	
		
			
				|  |  |                  .build();
 | 
	
		
			
				|  |  |          final AnonymousUser anonymousUser = new AnonymousUser(settings);
 | 
	
		
			
				|  |  | -        service = new AuthenticationService(settings, realms, auditTrail,
 | 
	
		
			
				|  |  | -                new DefaultAuthenticationFailureHandler(), threadPool, anonymousUser, tokenService);
 | 
	
		
			
				|  |  | +        service = new AuthenticationService(settings, realms, auditTrail, new DefaultAuthenticationFailureHandler(Collections.emptyMap()),
 | 
	
		
			
				|  |  | +            threadPool, anonymousUser, tokenService);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          InternalMessage message = new InternalMessage();
 | 
	
		
			
				|  |  |  
 |