> If your Zope auth solution can put a header in the http response, then > you can use a custom apache logging directive to put this in your
 > Apache log in place of what it thinks the username is.
I put this on the "log" method of the medusa/http_server.py file:

As you've found out, this is the wrong level to do this ;-)
Yes, I must confess I didn't read your suggestion the first time.

and set my apache access log like this:
CustomLog /home/apache/httpd/logs/access_log combined

[Some Apache config comes here]...
>>> There you see the %l and %u directives, which are the "Remote
>>> logname" and the "Remote user".

Yeah, these aren't the ones you want to be using ;-)

But apache still doesn't get the zope authenticated user. So, Chris, do you remember what header you set, where, and which method you used?
Ok, Answering to this question. I guess I had to set the header inside the authenticate method of the BasicUserFolder class. Here is what I did:

def authenticate(self, name, password, request):
>> [Some code comes here]...

Well, I wouldn't use that header, try using X-MyUserName instead, and then in the apache config you'd use %{X-MyUserName}o
Thanks Chris, that was exactly what I was looking for. Now Apache logs
the correct authenticated user.


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

Reply via email to