From solr-user-return-139644-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Wed Mar 7 21:01:37 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 27115180656 for ; Wed, 7 Mar 2018 21:01:36 +0100 (CET) Received: (qmail 66941 invoked by uid 500); 7 Mar 2018 20:01:35 -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 66485 invoked by uid 99); 7 Mar 2018 20:01:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2018 20:01:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CB3B1C6A96 for ; Wed, 7 Mar 2018 20:01:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.002 X-Spam-Level: X-Spam-Status: No, score=-0.002 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=gnsnz.onmicrosoft.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id JY6f5VvejJ4s for ; Wed, 7 Mar 2018 20:01:31 +0000 (UTC) Received: from AUS01-ME1-obe.outbound.protection.outlook.com (mail-me1aus01on0117.outbound.protection.outlook.com [104.47.116.117]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3B6D55FAC6 for ; Wed, 7 Mar 2018 20:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gnsnz.onmicrosoft.com; s=selector1-gns-cri-nz; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mRsJhCD4sxIK2+nqK8wJthySNAcCMmglx88yduOo6jg=; b=FrH1InVtNLjjb+9kGtgNloVyPIAwApuz/2GKZHW1L0SNRjoEUgduTjDUCuK/WhYlKk8/56BIfwfSeaw/Ail/XMcSyiyJXx7zYQUnx4Gmm0/QtYC9B7x41oRT2nahGkvwpy8DWnNd3keiJqG/ZoIRq0HFmP9aN+Th6AEye+Cm2EU= Received: from ME1PR01MB1537.ausprd01.prod.outlook.com (10.171.10.13) by ME1PR01MB1923.ausprd01.prod.outlook.com (10.171.13.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Wed, 7 Mar 2018 20:01:20 +0000 Received: from ME1PR01MB1537.ausprd01.prod.outlook.com ([fe80::b573:daa2:c536:acf0]) by ME1PR01MB1537.ausprd01.prod.outlook.com ([fe80::b573:daa2:c536:acf0%6]) with mapi id 15.20.0567.012; Wed, 7 Mar 2018 20:01:20 +0000 From: Phil Scadden To: "solr-user@lucene.apache.org" Subject: RE: Solr Read-Only? Thread-Topic: Solr Read-Only? Thread-Index: AQHTtY9deDogpSVgw0Wr1SyanrapZaPDts2AgAAJrACAAL8MgIAAsnyQ Date: Wed, 7 Mar 2018 20:01:20 +0000 Message-ID: References: <8a2a4a84-b0e5-e3c3-a8d6-eb72bdd6b7a8@christopherschultz.net> <804d5be1-f2bf-11ff-7dfd-c45fb5eff44a@net-frame.com> <23825ECA-A16B-4C2A-B10D-53ED4C67B93D@sematext.com> In-Reply-To: <23825ECA-A16B-4C2A-B10D-53ED4C67B93D@sematext.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=P.Scadden@gns.cri.nz; x-originating-ip: [161.65.53.92] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;ME1PR01MB1923;7:0TJR8ee14wuNljbQe7Q8nYwvNfOW2akF5Ps1vN0ycTS8YLmqBZPOqyaEv6hqHJNtTauMtXpa3WRTFLmy9lFm9ewi7KBLVyZ4EIs7esSN5gfeHa75rHeqyMhyj8mP8Qsiy4xsnSaVs2ZR4WXsc7hyT9EDdjMjTBsilngdRXK0hacwzqKb5D4JYwgwQ5010DATm7HyvzIx+Nbj/dtRjNcWCkUdg+4NvH2px39reEu7tnTRGu5ExztYybyqHQL7gYG2 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 695bda2a-8248-4e43-4142-08d58466324c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:ME1PR01MB1923; x-ms-traffictypediagnostic: ME1PR01MB1923: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(263907834895145)(72170088055959); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231220)(944501244)(52105095)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:ME1PR01MB1923;BCL:0;PCL:0;RULEID:;SRVR:ME1PR01MB1923; x-forefront-prvs: 0604AFA86B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39850400004)(396003)(366004)(39380400002)(376002)(52314003)(13464003)(189003)(199004)(7696005)(59450400001)(6506007)(5660300001)(74482002)(86362001)(53546011)(55016002)(76176011)(102836004)(2906002)(3280700002)(2351001)(5640700003)(105586002)(6436002)(106356001)(81166006)(8936002)(81156014)(6306002)(66066001)(8676002)(9686003)(229853002)(68736007)(2900100001)(14454004)(478600001)(72206003)(99286004)(25786009)(966005)(7736002)(33656002)(2501003)(97736004)(53936002)(74316002)(3660700001)(26005)(316002)(53376002)(186003)(305945005)(3846002)(6116002)(93886005)(5890100001)(2950100002)(6916009)(5250100002)(6246003);DIR:OUT;SFP:1102;SCL:1;SRVR:ME1PR01MB1923;H:ME1PR01MB1537.ausprd01.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: gns.cri.nz does not designate permitted sender hosts) x-microsoft-antispam-message-info: 4wQXoyNG8qFBjdMDtIDWak6sTfeoOn/YomVa9GL2ab25M+PpK/SB/Toxo/vRIu7WVwshgPi0jpsksOL0mQ6ztPyw5PFC6H+mHtUhdaMh9Zbw23ZE5pzdxpeuANB3oovkIMJZRJ13XWvpKHOETnItWl1gAURJd6iuK3wl9LHExq9BUoVI2KlrLNp43IXy7xdjPr4ghr8To9bbVtAwDp6MTNj7DFFQcxTm03m5zph+vdcAvKOpefU0W5hUBVN0Stbmk/mpWLgSi5BJLJp9yDVcUzrLjwfDyCQZsdUVErSDjWLj3V4oOhB16/55ADpt38vsVjpaHjbQj85KZpBvHnywug== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: gns.cri.nz X-MS-Exchange-CrossTenant-Network-Message-Id: 695bda2a-8248-4e43-4142-08d58466324c X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2018 20:01:20.7151 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f607a494-56fb-4073-8fc5-6daa9c5d38d7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME1PR01MB1923 I would also second the proxy approach. Beside keeping your solr instance b= ehind a firewall and not directly exposed, you can do a lot in a proxy. Per= -user control over which index they are access, filtering of queries, etc. -----Original Message----- From: Emir Arnautovi=E6 [mailto:emir.arnautovic@sematext.com] Sent: Wednesday, 7 March 2018 10:19 p.m. To: solr-user@lucene.apache.org Subject: Re: Solr Read-Only? Hi Terry, Maybe you can try alternative approaches like putting some proxy in front o= f Solr and configure it to let only certain URLs. Other option is to define= custom update request processor chain that will not include RunUpdateProce= ssorFactory - that will prevent accidental index updates. HTH, Emir -- Monitoring - Log Management - Alerting - Anomaly Detection Solr & Elasticse= arch Consulting Support Training - http://sematext.com/ > On 6 Mar 2018, at 22:55, Terry Steichen wrote: > > Chris, > > Thanks for your suggestion. Restarting solr after an in-memory > corruption is, of course, trivial (compared to rebuilding the indexes). > > Are there any solr directories that MUST be read/write (even with a > pre-built index)? Would it suffice (for my purposes) to make only the > data/index directory R-O? > > Terry > > > On 03/06/2018 04:20 PM, Christopher Schultz wrote: >> Terry, >> >> On 3/6/18 4:08 PM, Terry Steichen wrote: >>> Is it possible to run solr in a read-only directory? >> >>> I'm running it just fine on a ubuntu server which is accessible only >>> through SSH tunneling. At the platform level, this is fine: >>> only authorized users can access it (via a browser on their machine >>> accessing a forwarded port). >> >>> The problem is that it's an all-or-nothing situation so everyone >>> who's authorized access to the platform has, in effect, >>> administrator privileges on solr. I understand that authentication >>> is coming, but that it isn't here yet. (Or, to add complexity, I >>> had to downgrade from 7.2.1 to 6.4.2 to overcome a new bug >>> concerning indexing of eml files, and 6.4.2 definitely doesn't have >>> authentication.) >> >>> Anyway, what I was wondering is if it might be possible to run solr >>> not as me (the administrator), but as a user with lesser privileges >>> so that no one who came through the SSH tunnel could (inadvertently >>> or otherwise) screw up the indexes. >> >> With shell access, the only protection you could provide would be >> through file-permissions. But of course Solr will need to be >> read-write in order to build the index in the first place. So you'd >> probably have to run read-write at first, build the index (perhaps >> that's already been done in the past), then (possibly) restart in >> read-only mode. >> >> Read-only can be achieved by simply revoking write-access to the data >> directories from the euid of the Solr process. Theoretically, you >> could switch from being read-write to read-only merely by changing >> file-permissions... no Solr restarts required. >> >> I'm not sure if it matters to you very much, but a user can still do >> some damage to the index even if the "server" is read-only (through >> file-permissions): they can issue a batch of DELETE or ADD requests >> that will effect the in-memory copies of the index. It might be >> temporary, but it might require that you restart the Solr instance to >> get back to a sane state. >> >> Hope that helps, >> -chris >> > Notice: This email and any attachments are confidential and may not be used= , published or redistributed without the prior written consent of the Insti= tute of Geological and Nuclear Sciences Limited (GNS Science). If received = in error please destroy and immediately notify GNS Science. Do not copy or = disclose the contents.