Thank you Jburugupalli,
> I have an idea, better write some class similar to NestedPrincipal
> which holds information other than the principal and set this
> Pricipal in the ClientLoginModule instead of SimplePrincipal.
>SecurityAssociation.setPrincipal(new SimplePrincipal(username));
If I understood well,
I can change SimplePrincipal (creating a ModifiedSimplePrincipal)
adding the company attribute, with related method:
private String company;
public String getCompany()
and changing equals() and hashCode() methods.
I need to change ClientLoginModule in this instruction:
SecurityAssociation.setPrincipal(new ModifiedSimplePrincipal(username, company));
>But you should write your own databaseserverloginmodule
>with minimal chnages and also yous hould override one
>or two methods from the UserNamePasswrodLoginModule...
Here I must change getRoleSets() method of DatabaseServerLoginModule
retrieving company from the Principal and changing rolesQuery
that this LoginModule execute.
When I compile MyDatabaseServerLoginModule I have to put it
(tha class or a jar file) in the DEPLOY directory of my server instance ?
The only changes, in configuration, are inside login-config.xml
file ?
<application-policy name = "XMALF-policy">
<login-module code="xxx.yyy.zzz.MyDatabaseServerLoginModule" flag = "required">
<module-option name="dsJndiName">java:/PostgresDS</module-option>
<module-option name="principalsQuery">select password from utente username where
username=?</module-option>
<module-option name="rolesQuery">select ente, 'Roles' from prod_ute_ente where
username=? AND company=?</module-option>
</login-module>
</application-policy>
Hi,
Moreno
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834081#3834081
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834081
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user