Skip to content

Commit 33c29fb

Browse files
authored
Support Client and RoleMapping in custom Realms (#50950)
Previously custom realms were limited in what services and components they had easy access to. It was possible to work around this because a security extension is packaged within a Plugin, so there were ways to store this components in static/SetOnce variables and access them from the realm, but those techniques were fragile, undocumented and difficult to discover. This change includes key services as an argument to most of the methods on SecurityExtension so that custom realm / role provider authors can have easy access to them. Backport of: #50534
1 parent 50cb770 commit 33c29fb

34 files changed

+393
-47
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityExtension.java

+32-6
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77

88
import org.apache.lucene.util.SPIClassIterator;
99
import org.elasticsearch.action.ActionListener;
10+
import org.elasticsearch.client.Client;
11+
import org.elasticsearch.cluster.service.ClusterService;
1012
import org.elasticsearch.common.settings.Settings;
13+
import org.elasticsearch.env.Environment;
14+
import org.elasticsearch.threadpool.ThreadPool;
1115
import org.elasticsearch.watcher.ResourceWatcherService;
1216
import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler;
1317
import org.elasticsearch.xpack.core.security.authc.Realm;
18+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
1419
import org.elasticsearch.xpack.core.security.authz.AuthorizationEngine;
1520
import org.elasticsearch.xpack.core.security.authz.RoleDescriptor;
1621
import org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult;
@@ -28,16 +33,36 @@
2833
*/
2934
public interface SecurityExtension {
3035

36+
/**
37+
* This interface provides access to components (clients and services) that may be used
38+
* within custom realms and role providers.
39+
*/
40+
interface SecurityComponents {
41+
/** Global settings for the current node */
42+
Settings settings();
43+
/** Provides access to key filesystem paths */
44+
Environment environment();
45+
/** An internal client for retrieving information/data from this cluster */
46+
Client client();
47+
/** The Elasticsearch thread pools */
48+
ThreadPool threadPool();
49+
/** Provides the ability to monitor files for changes */
50+
ResourceWatcherService resourceWatcherService();
51+
/** Access to listen to changes in cluster state and settings */
52+
ClusterService clusterService();
53+
/** Provides support for mapping users' roles from groups and metadata */
54+
UserRoleMapper roleMapper();
55+
}
3156
/**
3257
* Returns authentication realm implementations added by this extension.
3358
*
3459
* The key of the returned {@link Map} is the type name of the realm, and the value
3560
* is a {@link Realm.Factory} which will construct
3661
* that realm for use in authentication when that realm type is configured.
3762
*
38-
* @param resourceWatcherService Use to watch configuration files for changes
63+
* @param components Access to components that may be used to build realms
3964
*/
40-
default Map<String, Realm.Factory> getRealms(ResourceWatcherService resourceWatcherService) {
65+
default Map<String, Realm.Factory> getRealms(SecurityComponents components) {
4166
return Collections.emptyMap();
4267
}
4368

@@ -46,8 +71,10 @@ default Map<String, Realm.Factory> getRealms(ResourceWatcherService resourceWatc
4671
*
4772
* Only one installed extension may have an authentication failure handler. If more than
4873
* one extension returns a non-null handler, an error is raised.
74+
*
75+
* @param components Access to components that may be used to build the handler
4976
*/
50-
default AuthenticationFailureHandler getAuthenticationFailureHandler() {
77+
default AuthenticationFailureHandler getAuthenticationFailureHandler(SecurityComponents components) {
5178
return null;
5279
}
5380

@@ -72,11 +99,10 @@ default AuthenticationFailureHandler getAuthenticationFailureHandler() {
7299
*
73100
* By default, an empty list is returned.
74101
*
75-
* @param settings The configured settings for the node
76-
* @param resourceWatcherService Use to watch configuration files for changes
102+
* @param components Access to components that may be used to build roles
77103
*/
78104
default List<BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>>>
79-
getRolesProviders(Settings settings, ResourceWatcherService resourceWatcherService) {
105+
getRolesProviders(SecurityComponents components) {
80106
return Collections.emptyList();
81107
}
82108

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
package org.elasticsearch.xpack.security.authc.support;
6+
package org.elasticsearch.xpack.core.security.authc.support;
77

88
import org.elasticsearch.xpack.core.security.authc.Realm;
99

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
package org.elasticsearch.xpack.security.authc.support;
6+
package org.elasticsearch.xpack.core.security.authc.support;
77

88
import com.unboundid.ldap.sdk.DN;
99
import com.unboundid.ldap.sdk.LDAPException;

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java

+9-5
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@
232232
import org.elasticsearch.xpack.security.rest.action.user.RestHasPrivilegesAction;
233233
import org.elasticsearch.xpack.security.rest.action.user.RestPutUserAction;
234234
import org.elasticsearch.xpack.security.rest.action.user.RestSetEnabledAction;
235+
import org.elasticsearch.xpack.security.support.ExtensionComponents;
235236
import org.elasticsearch.xpack.security.support.SecurityIndexManager;
236237
import org.elasticsearch.xpack.security.support.SecurityStatusChangeListener;
237238
import org.elasticsearch.xpack.security.transport.SecurityHttpSettings;
@@ -436,10 +437,12 @@ Collection<Object> createComponents(Client client, ThreadPool threadPool, Cluste
436437
final AnonymousUser anonymousUser = new AnonymousUser(settings);
437438
final ReservedRealm reservedRealm = new ReservedRealm(env, settings, nativeUsersStore,
438439
anonymousUser, securityIndex.get(), threadPool);
440+
final SecurityExtension.SecurityComponents extensionComponents = new ExtensionComponents(env, client, clusterService,
441+
resourceWatcherService, nativeRoleMappingStore);
439442
Map<String, Realm.Factory> realmFactories = new HashMap<>(InternalRealms.getFactories(threadPool, resourceWatcherService,
440443
getSslService(), nativeUsersStore, nativeRoleMappingStore, securityIndex.get()));
441444
for (SecurityExtension extension : securityExtensions) {
442-
Map<String, Realm.Factory> newRealms = extension.getRealms(resourceWatcherService);
445+
Map<String, Realm.Factory> newRealms = extension.getRealms(extensionComponents);
443446
for (Map.Entry<String, Realm.Factory> entry : newRealms.entrySet()) {
444447
if (realmFactories.put(entry.getKey(), entry.getValue()) != null) {
445448
throw new IllegalArgumentException("Realm type [" + entry.getKey() + "] is already registered");
@@ -465,7 +468,7 @@ Collection<Object> createComponents(Client client, ThreadPool threadPool, Cluste
465468
final ReservedRolesStore reservedRolesStore = new ReservedRolesStore();
466469
List<BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>>> rolesProviders = new ArrayList<>();
467470
for (SecurityExtension extension : securityExtensions) {
468-
rolesProviders.addAll(extension.getRolesProviders(settings, resourceWatcherService));
471+
rolesProviders.addAll(extension.getRolesProviders(extensionComponents));
469472
}
470473

471474
final ApiKeyService apiKeyService = new ApiKeyService(settings, Clock.systemUTC(), client, getLicenseState(), securityIndex.get(),
@@ -481,7 +484,7 @@ Collection<Object> createComponents(Client client, ThreadPool threadPool, Cluste
481484
getLicenseState().addListener(allRolesStore::invalidateAll);
482485
getLicenseState().addListener(new SecurityStatusChangeListener(getLicenseState()));
483486

484-
final AuthenticationFailureHandler failureHandler = createAuthenticationFailureHandler(realms);
487+
final AuthenticationFailureHandler failureHandler = createAuthenticationFailureHandler(realms, extensionComponents);
485488
authcService.set(new AuthenticationService(settings, realms, auditTrailService, failureHandler, threadPool,
486489
anonymousUser, tokenService, apiKeyService));
487490
components.add(authcService.get());
@@ -539,11 +542,12 @@ private AuthorizationEngine getAuthorizationEngine() {
539542
return authorizationEngine;
540543
}
541544

542-
private AuthenticationFailureHandler createAuthenticationFailureHandler(final Realms realms) {
545+
private AuthenticationFailureHandler createAuthenticationFailureHandler(final Realms realms,
546+
final SecurityExtension.SecurityComponents components) {
543547
AuthenticationFailureHandler failureHandler = null;
544548
String extensionName = null;
545549
for (SecurityExtension extension : securityExtensions) {
546-
AuthenticationFailureHandler extensionFailureHandler = extension.getAuthenticationFailureHandler();
550+
AuthenticationFailureHandler extensionFailureHandler = extension.getAuthenticationFailureHandler(components);
547551
if (extensionFailureHandler != null && failureHandler != null) {
548552
throw new IllegalStateException("Extensions [" + extensionName + "] and [" + extension.toString() + "] "
549553
+ "both set an authentication failure handler");

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.elasticsearch.xpack.core.security.authc.Realm;
2121
import org.elasticsearch.xpack.security.authc.AuthenticationService;
2222
import org.elasticsearch.xpack.security.authc.Realms;
23-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
23+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
2424

2525
import java.io.IOException;
2626
import java.util.List;

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosRealm.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import org.elasticsearch.xpack.core.security.authc.RealmConfig;
2222
import org.elasticsearch.xpack.core.security.authc.kerberos.KerberosRealmSettings;
2323
import org.elasticsearch.xpack.core.security.user.User;
24-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
24+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
2525
import org.elasticsearch.xpack.security.authc.support.DelegatedAuthorizationSupport;
26-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
26+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
2727
import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore;
2828
import org.ietf.jgss.GSSException;
2929

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory;
3636
import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm;
3737
import org.elasticsearch.xpack.security.authc.support.DelegatedAuthorizationSupport;
38-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
39-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper.UserData;
38+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
39+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.UserData;
4040
import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapper;
4141
import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore;
4242

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/oidc/OpenIdConnectRealm.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import org.elasticsearch.xpack.core.ssl.SSLService;
4545
import org.elasticsearch.xpack.security.authc.TokenService;
4646
import org.elasticsearch.xpack.security.authc.support.DelegatedAuthorizationSupport;
47-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
47+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
4848

4949
import java.net.URI;
5050
import java.net.URISyntaxException;

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
import org.elasticsearch.xpack.core.ssl.SSLConfigurationSettings;
3333
import org.elasticsearch.xpack.security.authc.BytesKey;
3434
import org.elasticsearch.xpack.security.authc.TokenService;
35-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
35+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
3636
import org.elasticsearch.xpack.security.authc.support.DelegatedAuthorizationSupport;
37-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
37+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
3838
import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapper;
3939
import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore;
4040

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlRealm.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import org.elasticsearch.xpack.security.authc.Realms;
5151
import org.elasticsearch.xpack.security.authc.TokenService;
5252
import org.elasticsearch.xpack.security.authc.support.DelegatedAuthorizationSupport;
53-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
53+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
5454
import org.opensaml.core.criterion.EntityIdCriterion;
5555
import org.opensaml.saml.common.xml.SAMLConstants;
5656
import org.opensaml.saml.criterion.EntityRoleCriterion;

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.elasticsearch.xpack.core.security.authc.AuthenticationResult;
1818
import org.elasticsearch.xpack.core.security.authc.AuthenticationToken;
1919
import org.elasticsearch.xpack.core.security.authc.RealmConfig;
20+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
2021
import org.elasticsearch.xpack.core.security.authc.support.CachingUsernamePasswordRealmSettings;
2122
import org.elasticsearch.xpack.core.security.authc.support.Hasher;
2223
import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken;

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java

+2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
import org.elasticsearch.watcher.ResourceWatcherService;
3636
import org.elasticsearch.xpack.core.XPackPlugin;
3737
import org.elasticsearch.xpack.core.security.authc.RealmConfig;
38+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
3839
import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings;
40+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
3941

4042
import static java.util.Collections.emptyMap;
4143
import static java.util.Collections.unmodifiableMap;

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import org.elasticsearch.action.support.GroupedActionListener;
1616
import org.elasticsearch.watcher.ResourceWatcherService;
1717
import org.elasticsearch.xpack.core.security.authc.RealmConfig;
18-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
18+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
1919
import org.elasticsearch.xpack.security.authc.support.DnRoleMapper;
20-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
20+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
2121

2222
/**
2323
* A {@link UserRoleMapper} that composes one or more <i>delegate</i> role-mappers.

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.ExpressionModel;
3838
import org.elasticsearch.xpack.core.security.client.SecurityClient;
3939
import org.elasticsearch.xpack.core.security.index.RestrictedIndicesNames;
40-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
41-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
40+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
41+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
4242
import org.elasticsearch.xpack.security.support.SecurityIndexManager;
4343

4444
import java.io.IOException;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
package org.elasticsearch.xpack.security.support;
8+
9+
import org.elasticsearch.client.Client;
10+
import org.elasticsearch.cluster.service.ClusterService;
11+
import org.elasticsearch.common.settings.Settings;
12+
import org.elasticsearch.env.Environment;
13+
import org.elasticsearch.threadpool.ThreadPool;
14+
import org.elasticsearch.watcher.ResourceWatcherService;
15+
import org.elasticsearch.xpack.core.security.SecurityExtension;
16+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
17+
18+
/**
19+
* Immutable implementation of {@link SecurityExtension.SecurityComponents}.
20+
*/
21+
public final class ExtensionComponents implements SecurityExtension.SecurityComponents {
22+
private final Environment environment;
23+
private final Client client;
24+
private final ClusterService clusterService;
25+
private final ResourceWatcherService resourceWatcherService;
26+
private final UserRoleMapper roleMapper;
27+
28+
public ExtensionComponents(Environment environment, Client client, ClusterService clusterService,
29+
ResourceWatcherService resourceWatcherService, UserRoleMapper roleMapper) {
30+
this.environment = environment;
31+
this.client = client;
32+
this.clusterService = clusterService;
33+
this.resourceWatcherService = resourceWatcherService;
34+
this.roleMapper = roleMapper;
35+
}
36+
37+
@Override
38+
public Settings settings() {
39+
return environment.settings();
40+
}
41+
42+
@Override
43+
public Environment environment() {
44+
return environment;
45+
}
46+
47+
@Override
48+
public Client client() {
49+
return client;
50+
}
51+
52+
@Override
53+
public ThreadPool threadPool() {
54+
return client.threadPool();
55+
}
56+
57+
@Override
58+
public ResourceWatcherService resourceWatcherService() {
59+
return resourceWatcherService;
60+
}
61+
62+
@Override
63+
public ClusterService clusterService() {
64+
return clusterService;
65+
}
66+
67+
@Override
68+
public UserRoleMapper roleMapper() {
69+
return roleMapper;
70+
}
71+
}

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static class DummyExtension implements SecurityExtension {
8989
}
9090

9191
@Override
92-
public Map<String, Realm.Factory> getRealms(ResourceWatcherService resourceWatcherService) {
92+
public Map<String, Realm.Factory> getRealms(SecurityComponents components) {
9393
return Collections.singletonMap(realmType, config -> null);
9494
}
9595
}

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/oidc/TransportOpenIdConnectLogoutActionTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import org.elasticsearch.xpack.security.authc.TokenService;
5252
import org.elasticsearch.xpack.security.authc.oidc.OpenIdConnectRealm;
5353
import org.elasticsearch.xpack.security.authc.oidc.OpenIdConnectTestCase;
54-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
54+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
5555
import org.elasticsearch.xpack.security.support.SecurityIndexManager;
5656
import org.junit.After;
5757
import org.junit.Before;

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/saml/TransportSamlLogoutActionTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
import org.elasticsearch.xpack.security.authc.saml.SamlRealm;
6262
import org.elasticsearch.xpack.security.authc.saml.SamlRealmTests;
6363
import org.elasticsearch.xpack.security.authc.saml.SamlTestCase;
64-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
64+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
6565
import org.elasticsearch.xpack.security.support.SecurityIndexManager;
6666
import org.junit.After;
6767
import org.junit.Before;

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosRealmCacheTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import org.elasticsearch.xpack.core.security.authc.AuthenticationResult;
1313
import org.elasticsearch.xpack.core.security.authc.kerberos.KerberosRealmSettings;
1414
import org.elasticsearch.xpack.core.security.user.User;
15-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper.UserData;
15+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.UserData;
1616
import org.ietf.jgss.GSSException;
1717

1818
import javax.security.auth.login.LoginException;

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosRealmTestCase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.elasticsearch.xpack.core.security.authc.kerberos.KerberosRealmSettings;
2828
import org.elasticsearch.xpack.core.security.support.Exceptions;
2929
import org.elasticsearch.xpack.core.security.user.User;
30-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
30+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
3131
import org.elasticsearch.xpack.security.authc.support.mapper.NativeRoleMappingStore;
3232
import org.elasticsearch.xpack.security.support.SecurityIndexManager;
3333
import org.junit.After;

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosRealmTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken;
2323
import org.elasticsearch.xpack.core.security.user.User;
2424
import org.elasticsearch.xpack.security.authc.support.MockLookupRealm;
25-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper.UserData;
25+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.UserData;
2626
import org.ietf.jgss.GSSException;
2727

2828
import javax.security.auth.login.LoginException;

0 commit comments

Comments
 (0)