Return-Path: X-Original-To: apmail-openejb-users-archive@www.apache.org Delivered-To: apmail-openejb-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE696DB46 for ; Sun, 19 Aug 2012 20:34:48 +0000 (UTC) Received: (qmail 58474 invoked by uid 500); 19 Aug 2012 20:34:48 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 58440 invoked by uid 500); 19 Aug 2012 20:34:48 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 58429 invoked by uid 99); 19 Aug 2012 20:34:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Aug 2012 20:34:48 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.250.139 is neither permitted nor denied by domain of jszczepankiewicz@gmail.com) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Aug 2012 20:34:42 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T3CCR-0003Fa-Ej for users@openejb.apache.org; Sun, 19 Aug 2012 13:34:19 -0700 Date: Sun, 19 Aug 2012 13:34:19 -0700 (PDT) From: jszczepankiewicz To: users@openejb.apache.org Message-ID: <1345408459440-4656906.post@n4.nabble.com> Subject: (Security) isUserInRole not working? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, Apache tomee 1.0.0 web profile, jdk 7. I am facing strange problem: Using programmatic login by HttpServletRequest.login method. Also using: org.apache.openejb.core.security.jaas.SQLLoginModule After login I can successfully use methods on (HttpServletRequest and on SessionContext) req.getUserPrincipal().getName() (from basic servlet) context.getCallerPrincipal().getName (from Stateless EJB) they return proper name But if i use: req.isUserInRole(...) or context.isUserInRole() they always return false I have tested the groupSelect query in login.conf and see no errors. This is very basic functionality and rather not possible that this is a tomee bug so what's wrong? Documentation for tomme is so basic. Is some container (openejb.conf) specific configuration required to map roles to groups? Thanks in advance. -- View this message in context: http://openejb.979440.n4.nabble.com/Security-isUserInRole-not-working-tp4656906.html Sent from the OpenEJB User mailing list archive at Nabble.com.