You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ed Thompson <et...@carolina.rr.com> on 2002/08/14 03:57:53 UTC

j_username in session cookie - where did it go?

I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
Tomcat 4.0.4.

I am using form based authentication, and found under 3.2 I could pull
j_username out of the session cookie after authenticaion was done.

Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling 3.2
and installing 4.0.4 from scratch..

Can anyone shed light on what is (not) happening?  Have the rules changed or
have I not cfg'd something properly?

Thanx!
Ed



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by Ben Walding <be...@walding.com>.
It was possibly an undocumented (and not part of the spec) feature.

You should just use => request.getRemoteUser()

Where request is passed in through doGet(request, response)  or however 
that works in JSP.

Ed Thompson wrote:

>I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
>Tomcat 4.0.4.
>
>I am using form based authentication, and found under 3.2 I could pull
>j_username out of the session cookie after authenticaion was done.
>
>Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
>Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling 3.2
>and installing 4.0.4 from scratch..
>
>Can anyone shed light on what is (not) happening?  Have the rules changed or
>have I not cfg'd something properly?
>
>Thanx!
>Ed
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: j_username in session cookie - where did it go?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 14 Aug 2002, Mark Schmeets wrote:

> Date: Wed, 14 Aug 2002 10:54:04 -0400
> From: Mark Schmeets <ma...@chipware.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: RE: j_username in session cookie - where did it go?
>
> whoa, that seems like a very oversimplified answer. Some of us require
> security at the data level too. A "solution" like that makes Tomcat's
> authentication useless in that situation...
>

If you base your data security on the fact that the container has already
authenticated the user (and if you trust the container), why do you need
the password again?  You already know who the user is, and you can find
out if he/she has a particular role used to protect the data you are
checking for access rights to.

>
> Mark

Craig


>
>
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Tuesday, August 13, 2002 11:11 PM
> To: Tomcat Users List
> Subject: Re: j_username in session cookie - where did it go?
>
>
>
>
> On Tue, 13 Aug 2002, Ed Thompson wrote:
>
> > Date: Tue, 13 Aug 2002 22:56:32 -0400
> > From: Ed Thompson <et...@carolina.rr.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: Re: j_username in session cookie - where did it go?
> >
> > I was also scrapping the password - used j_userbane and j_passwd  for
> > database access.
> >
>
> There is no portable way to do that.  And Tomcat 4 does not expose them,
> because the password because it is none of the app's business -- the user
> is either authenticated or not.
>
> > Any hints on that one?
>
> Re-architect your app so that it needs only the username.
>
> Craig
>
>
> >
> > ----- Original Message -----
> > From: "Craig R. McClanahan" <cr...@apache.org>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Tuesday, August 13, 2002 10:41 PM
> > Subject: Re: j_username in session cookie - where did it go?
> >
> >
> > >
> > >
> > > On Tue, 13 Aug 2002, Ed Thompson wrote:
> > >
> > > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > > From: Ed Thompson <et...@carolina.rr.com>
> > > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > > Subject: j_username in session cookie - where did it go?
> > > >
> > > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > > > Tomcat 4.0.4.
> > > >
> > > > I am using form based authentication, and found under 3.2 I could pull
> > > > j_username out of the session cookie after authenticaion was done.
> > > >
> > >
> > > That's not how it really worked under 3.2, although if you are using
> BASIC
> > > authentication you could decode the username out of the "Authorization"
> > > header.
> > >
> > > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it
> under
> > > > Tomcat 4.0.1 before I upgraded and it worked, but not after
> uninstalling
> > 3.2
> > > > and installing 4.0.4 from scratch..
> > > >
> > > > Can anyone shed light on what is (not) happening?  Have the rules
> > changed or
> > > > have I not cfg'd something properly?
> > > >
> > >
> > > The portable way to get ahold of the authenticated username is to call
> > > request.getRemoteUser().  See the servlet spec for more details on
> > > container managed security:
> > >
> > > http://java.sun.com/products/servlet/download.html
> > >
> > > > Thanx!
> > > > Ed
> > >
> > > Craig
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: j_username in session cookie - where did it go?

