Return-Path: Delivered-To: apmail-jakarta-cactus-user-archive@apache.org Received: (qmail 15570 invoked from network); 11 Sep 2002 16:31:40 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Sep 2002 16:31:40 -0000 Received: (qmail 7912 invoked by uid 97); 11 Sep 2002 16:32:12 -0000 Delivered-To: qmlist-jakarta-archive-cactus-user@jakarta.apache.org Received: (qmail 7817 invoked by uid 97); 11 Sep 2002 16:32:10 -0000 Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Cactus Users List" Reply-To: "Cactus Users List" Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 18540 invoked by uid 98); 11 Sep 2002 16:19:51 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <20020911161915.30799.qmail@web13604.mail.yahoo.com> Date: Wed, 11 Sep 2002 09:19:15 -0700 (PDT) From: Lesiecki Nicholas Reply-To: ndlesiecki@yahoo.com Subject: RE: Cactus security checking To: Vincent Massol , 'Cactus Users List' Cc: 'Erik Hatcher' , 'Lesiecki Nicholas' In-Reply-To: <00d901c2596a$4ba3d9f0$0200a8c0@octovma> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N +1 on begin(WebRequest) end(WebRequest). I thought that was how it was done. Serves me right for not looking at the code. Nick P.S. Erik always builds out of CVS so the 1.4 limitation won't bother *him*. :P --- Vincent Massol wrote: > > > > -----Original Message----- > > From: Erik Hatcher [mailto:erik@hatcher.net] > > Sent: 10 September 2002 20:49 > > To: Vincent Massol; Lesiecki Nicholas > > Subject: Cactus security checking > > > > I'm going directly to the source on this one - rather than the lists > :) > > If you want to redirect me to an FAQ or to the list, feel free. > > No worries. However, I'm answering to the list as I'm sure others are > facing this issue as well. I'd also like everyone's feedback on the > proposal I'm putting below. > > > > > My team is integrating Cactus tests for session bean testing, and we > > need to do role-based testing to ensure that a certain role cannot > call > > certain methods. > > > > Is it true that you need a beginXXX to set up security for every test? > > With Cactus 1.4, yes, it is true. You do it this way: > > webRequest.setAuthentication( > new BasicAuthentication("testuser", "testpassword")); > > With Cactus 1.4 the only solution if you wish to share this is to put it > in a method of its own and call this method from all your XXX tests that > need authentication. > > > If so, is there anything that can be done to make this easier so that > we > > could, perhaps, simply write a base class that does the login and > > subclass that for all our test cases and avoid writing a beginXXX for > > every test? > > > > Thanks, and sorry if this is an FAQ or something I could have found if > I > > tried. > > No there isn't anything ATM. We need to invent it! :-) > > In Cactus 1.5 in CVS, there is a global begin()/end() but its goal is to > be called only once per test suite (and not per test). From what you > say, we need a begin/end that are called for before and after each test. > This already exist with the setUp()/teardown() but they are called on > the server side. Thus, we need that on the client side. > > Hum ... > > What about begin(WebRequest) and end(WebResponse) ? > > Now, do we leave the global begin()/end() or is it going to be > confusing? Shall we choose other names for the global begin()/end()? > Like init()/destroy()? > > Thinking about it, I'm not even sure they are a good idea as it is > possible to achieve the same effect with: > > public static Test suite() > { > return new TestSetup() > { > public void setUp() > { > // global set up, client side > } > public void teardown() > { > // global tear down, client side > } > } > } > > So maybe we should simply remove global begin()/end(), add > begin(WebRequest)/end(WebResponse) and explain the TestSetup() stuff? > > Comments? > > -Vincent > > PS: I can get that implemented very quickly if we reach a consensus. > > > > > Erik > > __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute -- To unsubscribe, e-mail: For additional commands, e-mail: