[Zope] Granting access by reading http headers (Consulting opportunity)

Tino Wildenhain tino at wildenhain.de
Fri Feb 17 14:19:08 EST 2006


Marc Schnapp schrieb:
> If anyone here has the consulting expertise to help implement a
> solution, please email me separately at m + schnapp + service + marc +
> dot + com.

Its much easier as you might think. You dont even change Zope for this
if you are using apache as front end proxy via usual mod_rewrite/mod_proxy

You simply create a user for your crawler, login as this user and
grep the cookie (assuming you are using some kind of cookie based
auth - basic auth would work similar)
(For example using live-http-headers (mozilla/firefox) or some
sniffer or whatever)

http://httpd.apache.org/docs/2.0/mod/mod_setenvif.html
http://httpd.apache.org/docs/2.0/mod/mod_headers.html

will tell you how to set the Cookie Header as
if provided by the Crawler client. (A Cookie after
all is just another HTTP Header)

So if the conditions match: client-ip = your special crawler
and useragent = your crawler -> RequestHeader set Cookie ...

Ah, and btw. maybe you just use ZCatalog and skip using
external crawler :-)

Regards
Tino


More information about the Zope mailing list