Re: [Zope] Zope, Apache, REMOTE_USER

2006-01-11 Thread Thomas Bennett
Don't know if this will work for you but since I put Apache in front of Zope 
I've had to change all REMOTE_USER to HTTP_X_FORWARDED_FOR for use in scripts 
that used the REMOTE_USER value before.

Thomas

On Monday 19 December 2005 15:12, Robert Boyd wrote:
> I'm using Apache 2.0, and I cannot find a solution to passing the
> value of REMOTE_USER from Apache to Zope when using a rewrite rule. I
> have Apache rewriting requests for Zope, and hooked into Tomcat with
> mod_jk. My users login through a servlet, and Apache has REMOTE_USER
> available to it. But any subsequent request to Zope loses this value.
> I used to have this all working when using FastCGI, but I'm hoping to
> use only mod_rewrite. Is it possible?
>
> Thanks,
> Rob

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box
University Library  Boone, North Carolina 28608

Please use the Systems Help Desk at http://linux.library.appstate.edu/help
All in Systems receive an email with each submission.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope, Apache, REMOTE_USER

2005-12-21 Thread Alan Milligan
Robert Boyd wrote:

> FWIW, my situation is a Shibboleth setup where I wrote a customized
> Cookie Crumbler to recognize the identity of an authenticated user
> requesting a Zope CMF site. It identifies the principal's user id
> through REMOTE_USER.
Hmmm, I think what is happening is that Zope's HTTPRequest is grabbing
the AUTHORISATION header and processing it, sticking the contents into
the _auth attribute.  You should probably grab it from here.

Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope, Apache, REMOTE_USER

2005-12-21 Thread Robert Boyd
> Regardless, REMOTE_USER is just an environment variable, and if you can
> *prove* it's being set in Apache but not passed to Zope, I'd be surprised.
>
> You can also use Apache directives to do this as well.  It's been a
> while but SetEnv does spring to mind...
>

It's an environment variable in the Authorization headers, which are
(in my limited knowledge) not treated the same as variables in request
headers. I have found no mention of how to achieve this in purely
redirect/proxy setups; only through CGI or CGI-like setups.

SetEnv does not work, at least not in the form
SetEnv REMOTE_USER %{REMOTE_USER} or
SetEnv REMOTE_USER %LA-U:{REMOTE_USER}

I also tried mod_headers to no avail.

Every example of Zope-Apache configuration that I've found so far says
that when needing to pass remote user, you cannot go with the
proxy/rewrite route. If anyone has a working config proving this
wrong, please enlighten me.

FWIW, my situation is a Shibboleth setup where I wrote a customized
Cookie Crumbler to recognize the identity of an authenticated user
requesting a Zope CMF site. It identifies the principal's user id
through REMOTE_USER.

FastCGI with Zope has been flakey for me in the past and therefore I'd
like to take it out of the equation.

Rob
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope, Apache, REMOTE_USER

2005-12-21 Thread Alan Milligan
Jens Vagelpohl wrote:
> I think you missed the point. The main reason to ditch it is the fact 
> that there is no one who is willing and able to support the code for  it
> in Zope. Just because someone comes up with a combination where  FCGI
> might have a benefit still does not give us a developer to  support it.
> 
> jens
> 
> On 21 Dec 2005, at 04:48, David Bear wrote:
> 
>> could this be one reason to keep fastcgi?
>>
>> On 12/19/05, Robert Boyd <[EMAIL PROTECTED]> wrote: I'm using 
>> Apache 2.0, and I cannot find a solution to passing the
>> value of REMOTE_USER from Apache to Zope when using a rewrite rule. I
>> have Apache rewriting requests for Zope, and hooked into Tomcat with
>> mod_jk. My users login through a servlet, and Apache has REMOTE_USER
>> available to it. But any subsequent request to Zope loses this value.
>> I used to have this all working when using FastCGI, but I'm hoping to
>> use only mod_rewrite. Is it possible?
>>

Regardless, REMOTE_USER is just an environment variable, and if you can
*prove* it's being set in Apache but not passed to Zope, I'd be surprised.

You can also use Apache directives to do this as well.  It's been a
while but SetEnv does spring to mind...

Alan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope, Apache, REMOTE_USER

2005-12-21 Thread Jens Vagelpohl
I think you missed the point. The main reason to ditch it is the fact  
that there is no one who is willing and able to support the code for  
it in Zope. Just because someone comes up with a combination where  
FCGI might have a benefit still does not give us a developer to  
support it.


jens

On 21 Dec 2005, at 04:48, David Bear wrote:


could this be one reason to keep fastcgi?

On 12/19/05, Robert Boyd <[EMAIL PROTECTED]> wrote: I'm using  
Apache 2.0, and I cannot find a solution to passing the

value of REMOTE_USER from Apache to Zope when using a rewrite rule. I
have Apache rewriting requests for Zope, and hooked into Tomcat with
mod_jk. My users login through a servlet, and Apache has REMOTE_USER
available to it. But any subsequent request to Zope loses this value.
I used to have this all working when using FastCGI, but I'm hoping to
use only mod_rewrite. Is it possible?

Thanks,
Rob

___
Zope maillist  -   Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )





--
David Bear
What's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope, Apache, REMOTE_USER

2005-12-20 Thread David Bear
could this be one reason to keep fastcgi?On 12/19/05, Robert Boyd <[EMAIL PROTECTED]> wrote:
I'm using Apache 2.0, and I cannot find a solution to passing thevalue of REMOTE_USER from Apache to Zope when using a rewrite rule. I
have Apache rewriting requests for Zope, and hooked into Tomcat withmod_jk. My users login through a servlet, and Apache has REMOTE_USERavailable to it. But any subsequent request to Zope loses this value.
I used to have this all working when using FastCGI, but I'm hoping touse only mod_rewrite. Is it possible?Thanks,Rob___Zope maillist  -  
Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope**   No cross posts or HTML encoding!  **(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope, Apache, REMOTE_USER

2005-12-19 Thread Robert Boyd
I'm using Apache 2.0, and I cannot find a solution to passing the
value of REMOTE_USER from Apache to Zope when using a rewrite rule. I
have Apache rewriting requests for Zope, and hooked into Tomcat with
mod_jk. My users login through a servlet, and Apache has REMOTE_USER
available to it. But any subsequent request to Zope loses this value.
I used to have this all working when using FastCGI, but I'm hoping to
use only mod_rewrite. Is it possible?

Thanks,
Rob
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )