1

we have followed answer2 steps in this link, it is not working for Solr Cloud 6.0.3 environment.

How to set Apache solr admin password

But it is working fine in normal Master/Slave.

Community
  • 1
  • 1
User1203
  • 77
  • 2
  • 11

1 Answers1

1

In SolrCloud mode you should use the built-in Authentication and Authorization support.

You enable it by uploading a security.json file to your Zookeeper ensemble:

{
"authentication":{
   "blockUnknown": true,
   "class":"solr.BasicAuthPlugin",
   "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
   "class":"solr.RuleBasedAuthorizationPlugin",
   "permissions":[{"name":"security-edit",
      "role":"admin"}],
   "user-role":{"solr":"admin"}
}}

There are several different authentication plugins available - the example is from the BasicAuthentication module.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
  • Changing security-edit to all in permissions, will restrict everything. "permissions":[{"name":"all", – User1203 Dec 09 '16 at 14:10
  • @MastLindh , I am trying to implement solr authentication. I am using solrcloud. I have uploaded above security.json to zookeeper, but still admin page doesn't ask any username,password. Should I create a separate usermane, password and role in any file – Muthu Prasanth Jan 17 '19 at 07:26
  • @MuthuPrasanth The comments is not the place to ask a new question - if you have a question, ask a new question. That way more people will see it and you might get a proper response. Make sure to include the necessary information about what you've tried and what any errors are (check the logs). – MatsLindh Jan 17 '19 at 08:35
  • @MatsLindh I have created a separate question. https://stackoverflow.com/questions/54240237/solr-deletes-already-created-shards-when-changing-memory-size. please give your suggestion there asap.I can't figure out nearly past 2 days, expecting your help – Muthu Prasanth Jan 18 '19 at 11:52