Posted by Mark Schmeets <ma...@chipware.com>.
whoa, that seems like a very oversimplified answer. Some of us require
security at the data level too. A "solution" like that makes Tomcat's
authentication useless in that situation...


Mark


-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Tuesday, August 13, 2002 11:11 PM
To: Tomcat Users List
Subject: Re: j_username in session cookie - where did it go?




On Tue, 13 Aug 2002, Ed Thompson wrote:

> Date: Tue, 13 Aug 2002 22:56:32 -0400
> From: Ed Thompson <et...@carolina.rr.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: j_username in session cookie - where did it go?
>
> I was also scrapping the password - used j_userbane and j_passwd  for
> database access.
>

There is no portable way to do that.  And Tomcat 4 does not expose them,
because the password because it is none of the app's business -- the user
is either authenticated or not.

> Any hints on that one?

Re-architect your app so that it needs only the username.

Craig


>
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Tuesday, August 13, 2002 10:41 PM
> Subject: Re: j_username in session cookie - where did it go?
>
>
> >
> >
> > On Tue, 13 Aug 2002, Ed Thompson wrote:
> >
> > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > From: Ed Thompson <et...@carolina.rr.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: j_username in session cookie - where did it go?
> > >
> > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > > Tomcat 4.0.4.
> > >
> > > I am using form based authentication, and found under 3.2 I could pull
> > > j_username out of the session cookie after authenticaion was done.
> > >
> >
> > That's not how it really worked under 3.2, although if you are using
BASIC
> > authentication you could decode the username out of the "Authorization"
> > header.
> >
> > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it
under
> > > Tomcat 4.0.1 before I upgraded and it worked, but not after
uninstalling
> 3.2
> > > and installing 4.0.4 from scratch..
> > >
> > > Can anyone shed light on what is (not) happening?  Have the rules
> changed or
> > > have I not cfg'd something properly?
> > >
> >
> > The portable way to get ahold of the authenticated username is to call
> > request.getRemoteUser().  See the servlet spec for more details on
> > container managed security:
> >
> > http://java.sun.com/products/servlet/download.html
> >
> > > Thanx!
> > > Ed
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 13 Aug 2002, Ed Thompson wrote:

> Date: Tue, 13 Aug 2002 22:56:32 -0400
> From: Ed Thompson <et...@carolina.rr.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: j_username in session cookie - where did it go?
>
> I was also scrapping the password - used j_userbane and j_passwd  for
> database access.
>

There is no portable way to do that.  And Tomcat 4 does not expose them,
because the password because it is none of the app's business -- the user
is either authenticated or not.

> Any hints on that one?

Re-architect your app so that it needs only the username.

Craig


>
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Tuesday, August 13, 2002 10:41 PM
> Subject: Re: j_username in session cookie - where did it go?
>
>
> >
> >
> > On Tue, 13 Aug 2002, Ed Thompson wrote:
> >
> > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > From: Ed Thompson <et...@carolina.rr.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: j_username in session cookie - where did it go?
> > >
> > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > > Tomcat 4.0.4.
> > >
> > > I am using form based authentication, and found under 3.2 I could pull
> > > j_username out of the session cookie after authenticaion was done.
> > >
> >
> > That's not how it really worked under 3.2, although if you are using BASIC
> > authentication you could decode the username out of the "Authorization"
> > header.
> >
> > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
> > > Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling
> 3.2
> > > and installing 4.0.4 from scratch..
> > >
> > > Can anyone shed light on what is (not) happening?  Have the rules
> changed or
> > > have I not cfg'd something properly?
> > >
> >
> > The portable way to get ahold of the authenticated username is to call
> > request.getRemoteUser().  See the servlet spec for more details on
> > container managed security:
> >
> > http://java.sun.com/products/servlet/download.html
> >
> > > Thanx!
> > > Ed
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by Ed Thompson <et...@carolina.rr.com>.
I was also scrapping the password - used j_userbane and j_passwd  for
database access.

Any hints on that one?

----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, August 13, 2002 10:41 PM
Subject: Re: j_username in session cookie - where did it go?


