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