Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@locus.apache.org Received: (qmail 96939 invoked from network); 21 Jan 2008 21:05:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jan 2008 21:05:03 -0000 Received: (qmail 32829 invoked by uid 500); 21 Jan 2008 21:04:53 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 32813 invoked by uid 500); 21 Jan 2008 21:04:53 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 32804 invoked by uid 99); 21 Jan 2008 21:04:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 13:04:53 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [17.148.16.82] (HELO smtpoutm.mac.com) (17.148.16.82) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 21:04:39 +0000 Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout019/MantshX 4.0) with ESMTP id m0LL4Vwx001590 for ; Mon, 21 Jan 2008 13:04:31 -0800 (PST) Received: from [10.155.95.198] (mobile-032-141-125-236.mycingular.net [32.141.125.236] (may be forged)) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m0LL4OIL002668 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 21 Jan 2008 13:04:28 -0800 (PST) Message-Id: From: Andrew Jaquith To: "jspwiki-dev@incubator.apache.org" In-Reply-To: <32C4368E-9269-4369-8643-923C214E8FCD@ecyrd.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes X-Mailer: iPhone Mail (4A93) Mime-Version: 1.0 (iPhone Mail 4A93) Subject: Re: Classmapping and final classes Content-Transfer-Encoding: 7bit Date: Mon, 21 Jan 2008 16:03:38 -0500 References: <47946462.6020508@ops.co.at> <3B670219-16D3-447D-8D58-274C7757AACF@mac.com> <39ED70F7-BE56-4BC2-AB37-C37630F5CC7F@mac.com> <32C4368E-9269-4369-8643-923C214E8FCD@ecyrd.com> X-Virus-Checked: Checked by ClamAV on apache.org Janne- I do not want to get into a philosophical debating match over extensibility generally speaking. I do, however, want to you to understand that the two classes we are talking about, specifically, were not meant to be extended. That is to say, I did this 100% intentionally. There are other parts of the auth API that are specifically designed to be hacked - such as the JAAS login stack and the Authorizer classes. We also have, I would point out, a way of disabling the authorization checks *entirely*. Do we know whether any of these methods would satisfy the need? I don't think we do. That is why I'm suggesting here is that we get a least a JIRA bug filed about embedding, or whatever the purpose of this is for. Is that so much to ask? But it is a bit much to ask to just arbitrarily change a very, very sensitive class just because of a single email on the dev list. Let us not treat this matter so casually. On Jan 21, 2008, at 15:34, Janne Jalkanen wrote: > > On 21 Jan 2008, at 21:05, Andrew Jaquith wrote: > >> I cannot imagine a class with more security implications than >> AuthorizationManager (or AuthenticationManager), can you? :) > > Considering that extending it is possible to anyone with access to > source code *anyway* (they just remove the final identifiers), no, I > can't think of any security implications. > >> The AuthManager classes were deliberately NOT built to be extended. >> The Josh Bloch rule applies here: design classes for extension, or >> else forbid it. > > Yes, but no. The class mapping mechanism we currently have is > really meant for people who hack JSPWiki anyway, but do not want to > apply patches to track changes in the source code all the time, as > even a simple reformatting might invalidate their patch. > > We don't have to really to care about design here; only public APIs > and public extension mechanisms. > >> Here's the other thing. With something so important, I don't want >> to just take the easy way out and say, "oh yeah, just extend it." >> We can't just casually hack our way around until something works. >> We need a scenario, some use cases, a design, and a plan. >> "Embedding" sounds like the scenario, but I am just guessing. What >> are the use cases? The plan? An enhancement request in JIRA would >> be a good start... > > I have no idea what people are using it for, but apparently they > are. And I would rather people come up with a way to do it, rather > than we having to make an up-front design which might not do what > people want. > > I mean - it's open source. It's not us who is casually hacking > around the code - it's the users. The more power they get, the > better. > > Having said that, I'm all for having a proper developer API and > correctly designed extension mechanisms, and use cases and plans and > roadmaps and releases and requirements management and all that jazz, > but to me it feels somewhat odd to say to an open source hacker that > "you can't extend it because we want you to extend only things that > we have decided to be extensible." > > /Janne