How to setup authentication mechanism in solr 7?ElasticSearch, Sphinx, Lucene, Solr, Xapian. Which fits for which usage?NoSQL (MongoDB) vs Lucene (or Solr) as your databaseHTTP authentication versus cookiesSolr vs. ElasticSearchSpring Webapp behind Apache Web Server - Secured by CASautomating the solr index mechanismJetty/SOLR Admin Panel PasswordHow can I secure Solr 5.3.1 only admin pagesHow to correctly add additional SOLR 5 (vm) nodes to SOLR CloudCan a person add CORS headers using the ELB Application Load Balancer (sitting in front of Solr)?

Can I enter a rental property without giving notice if I'm afraid a tenant may be hurt?

Is it double speak?

Generate a random point outside a given rectangle within a map

Ubuntu show wrong disk sizes, how to solve it?

Whats the difference between <processors> and <pipelines> in Sitecore configuration?

How to realistically deal with a shield user?

Our group keeps dying during the Lost Mine of Phandelver campaign. What are we doing wrong?

Why did the US Airways Flight 1549 passengers stay on the wings?

What are the function of EM and EN spaces?

A verb for when some rights are not violated?

Based on what criteria do you add/not add icons to labels within a toolbar?

How to check a file was encrypted (really & correctly)

If the interviewer says "We have other interviews to conduct and then back to you in few days", is it a bad sign to not get the job?

Could an areostationary satellite help locate asteroids?

How important is it to have a spot meter on the light meter?

How to switch an 80286 from protected to real mode?

In MTG, was there ever a five-color deck that worked well?

If someone else uploads my GPL'd code to Github without my permission, is that a copyright violation?

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

Is the first page of a novel really that important?

Star Trek novel in which the Enterprise-A is sold as surplus and refitted with Klingon technology

Why does putting a dot after the URL remove login information?

The meaning of "scale" in "because diversions scale so easily wealth becomes concentrated"

Not been paid even after reminding the Treasurer; what should I do?



How to setup authentication mechanism in solr 7?


ElasticSearch, Sphinx, Lucene, Solr, Xapian. Which fits for which usage?NoSQL (MongoDB) vs Lucene (or Solr) as your databaseHTTP authentication versus cookiesSolr vs. ElasticSearchSpring Webapp behind Apache Web Server - Secured by CASautomating the solr index mechanismJetty/SOLR Admin Panel PasswordHow can I secure Solr 5.3.1 only admin pagesHow to correctly add additional SOLR 5 (vm) nodes to SOLR CloudCan a person add CORS headers using the ELB Application Load Balancer (sitting in front of Solr)?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have installed solr 7.7 standalone in my production server. I am trying to setup authentication mechanism using jetty approach. This is what I tried:



1.modified “/opt/solr/server/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="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>



  1. created credentials file in /opt/solr/server/etc/realm.properties



    admin: admin123,core



  2. modified /opt/solr/server/etc/webdefault.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>core</role-name>
    </auth-constraint>
    </security-constraint>

    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test Realm</realm-name>
    </login-config>


After this If I restart solr service, solr is not getting started. In the logs I am getting error as:



 Suppressed: java.lang.NoSuchFieldException: refreshInterval
Suppressed: java.lang.NoSuchFieldException: TYPE
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.security.HashLoginService.setRefreshInterval(java.lang.String)









share|improve this question


























  • Any reason why you're not using the built-in authentication?

    – MatsLindh
    Mar 27 at 7:46






  • 1





    I was creating security.json in wrong place. That's why it was not working. Now I am able to get it work.

    – Bhanukiran
    Mar 28 at 3:54

















1















I have installed solr 7.7 standalone in my production server. I am trying to setup authentication mechanism using jetty approach. This is what I tried:



1.modified “/opt/solr/server/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="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>



  1. created credentials file in /opt/solr/server/etc/realm.properties



    admin: admin123,core



  2. modified /opt/solr/server/etc/webdefault.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>core</role-name>
    </auth-constraint>
    </security-constraint>

    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test Realm</realm-name>
    </login-config>


After this If I restart solr service, solr is not getting started. In the logs I am getting error as:



 Suppressed: java.lang.NoSuchFieldException: refreshInterval
Suppressed: java.lang.NoSuchFieldException: TYPE
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.security.HashLoginService.setRefreshInterval(java.lang.String)









share|improve this question


























  • Any reason why you're not using the built-in authentication?

    – MatsLindh
    Mar 27 at 7:46






  • 1





    I was creating security.json in wrong place. That's why it was not working. Now I am able to get it work.

    – Bhanukiran
    Mar 28 at 3:54













1












1








1








I have installed solr 7.7 standalone in my production server. I am trying to setup authentication mechanism using jetty approach. This is what I tried:



1.modified “/opt/solr/server/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="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>



  1. created credentials file in /opt/solr/server/etc/realm.properties



    admin: admin123,core



  2. modified /opt/solr/server/etc/webdefault.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>core</role-name>
    </auth-constraint>
    </security-constraint>

    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test Realm</realm-name>
    </login-config>


After this If I restart solr service, solr is not getting started. In the logs I am getting error as:



 Suppressed: java.lang.NoSuchFieldException: refreshInterval
