remove documents.
{
"authentication": {
"blockUnknown":true,
"class":"solr.BasicAuthPlugin",
"credentials": {
"teampage-solr": "Fto50H+i454wYzPlJwQg4casHdhxJYJ4GwEEAmcFAMk= K14PVBV8zYZt3eDY3aNracVkzc0lLvAweSsZcsNngNY="
},
"realm": "Solr Users",
"forwardCredentials":false,
"":{"v":3}
},
"authorization":{
"class":"solr.RuleBasedAuthorizationPlugin",
"permissions": [
{
"name":"security-edit",
"role":"admin"
},
{
"name":"security-read",
"role":"admin"
},
{
"name":"all",
"role":"admin"
}
],
"user-role": { "teampage-solr": "admin" }
}
}
If you're creating custom accounts that use basic authentication, note that the password value for the user name must be expressed in a special form:
base64(SHA256(password+salt)) [space] base64(salt)
You can do this yourself with off-the-shelf utilities built into (or at least optionally available) with most operating systems, but TeamPage's Solr plug-in includes a GenerateSolrPassword
utility program to do it for you. You can run it on a password of your choice to generate the required form (the salt will be created for you randomly).
You'll need the GenerateSolrPassword.class
file from the TeamPage Solr plug-in's etc/solr/util folder, e.g., C:\Program Files\Traction\traction\server\plugins\com.traction.extsearch.solr\etc\solr\util
.; and the commons-codec.jar
file from the main TeamPage lib folder, e.g., C:\Program Files\Traction\traction\server\lib
.
In this example, the TeamPage installation and the Solr installation are located on the same host, so we'll just reference those two files where they are; the TeamPage installation is located at C:\Traction
; and the password is MyBadP@$$w0rd#654
:
C:\Traction\traction\server\plugins\com.traction.extsearch.solr\etc\solr\util>C:\Traction\jre\bin\java.exe -cp C:\Traction\traction\server\lib\commons-codec.jar;. GenerateSolrPassword "MyBadP@$$w0rd#654"
lTC0a6YWCAYTP0FWTZocRqdX10tifZMQbRAqBwRPYH0= 5m2r0s3Vz2wr8Q67L+6b+L6eTgM1D8Lr6zCsOAHv1Ys=
We can take the resulting output from this command use it as the password encoding for the teampage-solr
user:
"authentication": {
"blockUnknown":true,
"class":"solr.BasicAuthPlugin",
"credentials": {
"teampage-solr": "lTC0a6YWCAYTP0FWTZocRqdX10tifZMQbRAqBwRPYH0= 5m2r0s3Vz2wr8Q67L+6b+L6eTgM1D8Lr6zCsOAHv1Ys=
"
},
...
},
...
If you wish, you can also pick a custom user name and substitute that name into security.json.
Make sure to make a note of the user name and the password you used because you'll need them later (both to specify them in TeamPage Solr setup, and to access Solr's admin UI in your browser).
When you're done modifying security.json, it must be installed. Since TeamPage's turnkey Solr installers set the Solr service up in Cloud mode, to support horizontal scaling, you will need to upload security.json to Solr's ZooKeeper service, which Solr uses to store configuration data.
You can do this with the bin/solr command on *nix or bin/solr.cmd for Windows, e.g., with Solr installed at C:\Solr
and the security.json file in the C:\
folder:
C:\Solr\solr>bin\solr.cmd zk cp C:\security.json zk:security.json -z localhost:9983
Attachments:
security-admin.png
Article: solrsearch59 (
permalink)
Date: April 11, 2024; 3:32:23 PM Eastern Daylight Time
Author Name: Dave Shepperton
Author ID: shep