jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ishai Borovoy <ishaiboro...@gmail.com>
Subject Re: JCA on JBoss
Date Tue, 07 Aug 2007 07:43:01 GMT

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
> 
> <markus.reis@researchstudio.at>
> 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#a12029902
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message