Package org.apache.solr.security
Class MultiAuthRuleBasedAuthorizationPlugin
- java.lang.Object
-
- org.apache.solr.security.RuleBasedAuthorizationPluginBase
-
- org.apache.solr.security.MultiAuthRuleBasedAuthorizationPlugin
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.solr.common.SpecProvider,AuthorizationPlugin,ConfigEditablePlugin
public class MultiAuthRuleBasedAuthorizationPlugin extends RuleBasedAuthorizationPluginBase
Authorization plugin designed to work with the MultiAuthPlugin to support different AuthorizationPlugin per scheme.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description MultiAuthRuleBasedAuthorizationPlugin(CoreContainer cc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>edit(Map<String,Object> latestConf, List<org.apache.solr.common.util.CommandOperation> commands)Operate the commands on the latest conf and return a new conf object If there are errors in the commands , throw a SolrException.Set<String>getUserRoles(Principal principal)Pulls roles from the Principalvoidinit(Map<String,Object> initInfo)protected voidinitPluginForScheme(Map<String,Object> schemeMap)-
Methods inherited from class org.apache.solr.security.RuleBasedAuthorizationPluginBase
authorize, close, doesUserHavePermission, getPermissionNamesForRoles, getSpec, getUserRoles
-
-
-
-
Constructor Detail
-
MultiAuthRuleBasedAuthorizationPlugin
public MultiAuthRuleBasedAuthorizationPlugin(CoreContainer cc)
-
-
Method Detail
-
init
public void init(Map<String,Object> initInfo)
- Specified by:
initin interfaceAuthorizationPlugin- Overrides:
initin classRuleBasedAuthorizationPluginBase
-
getUserRoles
public Set<String> getUserRoles(Principal principal)
Pulls roles from the Principal- Specified by:
getUserRolesin classRuleBasedAuthorizationPluginBase- Parameters:
principal- the user Principal which should contain roles- Returns:
- set of roles as strings
-
edit
public Map<String,Object> edit(Map<String,Object> latestConf, List<org.apache.solr.common.util.CommandOperation> commands)
Description copied from interface:ConfigEditablePluginOperate the commands on the latest conf and return a new conf object If there are errors in the commands , throw a SolrException. return a null if no changes are to be made as a result of this edit. It is the responsibility of the implementation to ensure that the returned config is valid . The framework does no validation of the data- Specified by:
editin interfaceConfigEditablePlugin- Overrides:
editin classRuleBasedAuthorizationPluginBase
-
-