Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 5055 invoked from network); 19 Feb 2004 11:13:06 -0000 Received: from unknown (HELO tama5.ecl.ntt.co.jp) (129.60.39.102) by daedalus.apache.org with SMTP; 19 Feb 2004 11:13:06 -0000 Received: from vcs3.rdh.ecl.ntt.co.jp (vcs3.rdh.ecl.ntt.co.jp [129.60.39.110]) by tama5.ecl.ntt.co.jp (8.12.11/8.12.11) with ESMTP id i1JBDIf5020369 for ; Thu, 19 Feb 2004 20:13:18 +0900 (JST) Received: from mfs3.rdh.ecl.ntt.co.jp (localhost [127.0.0.1]) by vcs3.rdh.ecl.ntt.co.jp (8.12.11/8.12.11) with ESMTP id i1JBDH9C006288 for ; Thu, 19 Feb 2004 20:13:18 +0900 (JST) Received: from mfs3.rdh.ecl.ntt.co.jp (localhost [127.0.0.1]) by mfs3.rdh.ecl.ntt.co.jp (8.12.11/8.12.11) with ESMTP id i1JBDHpu006014 for ; Thu, 19 Feb 2004 20:13:17 +0900 (JST) Received: from nttmail3.ecl.ntt.co.jp ([129.60.39.100]) by mfs3.rdh.ecl.ntt.co.jp (8.12.11/8.12.11) with ESMTP id i1JBDGKx006000 for ; Thu, 19 Feb 2004 20:13:16 +0900 (JST) Received: from dmailsv1.y.ecl.ntt.co.jp (dmailsv1.y.ecl.ntt.co.jp [129.60.53.14]) by nttmail3.ecl.ntt.co.jp (8.12.11/8.12.11) with ESMTP id i1JBDGn9010013 for ; Thu, 19 Feb 2004 20:13:16 +0900 (JST) Received: from mailsv01.y.ecl.ntt.co.jp by dmailsv1.y.ecl.ntt.co.jp (8.12.11/dmailsv-1.1c) with ESMTP id i1JBDFlt012507 for ; Thu, 19 Feb 2004 20:13:15 +0900 (JST) Received: from localhost by mailsv01.y.ecl.ntt.co.jp (8.12.11/Lab-1.2a) with ESMTP id i1JBDETo017762 for ; Thu, 19 Feb 2004 20:13:14 +0900 (JST) Date: Thu, 19 Feb 2004 20:15:36 +0900 (JST) Message-Id: <20040219.201536.48533573.suguri.kazuhito@lab.ntt.co.jp> To: cactus-user@jakarta.apache.org Subject: Re: CACTUS + JBOSS + JAAS From: Kazuhito SUGURI In-Reply-To: <401539C8.2040507@memiq.ro> References: <401539C8.2040507@memiq.ro> X-Mailer: Mew version 3.3 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Horatiu, In article <401539C8.2040507@memiq.ro>, Mon, 26 Jan 2004 18:01:12 +0200, Horatiu Parfene wrote: horatiu.parfene> I want to test my EJBs but I am unable to autehnticate against jboss my horatiu.parfene> Cactus Test Classes. The login of the application uses j_security_check. I have done it recentry. # You may already solved this :-) What I did is as follows: 1. configure Servlet Container and EJB Container to use the same security-domain. 2. define ServletRedirectSecure and its security in web.xml. 3. add authentication related statements in beginXXX() methods: public void beginXXX(WebRequest request){ request.setRedirectorName("ServletRedirectorSecure"); FormAuthentication auth = new FormAuthentication("usernam", "password"); request.setAuthentication(auth); } 4. run test (as usual) See also http://jakarta.apache.org/cactus/writing/howto_security.html In my testcase, Context is set in setUp() method like: private Context context; ... public void setUp(){ super.setUp(); context = new InitialContext(); } As show above, I don't pass a Properties object in the InitialContext constructor, however, this works fine for me with JBoss-3.2.3. For your informatin, ---- Kazuhito SUGURI mailto:suguri.kazuhito@lab.ntt.co.jp