Created
June 2, 2017 18:42
-
-
Save shawnfeldman/2cfb45b87cd301dec3edcf8840e878f5 to your computer and use it in GitHub Desktop.
solr basic auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /opt/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost $ZK -cmd put /security.json '{"authentication": {"class": "solr.BasicAuthPlugin","blockUnknown": false,"credentials": {"solr": "J0IbXqNMOsK6fvu3EseKuMiBiXAeRo51a6OoJBEbPEU= yLhT0cqEvO7CCkBUEZSDBQgTT/50CbfW0WjjC2YZchc="}},"authorization": {"class": "solr.RuleBasedAuthorizationPlugin","permissions": [{"name": "security-edit","role": "admin"}],"user-role": {"solr": "admin"}}}' | |
| sleep 5 | |
| curl --insecure -v http://solr:admin@localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -d "{ 'set-user': {'$SOLRUSER': '$SOLRPASSWORD'}}" | |
| sleep 5 | |
| curl --insecure -v http://$SOLRUSER:$SOLRPASSWORD@localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -d "{'set-property': {'blockUnknown':true}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment