Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Scott M Stark

It happens when the ClassLoader that created the java:comp/env context
for the war is not the war ClassLoader, or a parent of the war ClassLoader.
The current WebIntegrationUnitTestCase.testENCServlet case is working
so this looks to be setup correctly at least for the testcase ear.

> Another question. I am having trouble with env being not bound with the
> new Jetty from CVS. (Meaning, when a WAR gets deployed, it does not see
> ejb-ref if the JNDI name is in the comp/env space.) I used to have this
> problem some time before but syncing with the latest JBoss CVS fixed
> it. Would you happen to know why this happens? I really need to get this
> to work...
> 
> Anatoly.



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Anatoly Akkerman


Hi, Jules,

I've used the following hack, which, in fact worked. In
JBossUserPrincipal, where you set SecurityAssociation, instead of setting
the principal to 'this', set it to 'new
SimplePrincipal(this.getName())'. JBoss security checking will not care if
it is a new object every time. 

Another question. I am having trouble with env being not bound with the
new Jetty from CVS. (Meaning, when a WAR gets deployed, it does not see
ejb-ref if the JNDI name is in the comp/env space.) I used to have this
problem some time before but syncing with the latest JBoss CVS fixed
it. Would you happen to know why this happens? I really need to get this
to work...

Anatoly.


On Wed, 2 Jan 2002, Jules Gosnell wrote:

> For the moment, I am not implementing the Security integration between Jetty
> and JBoss as Serializable.
> 
> I understand why you feel it should be a requirement for the future, and
> agree with you. Unfortunately, it is not simply a case of shipping a string
> since the same Principal object has to be useful within Jetty, which expects
> it to have behaviour based on state which is not so easily serializable.
> 
> Provided that the completion of the ClassLoader work will resolve the
> immediate issue of the testsuite failing here I shall put it on my todo list
> and tackle it next time I revisit the security integration.
> 
> If anyone feels there is good reason for this to be prioritised more highly,
> please let me know.
> 
> 


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Jules Gosnell


For the moment, I am not implementing the Security integration between
Jetty and JBoss as Serializable.
I understand why you feel it should be a requirement for the future,
and agree with you. Unfortunately, it is not simply a case of shipping
a string since the same Principal object has to be useful within Jetty,
which expects it to have behaviour based on state which is not so easily
serializable.
Provided that the completion of the ClassLoader work will resolve the
immediate issue of the testsuite failing here I shall put it on my todo
list and tackle it next time I revisit the security integration.
If anyone feels there is good reason for this to be prioritised more
highly, please let me know.
 
Jules
Anatoly Akkerman wrote:
IMHO, the JBossUserPrincipal has to be serializable.
You can't always
assume that the bean invocations from the web tier will be local. Be
that
for clustering or whatever. My current project is wide-area distribution
of j2ee apps, where we take an EAR configured to run on a single node
and
'stretch' it accross a bunch of nodes, so we end up with having web
tier
doing remote invocations on the beans. True, this is non-production
feature and quite inefficient at the moment but that is the whole purpose
of research, to make it better. So, stick to serializable, please.
-
Anatoly Akkerman
Computer Science Dept.
Courant Institute of Mathematical Sciences, NYU
715 Broadway, #719 
Tel: 212 998-3493
New York, NY 10003 
Fax: 212 995-4123
-
On Wed, 2 Jan 2002, Adrian Brock wrote:
> Hi,
>
> Oops, should have said JRMPInvokerProxy.
>
> There might still be some bizarre case where it
> needs to go over a wire.
> But, I would have thought the servlet always wants to
> invoke a local bean. That's the whole point of
> web integration isn't it?
>
> Regards,
> Adrian
> __
> View this jboss-dev thread in the online forums:
> http://jboss.org/forums/thread.jsp?forum=66&thread=6446
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Anatoly Akkerman


IMHO, the JBossUserPrincipal has to be serializable. You can't always
assume that the bean invocations from the web tier will be local. Be that
for clustering or whatever. My current project is wide-area distribution
of j2ee apps, where we take an EAR configured to run on a single node and
'stretch' it accross a bunch of nodes, so we end up with having web tier
doing remote invocations on the beans. True, this is non-production
feature and quite inefficient at the moment but that is the whole purpose
of research, to make it better. So, stick to serializable, please.

-
Anatoly Akkerman
Computer Science Dept.
Courant Institute of Mathematical Sciences, NYU
715 Broadway, #719  Tel: 212 998-3493
New York, NY 10003  Fax: 212 995-4123
-

On Wed, 2 Jan 2002, Adrian Brock wrote:

