Package org.apache.solr.security
Class ExternalRoleRuleBasedAuthorizationPlugin
- java.lang.Object
-
- org.apache.solr.security.RuleBasedAuthorizationPluginBase
-
- org.apache.solr.security.ExternalRoleRuleBasedAuthorizationPlugin
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.solr.common.SpecProvider
,AuthorizationPlugin
,ConfigEditablePlugin
public class ExternalRoleRuleBasedAuthorizationPlugin extends RuleBasedAuthorizationPluginBase
Rule Based Authz plugin implementation which reads user roles from the request. This requires a Principal implementing VerifiedUserRoles interface, e.g. JWTAuthenticationPlugin
-
-
Constructor Summary
Constructors Constructor Description ExternalRoleRuleBasedAuthorizationPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getUserRoles(Principal principal)
Pulls roles from the Principalvoid
init(Map<String,Object> initInfo)
-
Methods inherited from class org.apache.solr.security.RuleBasedAuthorizationPluginBase
authorize, close, doesUserHavePermission, edit, getPermissionNamesForRoles, getSpec, getUserRoles
-
-
-
-
Method Detail
-
init
public void init(Map<String,Object> initInfo)
- Specified by:
init
in interfaceAuthorizationPlugin
- Overrides:
init
in classRuleBasedAuthorizationPluginBase
-
getUserRoles
public Set<String> getUserRoles(Principal principal)
Pulls roles from the Principal- Specified by:
getUserRoles
in classRuleBasedAuthorizationPluginBase
- Parameters:
principal
- the user Principal which should contain roles- Returns:
- set of roles as strings
-
-