please take these to jboss-user,
also oleg, lets' get someone to write the security stuff for you :)
marc
|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Peter Braswell
|Sent: Saturday, January 06, 2001 7:02 PM
|To: jBoss Developer
|Subject: Re: [jBoss-Dev] getCallerPrincipal(), Atten: Oleg
|
|
|Oleg,
|Okay... I added the following to my jboss.xml
|deployment descriptor:
|
| <authentication-module>
| java:/EJBSecurityManager
| </authentication-module>
| <role-mapping-manager>
| java:/SimpleRealmMapping
| </role-mapping-manager>
|
|Unfortunately, same exception...???
|
|Sorry to keep bothering you!
|
|cheers,
|peter
|
|
|
|
|
|--- Oleg Nitz <[EMAIL PROTECTED]> wrote:
|> Peter,
|>
|> have you added security-related elements inside
|> "container-configuration" elements of jboss.xml?
|> If not, see
|>
|http://www.mail-archive.com/[email protected]/msg05561.html
|>
|> Regards,
|> Oleg
|>
|> On Saturday 06 January 2001 06:59, Peter Braswell
|> wrote:
|> > Oleg,
|> > So sorry to keep bothering you, but...
|> >
|> > I surfed through the archive and found a pretty
|> > concise tutorial you passed along to a questioner.
|> > Briefly it went something like this:
|> >
|> > Construct a LoginContext, pass your callback
|> handler.
|> >
|> > I implemented the
|> > javax.security.auth.callback.CallbackHanderl
|> interface
|> > and coded it to pass along a user_id/password when
|> the
|> > callback is invoked.
|> >
|> > All this works as advertised. The container
|> evidenly
|> > calls back on my handler. I've got output
|> statements
|> > to verify.
|> >
|> > My BEAN makes a call to:
|> > System.out.println("Getting
|> CallerPrincipal...");
|> > Principal principal =
|> > sessionCtx.getCallerPrincipal();
|> > [This is line #166]->
|> > ctx.principleName = principal.getName();
|> >
|> > Evidently principal = null because I get the
|> following
|> > stack trace:
|> >
|> > [StatefulSessionBean] Getting EJBHome...
|> > [StatefulSessionBean] Getting CallerPrincipal...
|> > [StatefulSessionBean] Calling beforeCompletion(
|> )...
|> > [StatefulSessionBean] Calling afterCompletion( )
|> > [StatefulSessionBean] isCommited = false
|> > [StatefulSessionBean] TRANSACTION ROLLBACK
|> > EXCEPTION:null; nested exception is:
|> >
|> > javax.ejb.EJBException
|> > [StatefulSessionBean]
|> java.lang.NullPointerException
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.test.cts.ejb.StatefulSessionBean.getBeanCon
|> > textInfo(StatefulSessionBean.java:166)
|> > [StatefulSessionBean] at
|> > java.lang.reflect.Method.invoke(Native Method)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.StatefulSessionContainer$ContainerInter
|> > ceptor.invoke(StatefulSessionContainer.java:570)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.SecurityInterceptor.invoke(Secu
|> > rityInterceptor.java:144)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.StatefulSessionInstanceIntercep
|> >
|>
|tor.invoke(StatefulSessionInstanceInterceptor.java:198)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxI
|> > nterceptorCMT.java:133)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransac
|> > tions(TxInterceptorCMT.java:263)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInter
|> > ceptorCMT.java:99)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterc
|> > eptor.java:192)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.StatefulSessionContainer.invoke(Statefu
|> > lSessionContainer.java:326)
|> > [StatefulSessionBean] at
|> >
|>
|org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoke
|> > r.invoke(JRMPContainerInvoker.java:163)
|> > [StatefulSessionBean] at
|> > java.lang.reflect.Method.invoke(Native Method)
|> > [StatefulSessionBean] at
|> > sun.rmi.server.UnicastServerRef.dispatch(Unknown
|> Sour
|> > ce)
|> > [StatefulSessionBean] at
|> > sun.rmi.transport.Transport$1.run(Unknown Source)
|> > [StatefulSessionBean] at
|> > java.security.AccessController.doPrivileged(Native
|> Me
|> > thod)
|> > [StatefulSessionBean] at
|> > sun.rmi.transport.Transport.serviceCall(Unknown
|> Sourc
|> > e)
|> > [StatefulSessionBean] at
|> >
|>
|sun.rmi.transport.tcp.TCPTransport.handleMessages(Unk
|> > nown Source)
|> > [StatefulSessionBean] at
|> >
|>
|sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.
|> > run(Unknown Source)
|> > [StatefulSessionBean] at
|> > java.lang.Thread.run(Unknown Source)
|> >
|> > --- Oleg Nitz <[EMAIL PROTECTED]> wrote:
|> > > Hi Peter,
|> > >
|> > > Please, search jboss-user mail archive for
|> "JAAS".
|> > > Sorry, my internal battery is too low to repeat
|> the
|> > > instructions once
|> > > more.
|> > > I should write the manual on security, I know
|> > > that...
|> > >
|> > > Regards,
|> > > Oleg
|> >
|> > __________________________________________________
|> > Do You Yahoo!?
|> > Yahoo! Photos - Share your holiday photos online!
|> > http://photos.yahoo.com/
|>
|
|
|__________________________________________________
|Do You Yahoo!?
|Yahoo! Photos - Share your holiday photos online!
|http://photos.yahoo.com/
|
|