Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 76881 invoked from network); 7 Aug 2007 15:03:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2007 15:03:30 -0000 Received: (qmail 92871 invoked by uid 500); 7 Aug 2007 15:03:27 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 92850 invoked by uid 500); 7 Aug 2007 15:03:27 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 92841 invoked by uid 99); 7 Aug 2007 15:03:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 08:03:27 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 15:03:20 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IIQaJ-0004MW-HF for users@jackrabbit.apache.org; Tue, 07 Aug 2007 08:02:59 -0700 Message-ID: <12036135.post@talk.nabble.com> Date: Tue, 7 Aug 2007 08:02:59 -0700 (PDT) From: Ishai Borovoy To: users@jackrabbit.apache.org Subject: Re: JCA on JBoss In-Reply-To: <46B87F7D.4030506@researchstudio.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: ishaiborovoy@gmail.com References: <12029308.post@talk.nabble.com> <46B81D7C.1080108@researchstudio.at> <12029902.post@talk.nabble.com> <46B8240F.3080206@researchstudio.at> <12029990.post@talk.nabble.com> <12030091.post@talk.nabble.com> <46B829DA.1030704@researchstudio.at> <12032701.post@talk.nabble.com> <12033165.post@talk.nabble.com> <12033889.post@talk.nabble.com> <46B87F7D.4030506@researchstudio.at> X-Virus-Checked: Checked by ClamAV on apache.org OK, Now it's OK to login, but when I try to get the root node I get this strange exception: javax.jcr.AccessDeniedException: cannot read item cafebabe-cafe-babe-cafe-babecafebabe Markus Reis wrote: >=20 > The class should be in jackrabbit-core-.jar and should be=20 > included in jackrabbit-jca-.rar - this however depends on the=20 > jackrabbit version you are using ... > ... in any case you can put jackrabbit-core-.jar in=20 > server/default/lib (simply download it from=20 > http://jackrabbit.apache.org/downloads.cgi or build it from source) -=20 > and make sure that it contains=20 > org.apache.jackrabbit.core.security.SimpleJBossAccessManager ... >=20 > ... note that the package and the name of this class has changed over=20 > the last jackrabbit versions - so be sure that the entry in=20 > repository.xml equals the class and package name in the included jar! >=20 >=20 > regards, > Markus >=20 >=20 > Ishai Borovoy schrieb: >> Hi Markus, >> Another thing... >> By success I meant that I have no exception when Jboss initialize, but >> when >> I try to login (remotly) I get: >> "... >> java.lang.ClassNotFoundException: No C >> sLoaders found for: >> org.apache.jackrabbit.core.security.SimpleJBossAccessMana >> ...." >> >> I guess it related to the last section in >> :http://wiki.apache.org/jackrabbit/JackrabbitOnJbossSecurity, >> I follow this section but I am not sure I did it corectly, can you help >> me >> with that? >> >> >> Ishai Borovoy wrote: >> =20 >>> OK success, >>> Thank you very much!!! >>> >>> Ishai >>> >>> >>> Ishai Borovoy wrote: >>> =20 >>>> OK thanks, >>>> I will try again. >>>> >>>> Ishai >>>> >>>> Markus Reis wrote: >>>> =20 >>>>> (1) you have to create the rolemapping.properties file yourself (in >>>>> your=20 >>>>> repository.home: you specified that in jcr-ds.xml) - and it should=20 >>>>> contain the following line in your case: >>>>> friend=3Dfull >>>>> (2) you did not read the corresponding docs on the wiki (I pointed yo= u=20 >>>>> to) - You have to modify the repository.xml (security section) to: >>>>> >>>>> >>>> class=3D"org.apache.jackrabbit.core.security.SimpleJBossAccessManager= " >>>>> /> >>>>> >>>>> >>>>> Here's also an example jcr-ds.xml (taken from the template in SVN): >>>>> >>>>> >>>>> jcr/local >>>>> >>>>> jackrabbit-jca.rar >>>>> =20 >>>>> javax.jcr.Repository >>>>> >>>> type=3D"java.lang.String">/temp/jackrabbit >>>>> >>>> type=3D"java.lang.String">classpath:repository.xml >>>>> >>>> type=3D"java.lang.Boolean">true >>>>> >>>>> >>>>> change the rar name and homeDir (that's the dir where to put the=20 >>>>> rolemapping.properties) >>>>> >>>>> >>>>> Markus >>>>> >>>>> >>>>> >>>>> Ishai Borovoy schrieb: >>>>> =20 >>>>>> I sent you the files through Gmail. >>>>>> >>>>>> Ishai Borovoy wrote: >>>>>> =20 >>>>>> =20 >>>>>>> OK, I will. >>>>>>> >>>>>>> Markus Reis wrote: >>>>>>> =20 >>>>>>> =20 >>>>>>>> Hi, >>>>>>>> >>>>>>>> >>>>>>>> please send me the contents of the following files: >>>>>>>> (1) server\default\conf\props\jackrabbit-roles.properties >>>>>>>> (2) server\default\conf\props\jackrabbit-users.properties >>>>>>>> (3) rolemapping.properties (and the location where you put it) >>>>>>>> (4) repository.xml in the jca rar file >>>>>>>> >>>>>>>> >>>>>>>> Markus >>>>>>>> >>>>>>>> >>>>>>>> Ishai Borovoy schrieb: >>>>>>>> =20 >>>>>>>> =20 >>>>>>>>> Hi Markus, >>>>>>>>> I did all your instruction below and restart the Jboss, no >>>>>>>>> error... >>>>>>>>> but the problem I can login with no matter what user/password I >>>>>>>>> use. =20 >>>>>>>>> Here is the client code (I call it remotly (use the >>>>>>>>> jackrabbit-jcr-rmi-1.3.1.jar)). >>>>>>>>> >>>>>>>>> >>>>>>>>> rr =3D (RemoteRepository) >>>>>>>>> ctx.lookup("jnp://localhost:1099/jcrServer"); >>>>>>>>> =09 Repository repository =3D adapter.getRepository(rr= ); >>>>>>>>> // no matter what user name or password I wil= l >>>>>>>>> put >>>>>>>>> the >>>>>>>>> code success to run with no exeption >>>>>>>>> =09 Credentials credJBoss =3D new >>>>>>>>> SimpleCredentials("username","password".toCharArray());=20 >>>>>>>>> =09 Session session =3D repository.login(credJBoss); >>>>>>>>> =09 Node n =3D session.getRootNode().getNode("foo"); >>>>>>>>> =09 n.setProperty("Ishai", true); >>>>>>>>> =09 session.save(); >>>>>>>>> =09 session.logout(); >>>>>>>>> >>>>>>>>> >>>>>>>>> Any suggestion? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Ishai >>>>>>>>> >>>>>>>>> Markus Reis wrote: >>>>>>>>> =20 >>>>>>>>> =20 >>>>>>>>> =20 >>>>>>>>>> Hi Ishai, >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> if you are looking for simple authentication based on a few=20 >>>>>>>>>> configuration files you could follow the approach presented on: >>>>>>>>>> http://wiki.apache.org/jackrabbit/SimpleJbossAccessManager >>>>>>>>>> Further to the description there you will have to: >>>>>>>>>> (1) add the following lines to login-config.xml in >>>>>>>>>> server\default\conf: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> code=3D"org.jboss.security.auth.spi.UsersRolesLoginModule"=20 >>>>>>>>>> flag=3D"required"> >>>>>>>>>> >>>>>>>>> name=3D"usersProperties">props/jackrabbit-users.properties >>>>>>>>>> >>>>>>>>> name=3D"rolesProperties">props/jackrabbit-roles.properties >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> (2) create a >>>>>>>>>> server\default\conf\props\jackrabbit-roles.properties >>>>>>>>>> file=20 >>>>>>>>>> listing =3D pairs >>>>>>>>>> (3) create a >>>>>>>>>> server\default\conf\props\jackrabbit-users.properties >>>>>>>>>> file=20 >>>>>>>>>> listing =3D pairs >>>>>>>>>> (4) rename the rolemappings.properties file in repository.home >>>>>>>>>> (that=20 >>>>>>>>>> lists =3D pairs) to rolemapping.properties >>>>>>>>>> (if >>>>>>>>>> you=20 >>>>>>>>>> use jackrabbit 1.3 or higher) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> hope that helps, >>>>>>>>>> Markus >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Ishai Borovoy schrieb: >>>>>>>>>> =20 >>>>>>>>>> =20 >>>>>>>>>> =20 >>>>>>>>>>> Hi, >>>>>>>>>>> I succeed to deploy (JCA deployment) rar file on JBosss, and >>>>>>>>>>> everything >>>>>>>>>>> is >>>>>>>>>>> work fine. how can I configure the repository/Jboss to work >>>>>>>>>>> with >>>>>>>>>>> custom >>>>>>>>>>> authentication (for example with user.properties file)? >>>>>>>>>>> =20 >>>>>>>>>>> =20 >>>>>>>>>>> =20 >>>>>>>>>>> =20 >>>>>>>>>> --=20 >>>>>>>>>> Mag. Markus Reis >>>>>>>>>> >>>>>>>>>> Austrian Research Centers GmbH - ARC >>>>>>>>>> Research Studios >>>>>>>>>> Studio Digital Memory Engineering >>>>>>>>>> >>>>>>>>>> Thurngasse 8/3/20, A-1090 Wien >>>>>>>>>> Mobile: +43 664 825 1106 >>>>>>>>>> Tel.: +43-1-585 05 37 - 16 >>>>>>>>>> Fax: +43-1-585 37 41 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> http://www.arcs.ac.at/ >>>>>>>>>> http://www.researchstudio.at/ >>>>>>>>>> http://dme.researchstudio.at/ >>>>>>>>>> >>>>>>>>>> HG Wien =E2=80=93 FN 115980i =E2=80=93 ATU14703506 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> =20 >>>>>>>>>> =20 >>>>>>>>>> =20 >>>>>>>>> =20 >>>>>>>>> =20 >>>>>>>>> =20 >>>>>>>> --=20 >>>>>>>> Mag. Markus Reis >>>>>>>> >>>>>>>> Austrian Research Centers GmbH - ARC >>>>>>>> Research Studios >>>>>>>> Studio Digital Memory Engineering >>>>>>>> >>>>>>>> Thurngasse 8/3/20, A-1090 Wien >>>>>>>> Mobile: +43 664 825 1106 >>>>>>>> Tel.: +43-1-585 05 37 - 16 >>>>>>>> Fax: +43-1-585 37 41 >>>>>>>> >>>>>>>> >>>>>>>> http://www.arcs.ac.at/ >>>>>>>> http://www.researchstudio.at/ >>>>>>>> http://dme.researchstudio.at/ >>>>>>>> >>>>>>>> HG Wien =E2=80=93 FN 115980i =E2=80=93 ATU14703506 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> =20 >>>>>>>> =20 >>>>>>> =20 >>>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>> --=20 >>>>> Mag. Markus Reis >>>>> >>>>> Austrian Research Centers GmbH - ARC >>>>> Research Studios >>>>> Studio Digital Memory Engineering >>>>> >>>>> Thurngasse 8/3/20, A-1090 Wien >>>>> Mobile: +43 664 825 1106 >>>>> Tel.: +43-1-585 05 37 - 16 >>>>> Fax: +43-1-585 37 41 >>>>> >>>>> >>>>> http://www.arcs.ac.at/ >>>>> http://www.researchstudio.at/ >>>>> http://dme.researchstudio.at/ >>>>> >>>>> HG Wien =E2=80=93 FN 115980i =E2=80=93 ATU14703506 >>>>> >>>>> >>>>> >>>>> =20 >>>> =20 >>> =20 >> >> =20 >=20 >=20 > --=20 > Mag. Markus Reis >=20 > Austrian Research Centers GmbH - ARC > Research Studios > Studio Digital Memory Engineering >=20 > Thurngasse 8/3/20, A-1090 Wien > Mobile: +43 664 825 1106 > Tel.: +43-1-585 05 37 - 16 > Fax: +43-1-585 37 41 >=20 > > http://www.arcs.ac.at/ > http://www.researchstudio.at/ > http://dme.researchstudio.at/ >=20 > HG Wien =E2=80=93 FN 115980i =E2=80=93 ATU14703506 >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/JCA-on-JBoss-tf4228473.= html#a12036135 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.