Skip to content

Commit fc1a1fb

Browse files
committed
Support Client and RoleMapping in custom Realms
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. Resolves: elastic#48369
1 parent 5e9b629 commit fc1a1fb

34 files changed

+374
-45
lines changed

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

+27-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
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.threadpool.ThreadPool;
1114
import org.elasticsearch.watcher.ResourceWatcherService;
1215
import org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler;
1316
import org.elasticsearch.xpack.core.security.authc.Realm;
17+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
1418
import org.elasticsearch.xpack.core.security.authz.AuthorizationEngine;
1519
import org.elasticsearch.xpack.core.security.authz.RoleDescriptor;
1620
import org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult;
@@ -28,16 +32,32 @@
2832
*/
2933
public interface SecurityExtension {
3034

35+
/**
36+
* This interface provides access to components (clients & services) that may be used
37+
* within custom realms and role providers.
38+
*/
39+
interface SecurityComponents {
40+
/** An internal client for retrieving information/data from this cluster */
41+
Client client();
42+
/** The Elasticsearch thread pools */
43+
ThreadPool threadPool();
44+
/** Provides the ability to monitor files for changes */
45+
ResourceWatcherService resourceWatcherService();
46+
/** Access to listen to changes in cluster state and settings */
47+
ClusterService clusterService();
48+
/** Provides support for mapping users' roles from groups and metadata */
49+
UserRoleMapper roleMapper();
50+
}
3151
/**
3252
* Returns authentication realm implementations added by this extension.
3353
*
3454
* The key of the returned {@link Map} is the type name of the realm, and the value
3555
* is a {@link Realm.Factory} which will construct
3656
* that realm for use in authentication when that realm type is configured.
3757
*
38-
* @param resourceWatcherService Use to watch configuration files for changes
58+
* @param components Access to components that may be used to build realms
3959
*/
40-
default Map<String, Realm.Factory> getRealms(ResourceWatcherService resourceWatcherService) {
60+
default Map<String, Realm.Factory> getRealms(SecurityComponents components) {
4161
return Collections.emptyMap();
4262
}
4363

@@ -46,8 +66,10 @@ default Map<String, Realm.Factory> getRealms(ResourceWatcherService resourceWatc
4666
*
4767
* Only one installed extension may have an authentication failure handler. If more than
4868
* one extension returns a non-null handler, an error is raised.
69+
*
70+
* @param components Access to components that may be used to build the handler
4971
*/
50-
default AuthenticationFailureHandler getAuthenticationFailureHandler() {
72+
default AuthenticationFailureHandler getAuthenticationFailureHandler(SecurityComponents components) {
5173
return null;
5274
}
5375

@@ -73,10 +95,10 @@ default AuthenticationFailureHandler getAuthenticationFailureHandler() {
7395
* By default, an empty list is returned.
7496
*
7597
* @param settings The configured settings for the node
76-
* @param resourceWatcherService Use to watch configuration files for changes
98+
* @param components Access to components that may be used to build roles
7799
*/
78100
default List<BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>>>
79-
getRolesProviders(Settings settings, ResourceWatcherService resourceWatcherService) {
101+
getRolesProviders(Settings settings, SecurityComponents components) {
80102
return Collections.emptyList();
81103
}
82104

+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;
@@ -391,10 +392,12 @@ Collection<Object> createComponents(Client client, ThreadPool threadPool, Cluste
391392
final AnonymousUser anonymousUser = new AnonymousUser(settings);
392393
final ReservedRealm reservedRealm = new ReservedRealm(env, settings, nativeUsersStore,
393394
anonymousUser, securityIndex.get(), threadPool);
395+
final SecurityExtension.SecurityComponents extensionComponents = new ExtensionComponents(client, threadPool, clusterService,
396+
resourceWatcherService, nativeRoleMappingStore);
394397
Map<String, Realm.Factory> realmFactories = new HashMap<>(InternalRealms.getFactories(threadPool, resourceWatcherService,
395398
getSslService(), nativeUsersStore, nativeRoleMappingStore, securityIndex.get()));
396399
for (SecurityExtension extension : securityExtensions) {
397-
Map<String, Realm.Factory> newRealms = extension.getRealms(resourceWatcherService);
400+
Map<String, Realm.Factory> newRealms = extension.getRealms(extensionComponents);
398401
for (Map.Entry<String, Realm.Factory> entry : newRealms.entrySet()) {
399402
if (realmFactories.put(entry.getKey(), entry.getValue()) != null) {
400403
throw new IllegalArgumentException("Realm type [" + entry.getKey() + "] is already registered");
@@ -420,7 +423,7 @@ Collection<Object> createComponents(Client client, ThreadPool threadPool, Cluste
420423
final ReservedRolesStore reservedRolesStore = new ReservedRolesStore();
421424
List<BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>>> rolesProviders = new ArrayList<>();
422425
for (SecurityExtension extension : securityExtensions) {
423-
rolesProviders.addAll(extension.getRolesProviders(settings, resourceWatcherService));
426+
rolesProviders.addAll(extension.getRolesProviders(settings, extensionComponents));
424427
}
425428

426429
final ApiKeyService apiKeyService = new ApiKeyService(settings, Clock.systemUTC(), client, getLicenseState(), securityIndex.get(),
@@ -436,7 +439,7 @@ Collection<Object> createComponents(Client client, ThreadPool threadPool, Cluste
436439
getLicenseState().addListener(allRolesStore::invalidateAll);
437440
getLicenseState().addListener(new SecurityStatusChangeListener(getLicenseState()));
438441

439-
final AuthenticationFailureHandler failureHandler = createAuthenticationFailureHandler(realms);
442+
final AuthenticationFailureHandler failureHandler = createAuthenticationFailureHandler(realms, extensionComponents);
440443
authcService.set(new AuthenticationService(settings, realms, auditTrailService, failureHandler, threadPool,
441444
anonymousUser, tokenService, apiKeyService));
442445
components.add(authcService.get());
@@ -496,11 +499,12 @@ private AuthorizationEngine getAuthorizationEngine() {
496499
return authorizationEngine;
497500
}
498501

499-
private AuthenticationFailureHandler createAuthenticationFailureHandler(final Realms realms) {
502+
private AuthenticationFailureHandler createAuthenticationFailureHandler(final Realms realms,
503+
final SecurityExtension.SecurityComponents components) {
500504
AuthenticationFailureHandler failureHandler = null;
501505
String extensionName = null;
502506
for (SecurityExtension extension : securityExtensions) {
503-
AuthenticationFailureHandler extensionFailureHandler = extension.getAuthenticationFailureHandler();
507+
AuthenticationFailureHandler extensionFailureHandler = extension.getAuthenticationFailureHandler(components);
504508
if (extensionFailureHandler != null && failureHandler != null) {
505509
throw new IllegalStateException("Extensions [" + extensionName + "] and [" + extension.toString() + "] "
506510
+ "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
@@ -21,7 +21,7 @@
2121
import org.elasticsearch.xpack.core.security.authc.Realm;
2222
import org.elasticsearch.xpack.security.authc.AuthenticationService;
2323
import org.elasticsearch.xpack.security.authc.Realms;
24-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
24+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
2525

2626
import java.io.IOException;
2727
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
@@ -20,7 +20,9 @@
2020
import org.elasticsearch.watcher.ResourceWatcherService;
2121
import org.elasticsearch.xpack.core.XPackPlugin;
2222
import org.elasticsearch.xpack.core.security.authc.RealmConfig;
23+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
2324
import org.elasticsearch.xpack.core.security.authc.support.DnRoleMapperSettings;
25+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
2426

2527
import java.io.IOException;
2628
import java.nio.file.Files;

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
@@ -36,8 +36,8 @@
3636
import org.elasticsearch.xpack.core.security.authc.support.mapper.ExpressionRoleMapping;
3737
import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.ExpressionModel;
3838
import org.elasticsearch.xpack.core.security.index.RestrictedIndicesNames;
39-
import org.elasticsearch.xpack.security.authc.support.CachingRealm;
40-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
39+
import org.elasticsearch.xpack.core.security.authc.support.CachingRealm;
40+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
4141
import org.elasticsearch.xpack.security.support.SecurityIndexManager;
4242

4343
import java.io.IOException;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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.threadpool.ThreadPool;
12+
import org.elasticsearch.watcher.ResourceWatcherService;
13+
import org.elasticsearch.xpack.core.security.SecurityExtension;
14+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
15+
16+
/**
17+
* Immutable implementation of {@link SecurityExtension.SecurityComponents}.
18+
*/
19+
public class ExtensionComponents implements SecurityExtension.SecurityComponents {
20+
private final Client client;
21+
private final ThreadPool threadPool;
22+
private final ClusterService clusterService;
23+
private final ResourceWatcherService resourceWatcherService;
24+
private final UserRoleMapper roleMapper;
25+
26+
public ExtensionComponents(Client client, ThreadPool threadPool, ClusterService clusterService,
27+
ResourceWatcherService resourceWatcherService, UserRoleMapper roleMapper) {
28+
this.client = client;
29+
this.threadPool = threadPool;
30+
this.clusterService = clusterService;
31+
this.resourceWatcherService = resourceWatcherService;
32+
this.roleMapper = roleMapper;
33+
}
34+
35+
@Override
36+
public Client client() {
37+
return client;
38+
}
39+
40+
@Override
41+
public ThreadPool threadPool() {
42+
return threadPool;
43+
}
44+
45+
@Override
46+
public ResourceWatcherService resourceWatcherService() {
47+
return resourceWatcherService;
48+
}
49+
50+
@Override
51+
public ClusterService clusterService() {
52+
return clusterService;
53+
}
54+
55+
@Override
56+
public UserRoleMapper roleMapper() {
57+
return roleMapper;
58+
}
59+
}

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;

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/oidc/OpenIdConnectRealmTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.elasticsearch.xpack.core.security.authc.support.DelegatedAuthorizationSettings;
2727
import org.elasticsearch.xpack.core.security.user.User;
2828
import org.elasticsearch.xpack.security.authc.support.MockLookupRealm;
29-
import org.elasticsearch.xpack.security.authc.support.UserRoleMapper;
29+
import org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper;
3030
import org.hamcrest.Matchers;
3131
import org.junit.Before;
3232

0 commit comments

Comments
 (0)