- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] HTTPD Authenticated User extraction
- From: Daniel Pittman <daniel@xxxxxxxxxxxx>
- Date: Sun, 12 Jul 2009 14:07:10 +1000
- Organization: How about yours? http://rimspace.net/resume/
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux)
Kyle <kl@xxxxxxxxxxx> writes:
> Kyle wrote:
>> Hi Sluggers,
>>
>> I have a prob I hope you can help with pls. And I realise it might be a
>> little outside a general Linux question. But if you have knowledge or are
>> able to point me to the best forum/newsgroup/whatever, I would be grateful.
>>
>> I have a situation where htpasswd access is being used to authenticate user
>> access to a particular URL by apache.
>>
>> Once authenticated, apache processes the relevant URL which is actually a
>> pass-off to Tomcat. What I need to do is get hold of the now-authenticated
>> user-name (i.e. the user name apache has just allowed through) and be able
>> to attach that username to the POST now being sent to Tomcat.
<Location "/example">
# Make sure you use set, in all cases, so that a client can't fake
# the header.
RequestHeader set X-My-Auth-Id %{REMOTE_USER}e
</Location>
That should sort you right on out.
Regards,
Daniel
--
✣ Daniel Pittman ✉ daniel@xxxxxxxxxxxx ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons