Ionel,
We came across the same bug. Of course, it was our own fault. The problem 
is that you only get a principal if the page from where you are calling is 
specified as a secured page. So, even if the user has logged in correctly, 
if they move to a public page (one which has no security context) then 
your principal is gone. Of course, if they go back to a secured page, 
their principal comes back.

HTH,
Jonathan O'Connor
Development Manager
XCOM Dublin




Ionel Gardais <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
02.04.2003 10:17
Please respond to jboss-user

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Re: [JBoss-user] auth login config file from JSP


Thanks Scott,

I am still having principal=null exception but they are no more related 
to the UsersRolesLoginModule.
I think i'm on the way to get it working.

As the username/role are retrieve in a database, is it a good thing to do 
:

<application-policy name = "scheduler">
   <authentication>
      <login-module code = "org.jboss.security.ClientLoginModule"
         flag = "required">
      </login-module>

      <login-module code = 
"org.jboss.security.auth.spi.DatabaseServerLoginModule"
         flag = "required">
         <module-option name="dsJndiName">java:/PasswordDS</module-option>
         <module-option name="principalsQuery">select Password from 
Principals where PrincipalID=?</module-option>
         <module-option name="rolesQuery">select Role, RoleGroup from 
Roles where PrincipalID=?</module-option>
      </login-module>
   </authentication>
</application-policy>

so my app, either a standalone or a web app must first use the 
ClientLoginModule and then use the DatabaseServerLoginModule ? (by 
specifying security-domain = java:/jaas/scheduler on jboss.xml and 
jboss-web.xml)

BTW, two little questions :
- my app is designed to use a singleton that act as an "proxy" for the 
SLSB home and remote interfaces. Is it possible that when a client uses 
the singleton, the calls are made using the client loginContext ?

CLIENT #1 ----------\                                         /--- CMP #1
   |- loginContext   \                                       /
      (owned by C#1)  +-- Interface PROXY ----/  /--- SLSB--+----- CMP #2
                     /                                       \
CLIENT #2 ----------/                                         \--- CMP #3
   |- loginContext
      (owned by C#2


- is there a NISLoginModule as there is an LDAPLoginModule ?



thanks,
ionel



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to