>
>
> On Tue, 13 Aug 2002, Ed Thompson wrote:
>
> > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > From: Ed Thompson <et...@carolina.rr.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: j_username in session cookie - where did it go?
> >
> > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > Tomcat 4.0.4.
> >
> > I am using form based authentication, and found under 3.2 I could pull
> > j_username out of the session cookie after authenticaion was done.
> >
>
> That's not how it really worked under 3.2, although if you are using BASIC
> authentication you could decode the username out of the "Authorization"
> header.
>
> > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
> > Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling
3.2
> > and installing 4.0.4 from scratch..
> >
> > Can anyone shed light on what is (not) happening?  Have the rules
changed or
> > have I not cfg'd something properly?
> >
>
> The portable way to get ahold of the authenticated username is to call
> request.getRemoteUser().  See the servlet spec for more details on
> container managed security:
>
> http://java.sun.com/products/servlet/download.html
>
> > Thanx!
> > Ed
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 14 Aug 2002, Ed Thompson wrote:

> Date: Wed, 14 Aug 2002 19:27:03 -0400
> From: Ed Thompson <et...@carolina.rr.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: j_username in session cookie - where did it go?
>
> OK, exploring the alternatives -
>
> I authenticate, then I  call the snoop.jsp in the tomcat examples directory,
> and it indicates remote User is null.
>
> Am I missing something else?
>

Authentication is per-webapp unless you turn on the Single Sign On
feature.  See "http://localhost:8080/tomcat-docs/config/host.html" for
more about single sign on (under Special Features).

Craig


> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Tuesday, August 13, 2002 10:41 PM
> Subject: Re: j_username in session cookie - where did it go?
>
>
> >
> >
> > On Tue, 13 Aug 2002, Ed Thompson wrote:
> >
> > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > From: Ed Thompson <et...@carolina.rr.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: j_username in session cookie - where did it go?
> > >
> > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > > Tomcat 4.0.4.
> > >
> > > I am using form based authentication, and found under 3.2 I could pull
> > > j_username out of the session cookie after authenticaion was done.
> > >
> >
> > That's not how it really worked under 3.2, although if you are using BASIC
> > authentication you could decode the username out of the "Authorization"
> > header.
> >
> > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
> > > Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling
> 3.2
> > > and installing 4.0.4 from scratch..
> > >
> > > Can anyone shed light on what is (not) happening?  Have the rules
> changed or
> > > have I not cfg'd something properly?
> > >
> >
> > The portable way to get ahold of the authenticated username is to call
> > request.getRemoteUser().  See the servlet spec for more details on
> > container managed security:
> >
> > http://java.sun.com/products/servlet/download.html
> >
> > > Thanx!
> > > Ed
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by Milt Epstein <me...@uiuc.edu>.
On Wed, 14 Aug 2002, Ed Thompson wrote:

> It defaults to true, and I don't have it explicitly set.

Yeah, but what I was saying is that sometimes you need it to be false
(i.e. you need to explicitly set it to false).


> I got getRemoteUser to work, now I just need to find a password
> passing strategy...

If you got getRemoteUser to work, then the above is not the problem.
As to a password passing strategy, I suggest heeding Craig's advice.


