Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1BBB7189A4 for ; Fri, 18 Sep 2015 17:49:31 +0000 (UTC) Received: (qmail 55742 invoked by uid 500); 18 Sep 2015 17:49:27 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 55670 invoked by uid 500); 18 Sep 2015 17:49:27 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 55658 invoked by uid 99); 18 Sep 2015 17:49:26 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2015 17:49:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7C518C0707 for ; Fri, 18 Sep 2015 17:49:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id NFA-bYj0Wg9a for ; Fri, 18 Sep 2015 17:49:14 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 673D420510 for ; Fri, 18 Sep 2015 17:49:14 +0000 (UTC) Received: by oiww128 with SMTP id w128so30508609oiw.2 for ; Fri, 18 Sep 2015 10:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=oDqnsQAR5xzK356ulUKAzLcZr8a0SsVUEZZimXEUvaw=; b=AXYjzkvE6A4N0CetqTjty7z2G0sIuKeRnqL4kgl/ozwZ5Iej2K1xrNAPZYiRs/sRqk t7r2+2VYcG02G6CN6Ldk1+zfjqCnxyO/UDPuOOKZ8Kpmedti1YBjZD0deV9nLm9boyds 4nd/qWuFYpMrEspxkt1STxYWUsj7MDYA8tjd/i/FBqPU8CEviggK5nFiQ7X2HJICbSGR 4ODv432SageXF4LTEWajwvL0Pi1IUzWNmtAVEAFqUX3gDUF/LX6jpH9eWcxZUU7n0fpk baB7jv8QZSKrmGCI/QKnjJc9FHpKcRa/s1gTr6PASj9EKN4HfbvvySdvknTTo2t+WKir qCww== MIME-Version: 1.0 X-Received: by 10.202.73.142 with SMTP id w136mr4256160oia.32.1442598553795; Fri, 18 Sep 2015 10:49:13 -0700 (PDT) Received: by 10.202.49.204 with HTTP; Fri, 18 Sep 2015 10:49:13 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Sep 2015 17:49:13 +0000 Message-ID: Subject: Re: Securing solr 5.2 basic auth permission rules From: Aziz Gaou To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a1134fe145a43150520092682 --001a1134fe145a43150520092682 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Thank you Sanders for your quick reply, I ty now to follow the steps 2015-09-17 19:37 GMT+00:00 Sanders, Marshall (AT - Atlanta) < Marshall.Sanders@autotrader.com>: > So the issue is that when it's stated that solr runs on jetty 9 what it > really means is that it runs on 5% of jetty9 and the other 95% has been > stripped out. (WHYYYY! It's only ~13 MB) > > You'll need to download the appropriate version of jetty and before > starting up do the following > > 1. Copy modules/jaas.mod to the unpacked solr directory server/modules > 2. Copy etc/jetty-jaas.xml to server/etc > 3. Copy the jetty-jaas-.jar to server/lib > 4. Call the following before starting solr: java -jar start.jar > --add-to-startd=3Djaas > > Now when you start solr JAAS will be available and you should be able to > configure it with all of the defaults that you would expect. > http://www.eclipse.org/jetty/documentation/current/jaas-support.html > > > I'll reiterate that I think it's a pretty bad decision to have stripped > out the modules from the version of jetty shipped. Especially since they > won't be loaded into the classloader with the new jetty modules setup. > > > Marshall Sanders > Technical Lead =E2=80=93 Software Engineer > Autotrader.com > 404-568-7130 > > -----Original Message----- > From: Sanders, Marshall (AT - Atlanta) [mailto: > Marshall.Sanders@autotrader.com] > Sent: Thursday, September 17, 2015 2:28 PM > To: solr-user@lucene.apache.org > Subject: RE: Securing solr 5.2 basic auth permission rules > > I'm actually trying to do something similar with 5.3 > > We're in the process of upgrading from 4.10 and were previously using jaa= s > to secure dih pages and a few others and had a config similar to what you > described. > > The Error I get is the following (Might only visible when you change the > log4j startup log level, I didn't check what the default log level is): > > 2015-09-17 11:19:10,121 [main] WARN xml.XmlConfiguration Config error at > > name=3D"Name">SolrRealm name=3D"LoginModuleName">multiloginmodule > > > From what I gather now with jetty 9 the modules have to be enabled > individually: > http://www.eclipse.org/jetty/documentation/current/startup-modules.html > > However: when I run > java -jar start.jar --list-modules > > I only get a few modules as possibilities (server,http,https,ssl). I > tried adding the jetty-jaas jar for the version of jetty with 5.3 to /lib > but I still am not able to figure out how to turn it on as it doesn't sho= w > up in the list. > > I'm much less familiar with jetty than I am with others so I'm still > fumbling a bit here. But it seems we need to: > > 1. Add the jetty-jaas.jar that's missing via an outside script (Also not= e > that if you want ldap you'll have to use an additional jar) 2. Execute th= e > following (java -jar start.jar --add-to-startd=3Djaas) 3. Start the serve= r > (either with your own script or the new ./solr scripts) > > I've got the jar added, but either it's not in the right place (I've got > it in /lib maybe it needs to be in /lib/ext?) or jetty needs to be > configured to recognize it. > > Not sure what the thinking was behind the decision that only people > running solr cloud would want authentication, or even how solr made it to > 5.2 before adding anything in at all! > > We had all this working great in jetty8 solr versions but with the new > jetty9 modules/classloaders it's proving a challenge. > > Marshall Sanders > Technical Lead =E2=80=93 Software Engineer > Autotrader.com > 404-568-7130 > > -----Original Message----- > From: Aziz Gaou [mailto:gaouaziz@gmail.com] > Sent: Thursday, September 17, 2015 5:55 AM > To: solr-user@lucene.apache.org > Subject: Re: Securing solr 5.2 basic auth permission rules > > thank you so much for your reply, > > Now, i try to protect Apache Solr 5 admin with jetty, when I change > > 1) sudo nano /opt/solr/server/etc/webdefault.xml > > > > > > > > > Solr > /* > > > search-role > > > > > BASIC > Solr Realm > > > > > 2) i changed too "*jetty.xml * > " and " > *realm.properties* > " > > 3) the following message will appear on browser: > > - http://localhost:8983/solr/ > > > HTTP ERROR: 503 > > Problem accessing /solr/. Reason: > > Service Unavailable > > ------------------------------ > *Powered by Jetty://* > > > Thanks for your help > > 2015-09-16 18:58 GMT+00:00 Anshum Gupta : > > > Basic authentication (and the API support, that you're trying to use) > > was only released with 5.3.0 so it wouldn't work with 5.2. > > 5.2 only had the authentication and authorization frameworks, and > > shipped with Kerberos authentication plugin out of the box. > > > > There are a few known issues with that though, and a 5.3.1 release is > > just around the corner. > > > > On Wed, Sep 16, 2015 at 10:11 AM, Aziz Gaou wrote: > > > > > Hi, > > > > > > I try to follow: > > > > > > > > https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+ > > Plugin > > > , > > > to protect Solr 5.2 Admin with password, but I have not been able to > > > secure. > > > > > > 1) When I run the following command: > > > > > > curl --user solr:SolrRocks > > http://localhost:8983/solr/admin/authentication > > > -H 'Content-type:application/json'-d '{ > > > "set-user": {"tom" : "TomIsCool" }}' > > > > > > no update on the file security.json > > > > > > 2) I launched the following 2 commands: > > > > > > curl --user solr:SolrRocks > > http://localhost:8983/solr/admin/authorization > > > -H 'Content-type:application/json'-d '{"set-permission": { > > > "name":"updates", "collection":"MyCollection", "role": "dev"}}' > > > > > > curl --user solr:SolrRocks > > http://localhost:8983/solr/admin/authorization > > > -H 'Content-type:application/json' -d '{ "set-user-role": > > {"tom":["dev"}}' > > > > > > always MyCollection is not protected. > > > > > > > > > thank you for your help. > > > > > > > > > > > -- > > Anshum Gupta > > > --001a1134fe145a43150520092682--