Andrew Fletcher 18 January 2022 1 minute read
Adding basic security to your server, requires altering the security.json file. For me this file was located
/var/solr/data/
Add a User or Edit a Password
The set-user command allows you to add users and change their passwords. For example, the following defines two users and their passwords:
curl --user solr:SolrRocks http://localhost:8983/api/cluster/security/authentication -H 'Content-type:application/json' -d '{"set-user": {"andrew":"andrewsPass"}}'
Delete a User
The delete-user command allows you to remove a user. The user password does not need to be sent to remove a user. In the following example, we’ve asked that user IDs 'andrew' and 'harry' be removed from the system.
curl --user solr:SolrRocks http://localhost:8983/api/cluster/security/authentication -H 'Content-type:application/json' -d '{"delete-user": ["andrew"]}'
Set a Property
Set properties for the authentication plugin. The currently supported properties for the Basic Authentication plugin are blockUnknown, realm and forwardCredentials.
curl --user solr:SolrRocks http://localhost:8983/api/cluster/security/authentication -H 'Content-type:application/json' -d '{"set-property": {"blockUnknown":false}}'
Success response
A successful response will look like
{ "responseHeader": { "status":0, "QTime":4}}
Related articles
Andrew Fletcher
•
06 Jan 2023
How to set Apache Solr admin password
Setting up the admin password.
Process:
1. Edit jetty.xml
To begin you are going to edit the file “server/etc/jetty.xml”. However, if you aren't sure of the location of jetty.xml, run the command
find / -name jetty.xml -type f
For me, the output...
Andrew Fletcher
•
17 Aug 2022
How To Install Apache Solr 8.11 on Ubuntu
In this article I'll walk through the steps I went through to install Solr on Ubuntu.
Step 1: Java
Check if Java is installed on your server:
java -version
Not there - then Java is the first step for you to set up for Solr. JAVA SE 8 or Later is required to run...
Andrew Fletcher
•
17 Aug 2022
How To Install Apache Solr 8.11 on CentOS/RHEL 7
Looking to install Solr on your server? Not sure if it worth the effort? Well, Apache Solr is the open-source, popular, super fast open source enterprise search platform from the Apache Lucene project. Written in Java, Solr is highly scalable, providing fault-tolerant distributed...