我正在嘗試在Solr 5.0雲上使用Solr安全性。以下過程我已經使用: - 1.修改的web.xml: -Solr雲安全無法用於內部身份驗證
<security-constraint>
<web-resource-collection>
<web-resource-name>AdminAllowedQueries</web-resource-name>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint> </security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Solr Realm</realm-name></login-config>
<security-role>
<description>Admin</description>
<role-name>admin</role-name> </security-role>
變化的jetty.xml: -
<Call name="addBean"> <Arg> <New class="org.eclipse.jetty.security.HashLoginService"> <Set name="name">Solr Realm</Set> <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set> <Set name="refreshInterval">0</Set> </New> </Arg> </Call>
創建realm.properties:-
solradmin: solradmin,admin
集SOLR OPTS在solr.in.sh:-
SOLR_OPTS = 「$ SOLR_OPTS -DinternalAuthCredentialsBasicAuthUsername = solradmin」 SOLR_OPTS = 「$ SOLR_OPTS -DinternalAuthCredentialsBasicAuthPassword = solradmin」
,而使用創建集合我得到未經授權的錯誤以下命令: -
localhost:8080/solr/admin/collections?action=CREATE&name=test&collection.configName=testconf&numShards=1
請幫助或建議最好的解決辦法。
Thanx提前。
你有沒有得到一個答案?我的雲運行良好,但是當我添加基本身份驗證時,如上所述,我只能在羣集中運行一個Solr節點 - 另一個永久停留在「正在恢復」。 – LandonC 2015-06-11 19:39:12
我遇到了同樣的問題。你們有沒有找到解決方案? – merlin 2015-09-11 11:57:09
沒有找到任何相關答案,所以目前我沒有使用身份驗證。 – Swaraj 2015-09-16 05:45:02