Configure Basic Authentication for Solr (Standalone Mode)
Basic authentication is automatically configured with the user name and password provided at the time of installation. This section describes how to configure the basic authentication manually, if required.
1. Stop Solr using the following commands:
Windows
<INDEX_SEARCH_HOME>/bin/Index_Search_Server.bat stop
Unix
sh <INDEX_SEARCH_HOME>/bin/Index_Search_Server.sh stop
2. Create security.json file at location <INDEX_SEARCH_HOME>/solr/server/solr.
{"authorization":{"user-role":{"solr":"admin"},"permissions":[{"role":"admin","name":"security-edit"},{"role":"admin","name":"restrict_collections"},{"role":"admin","name":"restrict_select"},{"role":"admin","name":"restrict_update"},{"role":"admin","name":"read"}],"class":"solr.RuleBasedAuthorizationPlugin"},"authentication":{"credentials":{"solr":"QYZUoPfBdxuI5uj/kUtzzq1vd8PzVly4w4Tb2ex7AFs= Pf23jNAILqwXhFr0KryubbQKgbUTVshXUf+vb6kNpgc="},"blockUnknown":true,"class":"solr.BasicAuthPlugin"}}
3. Start Solr using the following commands:
Windows
<INDEX_SEARCH_HOME>/bin/Index_Search_Server.bat start
Unix
sh <INDEX_SEARCH_HOME>/bin/Index_Search_Server.sh start
4. Open the Solr administrator interface and verify that you are prompted for a username and password:
http://<SOLR_HOSTNAME>:<SOLR_PORT>/solr
Changing the Solr User or Password
When you change the Solr user or password, you must update both the Windchill Index Search client and server.
1. Open a Windchill shell and execute the following commands to change the password or user for the Windchill Index Search client:
xconfmanager -s wt.index.solrAdminUser=<New_User> -t codebase/WEB-INF/conf/index.solrAuth.properties -p
xconfmanager -s wt.index.solrAdminPassword=<New_Password> -t codebase/WEB-INF/conf/index.solrAuth.properties -p
2. Restart Windchill.
3. From a command prompt, navigate to <INDEX_SEARCH_HOME>/bin and execute the following commands to change the password or user for the Windchill Index Search server:
Windows:
xconfmanager -s wt.index.server.solrAdminUser=<New_User> -t config/solrserver.properties -p
xconfmanager -s wt.index.server.solrAdminPassword=<New_Password> -t config/solrserver.properties -p
Unix:
sh xconfmanager -s wt.index.server.solrAdminUser=<New_User> -t config/solrserver.properties -p
sh xconfmanager -s wt.index.server.solrAdminPassword=<New_Password> -t config/solrserver.properties -p
4. Restart Solr.
Isto foi útil?