From users-return-264414-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Wed Apr 11 16:36:18 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 3F7B118064A for ; Wed, 11 Apr 2018 16:36:18 +0200 (CEST) Received: (qmail 91564 invoked by uid 500); 11 Apr 2018 14:36:16 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 91553 invoked by uid 99); 11 Apr 2018 14:36:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2018 14:36:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EA69718061D for ; Wed, 11 Apr 2018 14:36:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.999 X-Spam-Level: X-Spam-Status: No, score=0.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id UjRp4js2Lj_F for ; Wed, 11 Apr 2018 14:36:14 +0000 (UTC) Received: from mailbox.servedge.com (li1281-212.members.linode.com [45.79.182.212]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DF4635F485 for ; Wed, 11 Apr 2018 14:36:13 +0000 (UTC) Received: (qmail 13435 invoked by uid 513); 11 Apr 2018 09:36:07 -0500 Received: from pool-173-66-120-163.washdc.fios.verizon.net (HELO Christophers-iMac.local) (chris@christopherschultz.net@173.66.120.163) by mailbox.servedge.com with ECDHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 11 Apr 2018 09:36:07 -0500 Subject: Re: Virtual directories, PostResources, and DefaultServlet To: users@tomcat.apache.org References: <5ACCDA5F.10009@ice-sa.com> From: Christopher Schultz Openpgp: preference=signencrypt Autocrypt: addr=chris@christopherschultz.net; prefer-encrypt=mutual; keydata= xsFNBE+pgz4BEADd7qAWgqXcNltlB3aow0UneRmNSVjHKgekgs0ZXxG9l50Athksr/3bL/yg bxFB00JcM9W+UxLhKHiMSyzfeBHn9l9wAlLFKs0S91KXTUnRwGFtvgstvGROoqPgTVREklnm yW/KpzOwqSrQ5xHcogaT+XWlXmRbtFypi52Z5HGWlFWWgwx0vKBWHmQayPtCif0v1RDxfdV9 zziodn0TnpfBQsEgf9TDAjkNT8f0ecwTnhSihTDm1W5HCK7Pm5DfUtree1Oh6Ncz2ljlUO0b 3Lai9pX48eZOj7WQXPefkcv2AoUvdELkQKw3klM5YNXbXPf1KAjky+q4DQ1ydD6LkK+9cI3S TeMesTlk/tytOsaN2NH2k87sEpcumbH0AcmPFEnIYUfm4KzWdKlYA6mbV3Pk3tHSuayyJovj h/7Y7BG9p2l7D60r49hzrTPG8VxNkSliNLcSjI3QjYpfhSlqmqXyVKzdzirK1HPr1xfJStig RpLP9nWarZjoXng9N0etGwtH/8roeDPYA8x9ba1KXy/1g/i+RLx2ms+rueCpnFZxU3GZNUSp RfpdUbwCN3Zm1w5Z6SI8X2aSnWWeYzU6HMsV+P4PROnFsgxDeOpyWhyEaaVLXQtOYwcHneHb n56vSG50TkAuHs5kk/3/YDPSsqjsUPOuhKgFMh3iqMTh5DMdSwARAQABzTJDaHJpc3RvcGhl ciBTY2h1bHR6IDxjaHJpc0BjaHJpc3RvcGhlcnNjaHVsdHoubmV0PsLBegQTAQgAJAIbLwUL CQgHAwUVCgkICw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Ewk0+TJ4B0C uvMHwPF3SDH2LeRx+mK2OvwnVulvj2+WdW/rIVgwhwbKmBLj40R+Uq4zD/4iRxJ5PF1ynjxR po3Izp/ZrYWrPgtBg0jUZ8DdlAiRHCFGPpccK8RvBWXmtzF4XQsV39aPBqcE3W6IcTnIMrDi 6mnqealpfiUq+4RGNfRFN9wtgViZLy/FRWi76k+vo/Jmp7/K9JblGX48D2JL9FX0w5PXkpE4 abmY1OASQUiwoJ4n1asxwEonSaWeYbI7X5IqdvevGyfYdSn4VEywdrYGtWjsWlZ/DPofPwsI bQXGY6o+wg9lDAk2L2nVTa05XuyOooUPwKLD0WrLOIxLmcbVv/tgJG03/uI4iDitSofTKnpz E+xdpfFIyw1Mb8PO4WJi0gpHmmLUbG8AMLS+8wSDFwIA4TXQFy9suXXzLuuzML+G5h9Mo5D6 q5HsIe59lhdwk7oEPZJ1NWLfLavTENQg5ObS2YT1KaFskFxxgtcU0aBytAxTjkgGRB8UunXl NJeCuTIAUxXw41P93V4Khigc5dEOG1kEDoq0dAlAE7AbL6Vzc/Go+UwivtUil3sXADOyM9PT JjLNnye+2V0ywQncJ1AG6sxICpPKzv8oYP6xwurEuKnF8DAWEHEwT+Fb277Idv1v8uMGvltp coe7olE0O+TRUtMEwtEp4g4m8ym1rJI/yfwXtHkS8QcVBA9LRqcWEna1VPlT1pk3BSq/1xQa F/4OLScBfV2JbF93sN0SLw== Message-ID: Date: Wed, 11 Apr 2018 10:36:06 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5ACCDA5F.10009@ice-sa.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit André, On 4/10/18 11:38 AM, André Warnier (tomcat) wrote: > Hi. > > On 10.04.2018 15:53, Christopher Schultz wrote: >> All, >> >> I've been asked to take some static files we already have on our >> (reverse-proxied) web servers and require authentication before allowing >> the resources to be fetched by a client. >> >> One way to do that would be to physically (electronically?) move the >> files from the web servers to the application servers, either as a part >> of the web application itself (tricky due to licensing issues of these >> documents) or as a separate set of files in an arbitrary place on the >> disk e.g. using . >> >> Before I do that, I was thinking that maybe I could point >> at a (private) URL that points back to the location >> where these files were already available. I was kind of hoping that >> simply doing > webAppMount="/static" /> or something like that. >> >> It looks like the existing WebResourceSet implementations are all >> disk-based resource providers. >> >> It also seems like writing a simple, read-only, "non-listable" >> implementation of an HTTPResourceSet might work for me. >> >> So I'm looking for opinions on what I should do, here. I might be able >> to hack-together an HttpResourceSet, but it probably won't benefit from >> e.g. range-requests (the files I am serving are PDFs, which often >> benefit from being able to perform range-requests) and might be fragile. >> >> I could move the files to the application servers, but then I need to >> make that a part of my app-server build process and I'd like that to >> remain as simple as possible. >> >> Finally, the files cannot go into revision-control due to licensing >> restrictions, so we basically have to keep them ... "safe" until they >> are deployed. >> >> Any ideas or suggestions? >> > > I know that when you have a hammer, everything looks like a nail but why > not set up a separate Apache httpd webserver for these things, and have > your reverse-proxies direct the calls there for them ? Well, my reverse-proxies are already httpd instances, so there's no need for ANOTHER instance. The problem is that I need Tomcat to enforce authentication/authorization for these resources. The reverse-proxy cannot do that, and neither can some other web server that isn't in communication with Tomcat. Unless there is a mod_is_user_logged_in_to_tomcat that can ping Tomcat to see if a user is indeed logged-in and then only serve the resource if it gets back a positive response. > Or, use URLRewriteFilter to redirect these calls to wherever you want. > I'm saying that because it doesn't really sound like you want to mix > this up too much with your Java apps.. Directing the traffic isn't the problem. Enforcing authentication is. Thanks, -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org