Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 9214 invoked from network); 3 Aug 2007 14:57:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 14:57:42 -0000 Received: (qmail 6952 invoked by uid 500); 3 Aug 2007 14:57:40 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 6925 invoked by uid 500); 3 Aug 2007 14:57:40 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 6912 invoked by uid 99); 3 Aug 2007 14:57:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 07:57:39 -0700 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 [69.147.95.78] (HELO smtp115.plus.mail.sp1.yahoo.com) (69.147.95.78) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 03 Aug 2007 14:57:17 +0000 Received: (qmail 92975 invoked from network); 3 Aug 2007 14:57:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=zTbCeYWL7etImq1tNLV72FNZ+dLjUsfu+dwOgrea+Jpz8uoAPtKaUxtsY9ZkoTBx1rGG/UMMM3KEomjhcK+T6xfHdTPaGOFUTBOShgAY4odg7kk+c1g0jMMwhWJyEVsmtZao6a1WI27+g85FKkax08vZKwG27BxPh86JSdP3Kcs= ; Received: from unknown (HELO ?192.168.1.106?) (david_jencks@67.102.173.8 with plain) by smtp115.plus.mail.sp1.yahoo.com with SMTP; 3 Aug 2007 14:57:11 -0000 X-YMail-OSG: dFEey5gVM1nWIKuU29.OxFeOXvl7J9Lz8JeLuT73Czm2.XPKiWUvASM_xhuMDZTkl38qt91mDw-- Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <46B31E8A.4020209@ibis.ua> References: <46B31E8A.4020209@ibis.ua> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1F500BE7-1FFD-4070-95C4-B58C5F9DFA29@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: How to get the active Subject? Date: Fri, 3 Aug 2007 07:57:19 -0700 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org On Aug 3, 2007, at 5:24 AM, Oleg Nitz wrote: > Hello all, > > Now I am migrating our system from JBoss to Geronimo, and I met the > following problem. During login we attach some tecnical info about > the current user to the Subject as a public credintial. Then at any > point inside EJB we need to be able to find the active Subject in > order > to get the tech info. In JBoss the following code does the trick: > > ic = new InitialContext(); > jsm = (JaasSecurityManager) ic.lookup("java:/jaas/our-security- > domain"); > subject = jsm.getActiveSubject(); > > Is such thing possible in Geronimo? What the correspondent code for > Geronimo would look like? org.apache.geronimo.security.ContextManager.getCurrentSubject() gets the current subject org.apache.geronimo.security.ContextManager.getNextSubject() gets the run-as subject hope this helps david jencks > > Thanks in advance, > Oleg > >