Hi Scott,
Looks like a plan. I also saw a post of Oleg, which
suggests it might be a bug in the version of JBoss
I use. So the first thing I am going to do is follow
his hint and try the most current CVS version, which
will contain your update as well I guess. This does not
mean that I do not value your remarks. Om the contrairy.
The reason that I am follwing Oleg's hint is that I see
my own principal type being available within the session
bean. This implies that the the Principal was correctly
received and used by the application server initially.
It is only in the next step (calling the entity bean from the
session bean) where it goes wrong.
Furthermore I had a look at the JAASSecurityManagerService
and I could not find anything specific in there about using
SimplePrincipal.
Hope you don't mind with the work you put in and please correct
me if I am on the wrong path here.
Greetings
Cor.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scott M Stark
Sent: Saturday, February 24, 2001 20:44
To: JBoss-User
Subject: Re: [jBoss-User] Problems with Principal class propagation
You would have to create an implementation of the RealmMapping interface.
One way would be to create a subclass of
org.jboss.security.plugins.JaasSecurityManager
and override the getPrincipal(Principal) method. You then need to do (b)
which
right now requires that you create a JMX mbean and install your RealmMapping
instance into the JNDI namespace at the location you use for the container
role-mapping-manager element, which in your case is: java:/jaas/companion
I'm merging the new contrib security stuff to the core this weekend and this
will
allow to you specific which class implements RealmMapping using the
existing JaasSecurityManagerService mbean so that you won't have to create
your own mbean.
----- Original Message -----
From: "Cor Hofman" <[EMAIL PROTECTED]>
To: "JBoss-User" <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 4:26 AM
Subject: RE: [jBoss-User] Problems with Principal class propagation
> Scott,
>
> What do you mean by "own implementation of
org.jboss.security.RealmMapping"
> a) Replace the org.jboss.security.RealmMapping and recompile JBoss.
> b) A configuration option of JBoss, which allows me to specify which
> class implements ReamMapping.
>
> Greetings,
>
> Cor.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Scott M Stark
> Sent: Saturday, February 24, 2001 09:54
> To: JBoss-User
> Subject: Re: [jBoss-User] Problems with Principal class propagation
>
>
> You would have to create your own implemention of
> org.jboss.security.RealmMapping
> and install that as the role-mapping-manager. The RealmMapping instance is
> what
> determines the instance of Principal that is returned by
> getCallerPrincipal(). You can't
> rely on the type of Principal that is established by your LoginModule to
be
> what is
> returned by the getCallerPrincipal() method as the container can choose to
> insert a
> proxy that only publishes the java.security.Principal interface to prevent
> changes to the
> Principal established by the LoginModule.
>
> The org.jboss.security.RealmMapping#getPrincipal( Principal ) method is
> where you
> would map the java.security.Principal into your particular instance.
>
> ----- Original Message -----
> From: "Cor Hofman" <[EMAIL PROTECTED]>
> To: "JBoss User list" <[EMAIL PROTECTED]>
> Sent: Friday, February 23, 2001 11:18 PM
> Subject: [jBoss-User] Problems with Principal class propagation
>
>
> > Hi,
> >
> > I implemented my own Principal class to add some extra
> > authorization methods.
> >
> > When I perform a the login and call a session bean everything looks
fine.
> > The getCallerPrincipal() inside a sessionbean returns
> > my own Principal. This session bean then calls an entity bean.
> > When the entity bean call getCallerPrinciple() it returns an original
> > SimplePrincipal instance. I would expect the entity bean to return
> > my own Principal as well. Why isn't that happening?
> > I expected the new Principal class to be propagated automatically.
> >
> > I use a PRE2.1 build from the beginning of january.
> >
> > For both the session bean and the entity bean I added the famous
> > two lines:
> >
> > <role-mapping-manager>java:/jaas/companion</role-mapping-manager>
> > <authentication-module>java:/jaas/companion</authentication-module>
> >
> > to the container types I use for the session and the entity bean
> > (in standardJboss.xml).
> >
> > I also modified the auth.conf to contain a companion section.
> >
> > companion {
> > org.companion.security.ServerLoginModule required;
> > };
> >
> > Furthermore I added this to the client auth.conf
> >
> > companion
> > {
> > org.companion.security.ClientLoginModule required
> multi-threaded="true";
> > };
> >
> > Any suggestion or hint on how to tackle this one are ver much
appreciated.
> >
> > Greetings,
> >
> > Cor Hofman
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > List Help?: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]