[JBoss-user] [Security & JAAS/JBoss] - Re: Custom Princpal Class

2004-06-18 Thread rimmeraj
OK, after reading the updated javaworld anser I found my answer. I'll put it here for 
others.

In your getRoleSets() method you need to add another group called CallerPrincipal. The 
member of this class should be what you want returned when you call 
EJBContext.getCallerPrincipal

so a sample code snippit ...

protected  Group[] getRoleSets()
throws LoginException
  {
 Group[] roleSets = new Group[2];
  roleSets[0] = new SimpleGroup("Roles");
  roleSets[1] = new SimpleGroup("CallerPrincipal");

  roleSets[0].addMember(new SimplePrincipal("user"));
  roleSets[1].addMember(identity);
  return roleSets;
}

Where identity is a class that you want returned that implements Principal...





View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839297#3839297

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839297


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: Custom Princpal Class

2004-06-17 Thread rimmeraj
OK. I have looked at AbstractServerLoginModule whcih my custom Server Login Module. 
Now instead of useing the property I am overiding createIdentity with my own custom 
implementation.  the problem is that it is never getting called. Therefore 
ctx.getCallerPrincipal is still returning a class of SimplePrincipal.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839104#3839104

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839104


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: Custom Princpal Class

2004-06-16 Thread rimmeraj
Excellent! So does JAAS now keep the Principal class the the server login module 
returns or do I have to ytell JASS which Principal class to use? 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838955#3838955

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838955


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: Custom Princpal Class

2004-06-15 Thread [EMAIL PROTECTED]
3.2.4+ supports this.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838805#3838805

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838805


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user