Suppressed: java.lang.NoSuchFieldException: TYPE
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.security.HashLoginService.setRefreshInterval(java.lang.String)









share|improve this question
















I have installed solr 7.7 standalone in my production server. I am trying to setup authentication mechanism using jetty approach. This is what I tried:



1.modified “/opt/solr/server/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="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>



  1. created credentials file in /opt/solr/server/etc/realm.properties



    admin: admin123,core



  2. modified /opt/solr/server/etc/webdefault.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>core</role-name>
    </auth-constraint>
    </security-constraint>

    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test Realm</realm-name>
    </login-config>


After this If I restart solr service, solr is not getting started. In the logs I am getting error as:



 Suppressed: java.lang.NoSuchFieldException: refreshInterval
Suppressed: java.lang.NoSuchFieldException: TYPE
Suppressed: java.lang.NoSuchMethodException: org.eclipse.jetty.security.HashLoginService.setRefreshInterval(java.lang.String)






apache solr






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 3:49







Bhanukiran

















asked Mar 27 at 3:44









BhanukiranBhanukiran

6883 gold badges16 silver badges52 bronze badges




6883 gold badges16 silver badges52 bronze badges















  • Any reason why you're not using the built-in authentication?

    – MatsLindh
    Mar 27 at 7:46






  • 1





    I was creating security.json in wrong place. That's why it was not working. Now I am able to get it work.

    – Bhanukiran
    Mar 28 at 3:54

















  • Any reason why you're not using the built-in authentication?

    – MatsLindh
    Mar 27 at 7:46






  • 1





    I was creating security.json in wrong place. That's why it was not working. Now I am able to get it work.

    – Bhanukiran
    Mar 28 at 3:54
















Any reason why you're not using the built-in authentication?

– MatsLindh
Mar 27 at 7:46





Any reason why you're not using the built-in authentication?

– MatsLindh
Mar 27 at 7:46




1




1





I was creating security.json in wrong place. That's why it was not working. Now I am able to get it work.

– Bhanukiran
Mar 28 at 3:54





I was creating security.json in wrong place. That's why it was not working. Now I am able to get it work.

– Bhanukiran
Mar 28 at 3:54












1 Answer
1






active

oldest

votes


















1














Create Security file:sudo vim /var/solr/data/security.json




"authentication":
"blockUnknown": true,
"class":"solr.BasicAuthPlugin",
"credentials":"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
,
"authorization":
"class":"solr.RuleBasedAuthorizationPlugin",
"permissions":["name":"security-edit",
"role":"admin"],
"user-role":"solr":"admin"



This will create user called "solr" with password SolrRocks



Then Restart solr service:sudo service solr restart



Verification:http://<ip_address>:8983/solr/admin/authentication






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369465%2fhow-to-setup-authentication-mechanism-in-solr-7%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Create Security file:sudo vim /var/solr/data/security.json




    "authentication":
    "blockUnknown": true,
    "class":"solr.BasicAuthPlugin",
    "credentials":"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
    ,
    "authorization":
    "class":"solr.RuleBasedAuthorizationPlugin",
    "permissions":["name":"security-edit",
    "role":"admin"],
    "user-role":"solr":"admin"



    This will create user called "solr" with password SolrRocks



    Then Restart solr service:sudo service solr restart



    Verification:http://<ip_address>:8983/solr/admin/authentication






    share|improve this answer





























      1














      Create Security file:sudo vim /var/solr/data/security.json




      "authentication":
      "blockUnknown": true,
      "class":"solr.BasicAuthPlugin",
      "credentials":"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
      ,
      "authorization":
      "class":"solr.RuleBasedAuthorizationPlugin",
      "permissions":["name":"security-edit",
      "role":"admin"],
      "user-role":"solr":"admin"



      This will create user called "solr" with password SolrRocks



      Then Restart solr service:sudo service solr restart



      Verification:http://<ip_address>:8983/solr/admin/authentication






      share|improve this answer



























        1












        1








        1







        Create Security file:sudo vim /var/solr/data/security.json




        "authentication":
        "blockUnknown": true,
        "class":"solr.BasicAuthPlugin",
        "credentials":"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
        ,
        "authorization":
        "class":"solr.RuleBasedAuthorizationPlugin",
        "permissions":["name":"security-edit",
        "role":"admin"],
        "user-role":"solr":"admin"



        This will create user called "solr" with password SolrRocks



        Then Restart solr service:sudo service solr restart



        Verification:http://<ip_address>:8983/solr/admin/authentication






        share|improve this answer













        Create Security file:sudo vim /var/solr/data/security.json




        "authentication":
        "blockUnknown": true,
        "class":"solr.BasicAuthPlugin",
        "credentials":"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
        ,
        "authorization":
        "class":"solr.RuleBasedAuthorizationPlugin",
        "permissions":["name":"security-edit",
        "role":"admin"],
        "user-role":"solr":"admin"



        This will create user called "solr" with password SolrRocks



        Then Restart solr service:sudo service solr restart



        Verification:http://<ip_address>:8983/solr/admin/authentication







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 3:53









        BhanukiranBhanukiran

        6883 gold badges16 silver badges52 bronze badges




        6883 gold badges16 silver badges52 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369465%2fhow-to-setup-authentication-mechanism-in-solr-7%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현