OK thanks,
I will try again.
Ishai
Markus Reis wrote:
>
> (1) you have to create the rolemapping.properties file yourself (in your
> repository.home: you specified that in jcr-ds.xml) - and it should
> contain the following line in your case:
> friend=full
> (2) you did not read the corresponding docs on the wiki (I pointed you
> to) - You have to modify the repository.xml (security section) to:
> <Security appName="Jackrabbit">
> <AccessManager
> class="org.apache.jackrabbit.core.security.SimpleJBossAccessManager" />
> </Security>
>
> Here's also an example jcr-ds.xml (taken from the template in SVN):
> <connection-factories>
> <tx-connection-factory>
> <jndi-name>jcr/local</jndi-name>
> <xa-transaction/>
> <rar-name>jackrabbit-jca.rar</rar-name>
>
> <connection-definition>javax.jcr.Repository</connection-definition>
> <config-property name="homeDir"
> type="java.lang.String">/temp/jackrabbit</config-property>
> <config-property name="configFile"
> type="java.lang.String">classpath:repository.xml</config-property>
> <config-property name="bindSessionToTransaction"
> type="java.lang.Boolean">true</config-property>
> </tx-connection-factory>
> </connection-factories>
> change the rar name and homeDir (that's the dir where to put the
> rolemapping.properties)
>
>
> Markus
>
>
>
> Ishai Borovoy schrieb:
>> I sent you the files through Gmail.
>>
>> Ishai Borovoy wrote:
>>
>>> OK, I will.
>>>
>>> Markus Reis wrote:
>>>
>>>> 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:
>>>>
>>>>> 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.
>>>>> Here is the client code (I call it remotly (use the
>>>>> jackrabbit-jcr-rmi-1.3.1.jar)).
>>>>>
>>>>> <code>
>>>>> rr = (RemoteRepository)
>>>>> ctx.lookup("jnp://localhost:1099/jcrServer");
>>>>> Repository repository = adapter.getRepository(rr);
>>>>> // no matter what user name or password I will put
>>>>> the
>>>>> code success to run with no exeption
>>>>> Credentials credJBoss = new
>>>>> SimpleCredentials("username","password".toCharArray());
>>>>> Session session = repository.login(credJBoss);
>>>>> Node n = session.getRootNode().getNode("foo");
>>>>> n.setProperty("Ishai", true);
>>>>> session.save();
>>>>> session.logout();
>>>>> </code>
>>>>>
>>>>> Any suggestion?
>>>>>
>>>>> Thanks,
>>>>> Ishai
>>>>>
>>>>> Markus Reis wrote:
>>>>>
>>>>>
>>>>>> Hi Ishai,
>>>>>>
>>>>>>
>>>>>> if you are looking for simple authentication based on a few
>>>>>> 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:
>>>>>> <application-policy name="Jackrabbit">
>>>>>> <authentication>
>>>>>> <login-module
>>>>>> code="org.jboss.security.auth.spi.UsersRolesLoginModule"
>>>>>> flag="required">
>>>>>> <module-option
>>>>>> name="usersProperties">props/jackrabbit-users.properties</module-option>
>>>>>> <module-option
>>>>>> name="rolesProperties">props/jackrabbit-roles.properties</module-option>
>>>>>> </login-module>
>>>>>> </authentication>
>>>>>> </application-policy>
>>>>>> (2) create a server\default\conf\props\jackrabbit-roles.properties
>>>>>> file
>>>>>> listing <username>=<rolename> pairs
>>>>>> (3) create a server\default\conf\props\jackrabbit-users.properties
>>>>>> file
>>>>>> listing <username>=<passsword> pairs
>>>>>> (4) rename the rolemappings.properties file in repository.home (that
>>>>>> lists <rolename>=<permission> pairs) to rolemapping.properties (if
>>>>>> you
>>>>>> use jackrabbit 1.3 or higher)
>>>>>>
>>>>>>
>>>>>> hope that helps,
>>>>>> Markus
>>>>>>
>>>>>>
>>>>>> Ishai Borovoy schrieb:
>>>>>>
>>>>>>
>>>>>>> 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)?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> 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
>>>>>>
>>>>>> <[EMAIL PROTECTED]>
>>>>>> http://www.arcs.ac.at/
>>>>>> http://www.researchstudio.at/
>>>>>> http://dme.researchstudio.at/
>>>>>>
>>>>>> HG Wien – FN 115980i – ATU14703506
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> --
>>>> 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
>>>>
>>>> <[EMAIL PROTECTED]>
>>>> http://www.arcs.ac.at/
>>>> http://www.researchstudio.at/
>>>> http://dme.researchstudio.at/
>>>>
>>>> HG Wien – FN 115980i – ATU14703506
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
>
> --
> 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
>
> <[EMAIL PROTECTED]>
> http://www.arcs.ac.at/
> http://www.researchstudio.at/
> http://dme.researchstudio.at/
>
> HG Wien – FN 115980i – ATU14703506
>
>
>
--
View this message in context:
http://www.nabble.com/JCA-on-JBoss-tf4228473.html#a12032701
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.