> ----- Original Message -----
> From: "Milt Epstein" <me...@uiuc.edu>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, August 14, 2002 7:54 PM
> Subject: Re: j_username in session cookie - where did it go?
>
>
> > On Wed, 14 Aug 2002, Ed Thompson wrote:
> >
> > > OK, exploring the alternatives -
> > >
> > > I authenticate, then I  call the snoop.jsp in the tomcat examples
> > > directory, and it indicates remote User is null.
> > >
> > > Am I missing something else?
> >
> > Are you doing this through Apache, or Tomcat standalone?  If the
> > former, do you have tomcatAuthentication="false" in your Connector tag
> > in your server.xml?  I had to put that in there for the AJP connector
> > in order to get this to work.
> >
> >
> > > ----- Original Message -----
> > > From: "Craig R. McClanahan" <cr...@apache.org>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Tuesday, August 13, 2002 10:41 PM
> > > Subject: Re: j_username in session cookie - where did it go?
> > >
> > >
> > > >
> > > >
> > > > On Tue, 13 Aug 2002, Ed Thompson wrote:
> > > >
> > > > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > > > From: Ed Thompson <et...@carolina.rr.com>
> > > > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > > > Subject: j_username in session cookie - where did it go?
> > > > >
> > > > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2
> to
> > > > > Tomcat 4.0.4.
> > > > >
> > > > > I am using form based authentication, and found under 3.2 I could
> pull
> > > > > j_username out of the session cookie after authenticaion was done.
> > > > >
> > > >
> > > > That's not how it really worked under 3.2, although if you are using
> BASIC
> > > > authentication you could decode the username out of the
> "Authorization"
> > > > header.
> > > >
> > > > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it
> under
> > > > > Tomcat 4.0.1 before I upgraded and it worked, but not after
> uninstalling
> > > 3.2
> > > > > and installing 4.0.4 from scratch..
> > > > >
> > > > > Can anyone shed light on what is (not) happening?  Have the rules
> > > changed or
> > > > > have I not cfg'd something properly?
> > > > >
> > > >
> > > > The portable way to get ahold of the authenticated username is to call
> > > > request.getRemoteUser().  See the servlet spec for more details on
> > > > container managed security:
> > > >
> > > > http://java.sun.com/products/servlet/download.html
> > > >
> > > > > Thanx!
> > > > > Ed
> > > >
> > > > Craig
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > >
> >
> > Milt Epstein
> > Research Programmer
> > Systems and Technology Services (STS)
> > Campus Information Technologies and Educational Services (CITES)
> > University of Illinois at Urbana-Champaign (UIUC)
> > mepstein@uiuc.edu
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by Ed Thompson <et...@carolina.rr.com>.
It defaults to true, and I don't have it explicitly set.

I got getRemoteUser to work, now I just need to find a password passing
strategy...

----- Original Message -----
From: "Milt Epstein" <me...@uiuc.edu>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, August 14, 2002 7:54 PM
Subject: Re: j_username in session cookie - where did it go?


> On Wed, 14 Aug 2002, Ed Thompson wrote:
>
> > OK, exploring the alternatives -
> >
> > I authenticate, then I  call the snoop.jsp in the tomcat examples
> > directory, and it indicates remote User is null.
> >
> > Am I missing something else?
>
> Are you doing this through Apache, or Tomcat standalone?  If the
> former, do you have tomcatAuthentication="false" in your Connector tag
> in your server.xml?  I had to put that in there for the AJP connector
> in order to get this to work.
>
>
> > ----- Original Message -----
> > From: "Craig R. McClanahan" <cr...@apache.org>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Tuesday, August 13, 2002 10:41 PM
> > Subject: Re: j_username in session cookie - where did it go?
> >
> >
> > >
> > >
> > > On Tue, 13 Aug 2002, Ed Thompson wrote:
> > >
> > > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > > From: Ed Thompson <et...@carolina.rr.com>
> > > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > > Subject: j_username in session cookie - where did it go?
> > > >
> > > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2
to
> > > > Tomcat 4.0.4.
> > > >
> > > > I am using form based authentication, and found under 3.2 I could
pull
> > > > j_username out of the session cookie after authenticaion was done.
> > > >
> > >
> > > That's not how it really worked under 3.2, although if you are using
BASIC
> > > authentication you could decode the username out of the
"Authorization"
> > > header.
> > >
> > > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it
under
> > > > Tomcat 4.0.1 before I upgraded and it worked, but not after
uninstalling
> > 3.2
> > > > and installing 4.0.4 from scratch..
> > > >
> > > > Can anyone shed light on what is (not) happening?  Have the rules
> > changed or
> > > > have I not cfg'd something properly?
> > > >
> > >
> > > The portable way to get ahold of the authenticated username is to call
> > > request.getRemoteUser().  See the servlet spec for more details on
> > > container managed security:
> > >
> > > http://java.sun.com/products/servlet/download.html
> > >
> > > > Thanx!
> > > > Ed
> > >
> > > Craig
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
> Milt Epstein
> Research Programmer
> Systems and Technology Services (STS)
> Campus Information Technologies and Educational Services (CITES)
> University of Illinois at Urbana-Champaign (UIUC)
> mepstein@uiuc.edu
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by Milt Epstein <me...@uiuc.edu>.
On Wed, 14 Aug 2002, Ed Thompson wrote:

