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;
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>
created credentials file in /opt/solr/server/etc/realm.properties
admin: admin123,core
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
add a comment |
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>
created credentials file in /opt/solr/server/etc/realm.properties
admin: admin123,core
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
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
add a comment |
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>
created credentials file in /opt/solr/server/etc/realm.properties
admin: admin123,core
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
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>
created credentials file in /opt/solr/server/etc/realm.properties
admin: admin123,core
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
apache solr
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
answered Mar 28 at 3:53
BhanukiranBhanukiran
6883 gold badges16 silver badges52 bronze badges
6883 gold badges16 silver badges52 bronze badges
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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