[Zope] How to set-up authentication of pages

Andres Corrada andres@corrada.com
Tue, 30 Nov 1999 10:16:33 -0500


Michel Pelletier wrote:
> 
> I think it would be much easier for you if you got rid of mod_auth_mysql
> and let Zope handle all the authentication.
> 
> Descriptions of Users, Permissions, and Roles can be found in the
> documentation section of the Zope site in the Zope Content Manager's
> Guide.

Thanks Michel and Chris for your answers. I'm new to Zope and I
foolhardily put into a project I had to deliver two weeks ago. The
extensive learning process in Zope is making it hard for me to decide
how to get around problems I encounter. I've read the documentation but
it doesn't solve my problem because I want an automatic way of adding
members to a client's site. I know how to do that with mod_auth_mysql
because I can write the Python script that adds form information to the
mysql database. What Zope functions can I call from my scripts to do
this addition to the Zope users database? The ZCMG only has "hand
insertion" of users into Zope.

By the way, I partly suceeded in doing authentication with
mod_auth_mysql by having the following lines in my virtual host
directive:

RewriteCond %{HTTP:Authorization} ^/(.*)
RewriteRule ^/(.*) /path/to/my/Zope/directory/Zope.cgi/$1
[e=HTTP_CGI_AUTHORIZATION:%1,
t=application/x-httpd-cgi,l]
<Location ~ ".*/Members">
	AuthType Basic
	.
	.
	.
</Location>

When I try to access the members page I get an authentication query by
Apache but Zope immediately asks for authentication also, whereupon I'm
rudely told that a Zope error has ocurred. Why the double
authentication? Why is Zope requiring authentication?

------------------------------------------------------
Andres Corrada-Emmanuel   Email: andres@corrada.com
Owner                     http://www.corrada.com/mamey
Mamey                     Phone: (413) 587-9595
------------------------------------------------------