users@jax-rpc.java.net

RE: Question about security

From: Merten Schumann <Merten.Schumann_at_asg.com>
Date: Mon, 24 Oct 2005 16:31:14 +0200

hm, you should check if the endpoint is really protected ...
if you do not set the properties at the stub, what happens? if the server is responding with a result and not "unauthorized" your endpoint does not require auth ...
   Merten

> -----Original Message-----
> From: Mariano Garcia [mailto:mgarcia_at_entel.es]
> Sent: Monday, October 24, 2005 2:47 PM
> To: users_at_jax-rpc.dev.java.net
> Subject: RE: Question about security
>
> I have used that code, but no principal is returned :S (a
> null value is
> returned instead).
>
> On Mon, 2005-10-24 at 14:01 +0200, Merten Schumann wrote:
> > Mariano,
> >
> > do something like this in your server side
> >
> > // implement interface javax.xml.rpc.server.ServiceLifecycle
> > public void init(final Object context) throws ServiceException
> > {
> > myServletEndpointContext=(ServletEndpointContext)context;
> > }
> >
> > and then use the context
> >
> > context.getUserPrincipal()
> >
> > cu
> > Merten
> >
> > > -----Original Message-----
> > > From: Mariano Garcia [mailto:mgarcia_at_entel.es]
> > > Sent: Monday, October 24, 2005 1:53 PM
> > > To: Lists - jax-rpc
> > > Subject: Question about security
> > >
> > > Hi all,
> > >
> > > I have a problem with a webservice using jax-rpc. The
> server in which
> > > the webservice is going to be deployed needs a HTTP basic
> > > authentication
> > > (I mean, when I try to load a web page from that server, a
> > > dialog answer
> > > me to put a username and password).
> > >
> > > >From client side I use stub properties in order to authenticate:
> > >
> > > stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,
> "username");
> > > stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,
> "password");
> > >
> > > Is there any way to get this values from server side? I
> have tried to
> > > use ServiceLifecycle and ServletEndpointContext classes, but
> > > I don't how
> > > to use them correctly.
> > >
> > > Tips?
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
> --
> Mariano García González :: Analista Programador
> -----------------------------------------------
>
> Entel IT Consulting, SA
> Tlf. 91 567 07 36
> Mobile. 619 08 70 90
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>