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
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 -
Method Summary
Modifier and TypeMethodDescriptionOperate the commands on the latest conf and return a new conf object If there are errors in the commands , throw a SolrException.getUserRoles(Principal principal) Pulls roles from the Principalvoidprotected voidinitPluginForScheme(Map<String, Object> schemeMap) Methods inherited from class org.apache.solr.security.RuleBasedAuthorizationPluginBase
authorize, close, doesUserHavePermission, getPermissionNamesForRoles, getSpec, getUserRoles
-
Constructor Details
-
MultiAuthRuleBasedAuthorizationPlugin
-
-
Method Details
-
init
- Specified by:
initin interfaceAuthorizationPlugin- Overrides:
initin classRuleBasedAuthorizationPluginBase
-
initPluginForScheme
-
getUserRoles
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
-