[mod_python] Complicated GET configuration

vio vmilitaru at sympatico.ca
Fri Aug 16 16:27:01 EST 2002


* Hunter Matthews <thm at duke.edu> [020816 15:59]:
> ...
> There is a reference to it on:
> http://www.modpython.org/live/mod_python-2.7.8/doc-html/dir-handlers-syn.html

I see it. But I don't see 'PythonAuthzHandler' referenced anywhere in the 
main docs at
http://www.modpython.org/live/mod_python-2.7.8/doc-html/
I wonder why it's not documented?

> The goal here is that if the URL is 
> /XMLRPC/$RHN/anything
> 
> that we always run the Authz handler, and nothing else.
> 
> But since the requests aren't to a specific script 
> (like /XMLRPC/$RHN/redhat-7.3-i386/listPackages/200208142123/script.py)
> 
> but are instead 
> /XMLRPC/$RHN/redhat-7.3-i386/listPackages/200208142123
> 
> I'm not at all certain how to say
> 
> '''
> For all URLs under /XMLRPC/$RHN
> Please use the Authz handler to make sure the client is authorized,
> and if so,
> apache please send the client the file that was requested.
> '''

If I understand correctly, you only want to use the Authz handler from
mod_python, and nothing else.
I don't see a problem here, except for the undocumented Authz.
The way I would handle your problem whould be to just follow the instructions
in 'tut-more-complicated.html', see if it flies:

<Directory /XMLRPC/$RHN>
    AddHandler python-program .py
#    PythonHandler myscript - comment out to let Apache handle it
    PythonAuthenHandler yourAuthenScript
    AuthType Basic
    AuthName "Restricted Area"
    require valid-user
</Directory>


Have you tried something like this? (you'll have to write your own Authen 
handler, as described in 'tut-more-complicated.html')

Vio



More information about the Mod_python mailing list