> OK, exploring the alternatives -
>
> I authenticate, then I  call the snoop.jsp in the tomcat examples
> directory, and it indicates remote User is null.
>
> Am I missing something else?

Are you doing this through Apache, or Tomcat standalone?  If the
former, do you have tomcatAuthentication="false" in your Connector tag
in your server.xml?  I had to put that in there for the AJP connector
in order to get this to work.


> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Tuesday, August 13, 2002 10:41 PM
> Subject: Re: j_username in session cookie - where did it go?
>
>
> >
> >
> > On Tue, 13 Aug 2002, Ed Thompson wrote:
> >
> > > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > > From: Ed Thompson <et...@carolina.rr.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: j_username in session cookie - where did it go?
> > >
> > > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > > Tomcat 4.0.4.
> > >
> > > I am using form based authentication, and found under 3.2 I could pull
> > > j_username out of the session cookie after authenticaion was done.
> > >
> >
> > That's not how it really worked under 3.2, although if you are using BASIC
> > authentication you could decode the username out of the "Authorization"
> > header.
> >
> > > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
> > > Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling
> 3.2
> > > and installing 4.0.4 from scratch..
> > >
> > > Can anyone shed light on what is (not) happening?  Have the rules
> changed or
> > > have I not cfg'd something properly?
> > >
> >
> > The portable way to get ahold of the authenticated username is to call
> > request.getRemoteUser().  See the servlet spec for more details on
> > container managed security:
> >
> > http://java.sun.com/products/servlet/download.html
> >
> > > Thanx!
> > > Ed
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by Ed Thompson <et...@carolina.rr.com>.
OK, exploring the alternatives -

I authenticate, then I  call the snoop.jsp in the tomcat examples directory,
and it indicates remote User is null.

Am I missing something else?

----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, August 13, 2002 10:41 PM
Subject: Re: j_username in session cookie - where did it go?


>
>
> On Tue, 13 Aug 2002, Ed Thompson wrote:
>
> > Date: Tue, 13 Aug 2002 21:57:53 -0400
> > From: Ed Thompson <et...@carolina.rr.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: j_username in session cookie - where did it go?
> >
> > I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> > Tomcat 4.0.4.
> >
> > I am using form based authentication, and found under 3.2 I could pull
> > j_username out of the session cookie after authenticaion was done.
> >
>
> That's not how it really worked under 3.2, although if you are using BASIC
> authentication you could decode the username out of the "Authorization"
> header.
>
> > Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
> > Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling
3.2
> > and installing 4.0.4 from scratch..
> >
> > Can anyone shed light on what is (not) happening?  Have the rules
changed or
> > have I not cfg'd something properly?
> >
>
> The portable way to get ahold of the authenticated username is to call
> request.getRemoteUser().  See the servlet spec for more details on
> container managed security:
>
> http://java.sun.com/products/servlet/download.html
>
> > Thanx!
> > Ed
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: j_username in session cookie - where did it go?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 13 Aug 2002, Ed Thompson wrote:

> Date: Tue, 13 Aug 2002 21:57:53 -0400
> From: Ed Thompson <et...@carolina.rr.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: j_username in session cookie - where did it go?
>
> I have just upgraded (uninstalled and reintsalled) from Tomcat 3.2 to
> Tomcat 4.0.4.
>
> I am using form based authentication, and found under 3.2 I could pull
> j_username out of the session cookie after authenticaion was done.
>

That's not how it really worked under 3.2, although if you are using BASIC
authentication you could decode the username out of the "Authorization"
header.

> Now under Tomcat 4 it doesn't seem to be there.  I know I tried it under
> Tomcat 4.0.1 before I upgraded and it worked, but not after uninstalling 3.2
> and installing 4.0.4 from scratch..
>
> Can anyone shed light on what is (not) happening?  Have the rules changed or
> have I not cfg'd something properly?
>

The portable way to get ahold of the authenticated username is to call
request.getRemoteUser().  See the servlet spec for more details on
container managed security:

http://java.sun.com/products/servlet/download.html

> Thanx!
> Ed

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>