Package org.apache.solr.handler.admin
Class SecurityConfHandler
- java.lang.Object
-
- org.apache.solr.handler.RequestHandlerBase
-
- org.apache.solr.handler.admin.SecurityConfHandler
-
- All Implemented Interfaces:
AutoCloseable,ApiSupport,SolrInfoBean,NestedRequestHandler,SolrMetricProducer,SolrRequestHandler,PermissionNameProvider
- Direct Known Subclasses:
SecurityConfHandlerLocal,SecurityConfHandlerZk
public abstract class SecurityConfHandler extends RequestHandlerBase implements PermissionNameProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSecurityConfHandler.SecurityConfigObject to hold security.json as nestedMap<String,Object>and optionally its version.-
Nested classes/interfaces inherited from class org.apache.solr.handler.RequestHandlerBase
RequestHandlerBase.HandlerMetrics
-
Nested classes/interfaces inherited from interface org.apache.solr.security.PermissionNameProvider
PermissionNameProvider.Name
-
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
-
-
Field Summary
Fields Modifier and Type Field Description protected CoreContainercores-
Fields inherited from class org.apache.solr.handler.RequestHandlerBase
aggregateNodeLevelMetricsEnabled, appends, defaults, httpCaching, initArgs, invariants, metrics, solrMetricsContext
-
Fields inherited from interface org.apache.solr.security.PermissionNameProvider
ANY, NULL, values
-
Fields inherited from interface org.apache.solr.request.SolrRequestHandler
TYPE
-
-
Constructor Summary
Constructors Constructor Description SecurityConfHandler(CoreContainer coreContainer)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Collection<Api>getApis()Returns any (non-JAX-RS annotated) APIs associated with this request handler.SolrInfoBean.CategorygetCategory()Category of this componentprotected abstract voidgetConf(SolrQueryResponse rsp, String key)StringgetDescription()Simple one or two line descriptionstatic ListgetListValue(Map<String,Object> lookupMap, String key)static Map<String,Object>getMapValue(Map<String,Object> lookupMap, String key)PermissionNameProvider.NamegetPermissionName(AuthorizationContext ctx)abstract SecurityConfHandler.SecurityConfiggetSecurityConfig(boolean getFresh)Gets security.json from sourcevoidhandleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)protected abstract booleanpersistConf(SecurityConfHandler.SecurityConfig securityConfig)Persist security.json to the source, optionally with a versionBooleanregisterV2()Whether this request handler must be made available at the /v2/ pathprotected voidsecurityConfEdited()Hook where you can do stuff after a config has been edited.-
Methods inherited from class org.apache.solr.handler.RequestHandlerBase
getInitArgs, getMetricsForThisRequest, getName, getPluginInfo, getRequestHandler, getSolrMetricsContext, getSolrParamsFromNamedList, getSubHandler, handleRequest, init, initializeMetrics, isInternalShardRequest, processErrorMetricsOnException, processReceivedException, setPluginInfo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.api.ApiSupport
getJerseyResources, registerV1
-
Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
-
-
-
Field Detail
-
cores
protected CoreContainer cores
-
-
Constructor Detail
-
SecurityConfHandler
public SecurityConfHandler(CoreContainer coreContainer)
-
-
Method Detail
-
getPermissionName
public PermissionNameProvider.Name getPermissionName(AuthorizationContext ctx)
- Specified by:
getPermissionNamein interfacePermissionNameProvider
-
handleRequestBody
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
- Specified by:
handleRequestBodyin classRequestHandlerBase- Throws:
Exception
-
securityConfEdited
protected void securityConfEdited()
Hook where you can do stuff after a config has been edited. Defaults to NOP
-
getConf
protected abstract void getConf(SolrQueryResponse rsp, String key)
-
getMapValue
public static Map<String,Object> getMapValue(Map<String,Object> lookupMap, String key)
-
getDescription
public String getDescription()
Description copied from interface:SolrInfoBeanSimple one or two line description- Specified by:
getDescriptionin interfaceSolrInfoBean- Specified by:
getDescriptionin classRequestHandlerBase
-
getCategory
public SolrInfoBean.Category getCategory()
Description copied from interface:SolrInfoBeanCategory of this component- Specified by:
getCategoryin interfaceSolrInfoBean- Overrides:
getCategoryin classRequestHandlerBase
-
getSecurityConfig
public abstract SecurityConfHandler.SecurityConfig getSecurityConfig(boolean getFresh)
Gets security.json from source
-
persistConf
protected abstract boolean persistConf(SecurityConfHandler.SecurityConfig securityConfig) throws IOException
Persist security.json to the source, optionally with a version- Throws:
IOException
-
getApis
public Collection<Api> getApis()
Description copied from interface:ApiSupportReturns any (non-JAX-RS annotated) APIs associated with this request handler.- Specified by:
getApisin interfaceApiSupport- Overrides:
getApisin classRequestHandlerBase- See Also:
ApiSupport.getJerseyResources()
-
registerV2
public Boolean registerV2()
Description copied from interface:ApiSupportWhether this request handler must be made available at the /v2/ path- Specified by:
registerV2in interfaceApiSupport
-
-