From users-return-13709-apmail-tomee-users-archive=tomee.apache.org@tomee.apache.org Wed Oct 2 20:25:44 2013 Return-Path: X-Original-To: apmail-tomee-users-archive@www.apache.org Delivered-To: apmail-tomee-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 0B28F10F96 for ; Wed, 2 Oct 2013 20:25:44 +0000 (UTC) Received: (qmail 45393 invoked by uid 500); 2 Oct 2013 20:25:42 -0000 Delivered-To: apmail-tomee-users-archive@tomee.apache.org Received: (qmail 45377 invoked by uid 500); 2 Oct 2013 20:25:39 -0000 Mailing-List: contact users-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tomee.apache.org Delivered-To: mailing list users@tomee.apache.org Received: (qmail 45369 invoked by uid 99); 2 Oct 2013 20:25:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2013 20:25:37 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rmannibucau@gmail.com designates 209.85.212.53 as permitted sender) Received: from [209.85.212.53] (HELO mail-vb0-f53.google.com) (209.85.212.53) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2013 20:25:31 +0000 Received: by mail-vb0-f53.google.com with SMTP id i3so931450vbh.40 for ; Wed, 02 Oct 2013 13:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=RLp2wE8dxxz/6EECoKd0DXEjvyGidOXjLJYkm5SzkWY=; b=nwgARFlWVjb7IYp12EjM+/+fzIo4QP+snyLWCKcdtt/VCucghkabT7W+Iz3Mkxe4Nr EcSHoZkAhiu4mEV8N9qwJTl+jRXOMFOD5J++IvHmiUks0WjrpwovEC/jSq38MglcEsrw kGrE3DrR+bCVH/s8TIjZ/CEBRd1pBn8wQ+vyOy2Y6N61dTnMLSJysZEDF1gSi9eg91Zd NJgxYNRx50jpCVzHFzeGgsT+LyJkpHIpVUjPhBPhjB8tfzyXcqTxLrA9AgQyi+Tk/r0l mnhGwfkhPkCqo5visKmbMdn/qNGHckl9q+45AlnCGWFGGsdV+Ilvp1mvqqK1YvyWI+JL W16A== MIME-Version: 1.0 X-Received: by 10.52.103.35 with SMTP id ft3mr3146232vdb.5.1380745510873; Wed, 02 Oct 2013 13:25:10 -0700 (PDT) Received: by 10.58.226.165 with HTTP; Wed, 2 Oct 2013 13:25:10 -0700 (PDT) Received: by 10.58.226.165 with HTTP; Wed, 2 Oct 2013 13:25:10 -0700 (PDT) In-Reply-To: <1380740672570-4665393.post@n4.nabble.com> References: <1380740672570-4665393.post@n4.nabble.com> Date: Wed, 2 Oct 2013 22:25:10 +0200 Message-ID: Subject: Re: OpenEJB / TomEE Security Realm From: Romain Manni-Bucau To: users@tomee.apache.org Content-Type: multipart/alternative; boundary=e89a8ff24d9bb378de04e7c7ddaf X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff24d9bb378de04e7c7ddaf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi What's the issue? Le 2 oct. 2013 21:50, "Mark Hanfland" a =E9crit : > I am converting from JBoss and unsure how to set the security realm for m= y > EJBs in TomEE Plus /OpenEJB > > In JBoss there is an annotation > (org.jboss.annotation.security.SecurityDomain) you place on the EJB bean > @SecurityDomain(value =3D "MySecurityRealm") > > For TomEE/OpenEJB what is the equivalent?? > > I am not sure, but I think I have the realm created correctly. > > Added in server.xml > appName=3D"MySecurityRealm" > > > userClassNames=3D"org.apache.openejb.core.security.AbstractSecurityServic= e$User" > > > roleClassNames=3D"org.apache.openejb.core.security.AbstractSecurityServic= e$Group"> > > > Created login.conf with the following > > MySecurityRealm { > org.apache.openejb.core.security.jaas.SQLLoginModule required > dataSourceName=3D"MyDataSource" > digest MD5 > encoding base64 > userSelect=3D"SELECT USER_NAME,PASSWORD FROM ADMIN_USER WHERE > USER_NAME=3D?" > groupSelect=3D"SELECT USER_NAME, ROLE_CODE FROM ADMIN_ROLE, > ADMIN_USER_ROLE, ADMIN_USER WHERE ADMIN_USER.ADMIN_USER_ID =3D > ADMIN_USER_ROLE.ADMIN_USER_ID AND ADMIN_ROLE.ADMIN_ROLE_ID =3D > ADMIN_USER_ROLE.ADMIN_ROLE_ID AND ADMIN_USER.USER_NAME=3D?" > }; > > pointed Tomcat to it using > SET > > "CATALINA_OPTS=3D-Djava.security.auth.login.config=3D%CATALINA_HOME%/conf= /login.conf" > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/OpenEJB-TomEE-Security-Realm-tp466539= 3.html > Sent from the OpenEJB User mailing list archive at Nabble.com. > --e89a8ff24d9bb378de04e7c7ddaf--