> Hi,
> 
> Oops, should have said JRMPInvokerProxy.
> 
> There might still be some bizarre case where it
> needs to go over a wire.
> But, I would have thought the servlet always wants to
> invoke a local bean. That's the whole point of
> web integration isn't it?
> 
> Regards,
> Adrian
> __
> View this jboss-dev thread in the online forums:
> http://jboss.org/forums/thread.jsp?forum=66&thread=6446
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Adrian Brock

Hi,

Oops, should have said JRMPInvokerProxy.

There might still be some bizarre case where it
needs to go over a wire.
But, I would have thought the servlet always wants to
invoke a local bean. That's the whole point of
web integration isn't it?

Regards,
Adrian
__
View this jboss-dev thread in the online forums:
http://jboss.org/forums/thread.jsp?forum=66&thread=6446

___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Jules Gosnell


>From the integration point, it is a non-trivial (and unecessary) change.
If you have a simple hack from the JBoss side - go for it.
Jules
 
 
Jules Gosnell wrote:
So is this only a temporary problem ?
If so, then there is no point in rewriting the authentication integration.
 
Jules
 
Adrian Brock wrote:
Hi Jules,
You beat me to it on the JBossUserRealm fix :-)
This fixes a problem in 3.0 WebIntegrationUnitTestCase.
Until Marc finishes the classloader stuff, local
invocations will continue to be Marshalled by the
JRMPContainerInvoker :-(
Regards,
Adrian
__
View this jboss-dev thread in the online forums:
http://jboss.org/forums/thread.jsp?forum=66&thread=6446
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development




Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Jules Gosnell


So is this only a temporary problem ?
If so, then there is no point in rewriting the authentication integration.
 
Jules
 
Adrian Brock wrote:
Hi Jules,
You beat me to it on the JBossUserRealm fix :-)
This fixes a problem in 3.0 WebIntegrationUnitTestCase.
Until Marc finishes the classloader stuff, local
invocations will continue to be Marshalled by the
JRMPContainerInvoker :-(
Regards,
Adrian
__
View this jboss-dev thread in the online forums:
http://jboss.org/forums/thread.jsp?forum=66&thread=6446
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Adrian Brock

Hi Jules,

You beat me to it on the JBossUserRealm fix :-)

This fixes a problem in 3.0 WebIntegrationUnitTestCase.

Until Marc finishes the classloader stuff, local
invocations will continue to be Marshalled by the
JRMPContainerInvoker :-(

Regards,
Adrian
__
View this jboss-dev thread in the online forums:
http://jboss.org/forums/thread.jsp?forum=66&thread=6446

___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] UserRealm, SimplePrincipal & JBoss/Jetty integration....

2002-01-02 Thread Jules Gosnell

It looks like both my UserRealm and SimplePrincipal implementations need to be
Serializable.

This will most likely involve a rewrite of their current implementations.

Before I do this could someone confirm that this is the case and perhaps explain the
reasons behind this requirement, so that I don't put time in where it is not needed.

Thanks guys,

Jules


Anatoly Akkerman wrote:

> Hello all interested
>
> I've managed to get past this item as well. On every authentication I
> don't set JBossUserPrincipal to be the principal registered with the
> SecurityAssociation, rather I create a new SimplePrincipal (which is
> Serializable, while JBossUserPrincipal is not) and stuff works. (It seems
> to me that the Serialization exception was coming up when an EJB proxy
> would try to do an invocation and pass along the current Principal held in
> ThreadLocal by SecurityAssociation, but JBossUserPrincipal is not
> Serializable)
>
> At the moment I am just interested in getting my demo to work but would
> gladly commit my hack to the CVS. Though, it seems to me, the Jetty/JBoss
> security integration has to be cleaned up anyway.
>
> Anatoly.
>
> On Sun, 30 Dec 2001, Anatoly Akkerman wrote:
>
> >
> > Hi, I've tweaked the JBossUserRealm and its inner class JBossUserPrincipal
> > to authenticate with JBoss on every request. It seems to check the roles
> > properly but now it fails with the following error:
> >
> > 18:34:14,585 WARN  [Jetty] WARNING: Servlet Exception for
> > /d-module-3/control/signin
> > java.lang.reflect.UndeclaredThrowableException: java.io.NotSerializableException
> > : org.jboss.jetty.JBossUserRealm
> > <>
> >
> > Now I am stuck without knowing where to look next to figure out what's
> > going on. Any suggestions how to turn on Jetty debugging? (I could not
> > find anything in Jetty MBean interface or in jetty.xml inside the sar)
> >
> > Thanks in advance.
> >
> > -
> > Anatoly Akkerman
> > Computer Science Dept.
> > Courant Institute of Mathematical Sciences, NYU
> > 715 Broadway, #719  Tel: 212 998-3493
> > New York, NY 10003  Fax: 212 995-4123
> > -
> >
> >
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development