Re: How to configure authentication in windows start script?

2016-01-14 Thread Kristine Jetzke
>
> In the Linux script is an option called AUTHC_CLIENT_CONFIGURER_ARG but I
> don't find anything similar for Windows...
>

I just realized that this option is not used anyway for the status check
during startup. Any ideas how a solution would look like to make the status
check pass on Windows when authentication is enabled? I would be happy to
provide a patch.


How to configure authentication in windows start script?

2016-01-13 Thread Kristine Jetzke
Hi,

I am using an authentication plugin in my Solr 5.4 standalone installation
running on Windows. How do I pass authentication options to the start
script? In the Linux script is an option called AUTHC_CLIENT_CONFIGURER_ARG
but I don't find anything similar for Windows...

Thanks,

tine


Custom auth plugin not loaded in SolrCloud

2015-12-16 Thread Kristine Jetzke
Hi,
 
I'm trying to include a custom authentication plugin in my SolrCloud 
installation. It only works when I add it to 
server\solr-webapp\webapp\WEB-INF\lib or to the solr home directory of each 
node. 
 
If I add it as described here 
https://cwiki.apache.org/confluence/display/solr/Adding+Custom+Plugins+in+SolrCloud+Mode[https://3c.gmx.net/mail/client/dereferrer?redirectUrl=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2Fsolr%2FAdding%2BCustom%2BPlugins%2Bin%2BSolrCloud%2BMode]
 it cannot find my class at all. What I did:
- Started node with enable runtime libe flag: solr start -cloud -s "my-dir" -z 
localhost:2181 -Denable.runtime.lib=true
- Created .system collection as described here: 
https://cwiki.apache.org/confluence/display/solr/Blob+Store+API[https://3c.gmx.net/mail/client/dereferrer?redirectUrl=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2Fsolr%2FBlob%2BStore%2BAPI]
- Uploaded jar as described here: 
https://cwiki.apache.org/confluence/display/solr/Blob+Store+API[https://3c.gmx.net/mail/client/dereferrer?redirectUrl=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2Fsolr%2FBlob%2BStore%2BAPI]
- Added jar as runtime lib to my collection as described here: 
https://cwiki.apache.org/confluence/display/solr/Adding+Custom+Plugins+in+SolrCloud+Mode[https://3c.gmx.net/mail/client/dereferrer?redirectUrl=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2Fsolr%2FAdding%2BCustom%2BPlugins%2Bin%2BSolrCloud%2BMode]
- Checked in configoverlay.json that jar was added
 
I had a brief look at the code and noticed that 
org.apache.solr.core.CoreContainer.initializeAuthorizationPlugin(Map) uses the SolrResourceLoader to load the plugin. However, in the wiki 
it says that "The default SolrResourceLoader does not have visibility to the 
jars that have been defined as runtime libraries."
 
Is there anything I can do to make it work?
 
Thanks,
 
tine


Von meinem iPhone gesendet

API accessible without authentication even though Basic Auth Plugin is enabled

2015-12-11 Thread Kristine Jetzke
Hi,

I noticed that it is possible to access the API even if the Basic Auth plugin 
is enabled. Is that a known issue/done on purpose? I didn’t find anything in 
JIRA or the docs.

What I did:
- Started zookeeper on port 2181 and uploaded security.json from 
https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin 

- Started Solr cluster using cloud example: bin/solr start -e cloud -c -z 
localhost:2181
- Executed the following commands:
- curl -u solr:SolrRocks 
'http://localhost:8983/solr/gettingstarted_shard1_replica1/select?q=*%3A*&wt=json&indent=true':
 Returns 200 as expected
- curl -u solr:wrongPassword 
'http://localhost:8983/solr/gettingstarted_shard1_replica1/select?q=*%3A*&wt=json&indent=true':
 Returns 401 as expected
- curl 
'http://localhost:8983/solr/gettingstarted_shard1_replica1/select?q=*%3A*&wt=json&indent=true':
 Returns 200 even though no Authorization header is set.

I don’t understand why the last part works like it does. If I don’t give 
credentials, I would expect that the behavior is the same as with invalid 
credentials. Is there a special reason why it behaves like this? I’m wondering 
because I’m working on a custom authentication plugin and was looking into the 
existing ones to understand how they work.

Thanks,

tine