I am applying authentication on SOLR Admin Panel using jetty. I have read so many tutorials and implemented using following steps:
Added following code in /solr/core/etc/jetty.xml :
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/var/www/solr/core/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>
Added following code in /solr/core/solr-webapp/webapp/WEB-INF/web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>Solr authenticated application</web-resource-name>
<url-pattern>/*</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>Test Realm</realm-name>
</login-config>
And then created file realm.proprerties file in solr/core/etc with following line of code:
admin: OBF:1y0s1v1p1v2p1y0y, admin
But when I open solr admin panel using URL http://localhost:8983/solr/. I got a popup asking username and password. I fill username and password as I have added in realm.properties. But unable to login.
Please help me figuring out where I am wrong.