[JBoss-user] [J2EE Compliance] - Re: run-as role in ejbCreate

2004-03-23 Thread edstorm
Thanks Scott,  that works well.  Is there any down side to running in this 
configuration?

Ed

a 
href=http://www.jboss.org/index.html?module=bbop=viewtopicp=3827117#3827117;View 
the original post/a

a 
href=http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3827117Reply 
to the post/a


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [J2EE Compliance] - run-as role in ejbCreate

2004-03-21 Thread edstorm
Hi,

I originally posted this question in another forum, but thought it might do a bit 
better here.  I have two session beans, TestSession and InternalSession.  TestSession 
is stateful, InternalSession is  stateless.  TestSession has the run-as role set to 
internal, and all of the methods for InternalSession require the internal role.  
Everthing runs fine, until ejbActivate is invoked on TestSession.  I get the following 
exception:


  | 12:08:13,801 ERROR [SecurityInterceptor] Insufficient method permissions, 
principal=null, method=create, interface=LOCALHOME, requiredRoles=[internal], 
principalRoles=[]
  | 12:08:13,804 ERROR [LogInterceptor] EJBException, causedBy:
  | java.lang.SecurityException: Insufficient method permissions, principal=null, 
method=create, interface=LOCALHOME, requiredRoles=[internal], principalRoles=[]
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:229)
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:81)
  | at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
  | at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
  | at 
org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:562)
  | at org.jboss.ejb.Container.invoke(Container.java:909)
  | at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293)
  | at 
org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
  | at $Proxy51.create(Unknown Source)
  | at test.TestSessionBean.getInternalSessionLocal(TestSessionBean.java:73)
  | at test.TestSessionBean.checkRoles(TestSessionBean.java:210)
  | at test.TestSessionBean.checkLocal(TestSessionBean.java:187)
  | at test.TestSessionBean.ejbActivate(TestSessionBean.java:127)
  | at 
org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:331)
  | at 
org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)
  | at 
org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:107)
  | at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:211)
  | at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:314)
  | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
  | 
  | 
  | 
  | 
  | The bit of code where the exception occurs is where create() is called on the 
InternalSession ( which requires internal role ) below:
  | 
  | 
  |   |  private InternalSessionLocal getInternalSessionLocal()
  |   | throws EJBException {
  |   | 
  |   | try {
  |   | 
  |   | InitialContext initCtx = new InitialContext();
  |   | InternalSessionLocalHome ilocalhome = 
(InternalSessionLocalHome)initCtx.lookup( 
  |   |java:comp/env/ejb/test/InternalSession
  |   |);
  |   | return ilocalhome.create();
  |   | 
  |   | } catch (Exception e ) {
  |   | log.error( Exception getting internal session.,e);
  |   | throw new EJBException( exception getting internal session,e);
  |   | }
  |   | 
  |   | }
  |   | 
  |   | 
  | 
  | I have tested this on jboss-3.2.3 and jboss-4.0.0DR3, and the results are the 
same.   So the question is: Should jboss be applying the run-as role when ejbActivate 
is invoked?  My reading of the 2.0 spec suggests that is should, but I am not by any 
means an expert.
  | 
  | Thanks,
  | Ed

a 
href=http://www.jboss.org/index.html?module=bbop=viewtopicp=3826767#3826767;View 
the original post/a

a 
href=http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3826767Reply 
to the post/a


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - sfsb ejbActivate and run-as role

2004-03-19 Thread edstorm
Quick question for the experts: I am using jboss-3.2.3 and I have a sfsb with a run-as 
role set.  Everything works fine, except when the container calls ejbActivate - I get 
security exceptions that lead me to believe that the run-as role is not being 
associated with the call.  I have found this in the bug tracker:

http://sourceforge.net/tracker/index.php?func=detailaid=558362group_id=22866atid=376685

But this seems to have been reported against the 2.x jboss versions.  I also found 
this patch:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg42073.html

The issue is with a passivate call, but it appears simillar to what I am seeing. 
My question is: Is there a problem with my code, or is it the case that the run-as 
role is not being applied to calls to ejbActivate?

Thanks,
Ed
 

a 
href=http://www.jboss.org/index.html?module=bbop=viewtopicp=3826565#3826565;View 
the original post/a

a 
href=http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3826565Reply 
to the post/a


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user