I have the following setup,
WSGIScriptAlias /i C:/Project/Scripts/hello.wsgi WSGIScriptAlias /hello C:/Project/Scripts/hello.wsgi <Directory "C:/Project/Scripts"> Order deny,allow Allow from all </Directory> <Location /i> AuthType Basic AuthName "Top Secret" AuthBasicProvider wsgi WSGIAuthUserScript C:/Project/Scripts/authn.wsgi WSGIAccessScript C:/Project/Scripts/auths.wsgi Require valid-user </Location> <Location /hello> AuthType Basic AuthName "Top Secret" AuthBasicProvider wsgi WSGIAuthUserScript C:/Project/Scripts/authn.wsgi Require valid-user </Location>
def check_password(environ, user, password): if user == 'admin' or user == 'spy': if password == 'secret': return True return False return None
def allow_access(environ, host): if environ.get('REMOTE_USER'): if environ['REMOTE_USER'] == 'admin': return True return False
Requests for _http://localhost/hello pop the login request as expected ... it works fine!
Requests for _http://localhost/i don't pop login and return 403 Forbidden
Am i missing something?! isn't WSGIAccessScript supposed to do authorisation?!
thank you :\
i get the error that the key 'REMOTE_USER'.
i supose the auth script isn't running :S
i was testing this to do authorisation of multiple subversion repositories based on db information,
there is a way to do this returning 403 forbidden if authenticated and not authorised ?!
i know this is possible with mod_python but i didnt't want to mix mod_python with mod_wsgi.