[ 
https://issues.apache.org/jira/browse/SOLR-6607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Noble Paul updated SOLR-6607:
-----------------------------
    Description: 
The concept of solrconfig editing is split into multiple pieces . This issue is 
about registering components and uploading binaries through an API.

This supports multiple operations

 * Upload a jar file which can be used later in a plugin configuration. The jar 
file will be stored in a special collection called \_system_ or ( in  a core 
called \_system_ in a standalone solr) as a binary field .
 * commands  'create-requesthandle', 
"update-request-handler","delete-requesthandler"  which can set the 
configuration of a component . This configuration will be saved inside the 
configoverlay.json



The components can be registered from a jar file that is available in the 
classpath of all nodes. Registering of components from uploaded jars will only 
be possible if systems are started with an option -DloadRuntimeLibs (Please 
suggest a better name) . The objective is to be able to completely disable this 
feature by default and but can only be enabled by a user with file system 
access. Any system which can load remote libraries are a security hole and a 
lot of organizations would want to disable this 

example for registering a component
{code}
curl http://localhost:8983/solr/collection1/config -H  -d '{
"create-request-handler" : {"name": "/mypath" , 
"class":"com.mycomponent.ClassName" ,"location":"_system:mycomponent" 
"version"=2, "defaults":{"x":"y"
                                    "a":"b"}
}'
{code}

loading the binary to solr 

{code}
curl http://localhost:8983/solr/_system/jar?name=mycomponent   --data-binary 
"@myselfcontainigcomponent.jar" 
{code}

  was:
The concept of solrconfig editing is split into multiple pieces . This issue is 
about registering components and uploading binaries through an API.

This supports multiple operations

 * Upload a jar file which can be used later in a plugin configuration. The jar 
file will be stored in a special collection called \_system_ or ( in  a core 
called \_system_ in a standalone solr) as a binary field .
 * command  'set-configuration'  which can set the configuration of a component 
. This configuration will be saved inside the configoverlay.json
* command  "remove-configuration" . which can remove a plugin configuration 
from the configoverlay.json and not from solrconfig.xml


The components can be registered from a jar file that is available in the 
classpath of all nodes. Registering of components from uploaded jars will only 
be possible if systems are started with an option -DloadRuntimeLibs (Please 
suggest a better name) . The objective is to be able to completely disable this 
feature by default and but can only be enabled by a user with file system 
access. Any system which can load remote libraries are a security hole and a 
lot of organizations would want to disable this 

example for registering a component
{code}
curl http://localhost:8983/solr/collection1/config -H  -d '{
"create-request-handler" : {"name": "/mypath" , 
"class":"com.mycomponent.ClassName" ,"location":"_system:mycomponent" 
"version"=2, "defaults":{"x":"y"
                                    "a":"b"}
}'
{code}

loading the binary to solr 

{code}
curl http://localhost:8983/solr/_system/jar?name=mycomponent   --data-binary 
"@myselfcontainigcomponent.jar" 
{code}


> Registering pluggable components through API
> --------------------------------------------
>
>                 Key: SOLR-6607
>                 URL: https://issues.apache.org/jira/browse/SOLR-6607
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>
> The concept of solrconfig editing is split into multiple pieces . This issue 
> is about registering components and uploading binaries through an API.
> This supports multiple operations
>  * Upload a jar file which can be used later in a plugin configuration. The 
> jar file will be stored in a special collection called \_system_ or ( in  a 
> core called \_system_ in a standalone solr) as a binary field .
>  * commands  'create-requesthandle', 
> "update-request-handler","delete-requesthandler"  which can set the 
> configuration of a component . This configuration will be saved inside the 
> configoverlay.json
> The components can be registered from a jar file that is available in the 
> classpath of all nodes. Registering of components from uploaded jars will 
> only be possible if systems are started with an option -DloadRuntimeLibs 
> (Please suggest a better name) . The objective is to be able to completely 
> disable this feature by default and but can only be enabled by a user with 
> file system access. Any system which can load remote libraries are a security 
> hole and a lot of organizations would want to disable this 
> example for registering a component
> {code}
> curl http://localhost:8983/solr/collection1/config -H  -d '{
> "create-request-handler" : {"name": "/mypath" , 
> "class":"com.mycomponent.ClassName" ,"location":"_system:mycomponent" 
> "version"=2, "defaults":{"x":"y"
>                                     "a":"b"}
> }'
> {code}
> loading the binary to solr 
> {code}
> curl http://localhost:8983/solr/_system/jar?name=mycomponent   --data-binary 
> "@myselfcontainigcomponent.jar" 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to