Dear Allura developers,

I am currently having troubles setting up Auth with Apache with the provided ApacheAccessHandler.py.

I have checked and tried that the configuration without authentication works (both pull and push), however, with auth (following the last section of https://forge-allura.apache.org/docs/getting_started/scm_host.html), we keep getting ERROR 500.

After inspecting the Apache error log, as well as playing with ApacheAccessHandler.py, I noticed that "req.user" is always None, even though in git config the url is set to "https://<username>@<our-url>/git/p/testgit/code", where "testgit" is a project created using Allura's web front end (and both git push and git pull worked previously without the auth setup).

In ApacheAccessHandler.py, the line
"password = req.get_basic_auth_pw()" precedes the line
"username = req.user"
but then both "password" and "username" turn out to be None.

Did I overlook anything? Attached below is our sites-enabled/000-default.conf:

   <VirtualHost *:<port>>
        DocumentRoot /srv/git

        SSLEngine On
        SSLCertificateFile    <cert-file>
        SSLCertificateKeyFile <key-file>

        <Directory "/srv/git">
        Allow from all
        Options +ExecCGI
        AllowOverride none
        Require all granted
        </Directory>

        SetEnv GIT_PROJECT_ROOT /srv/git
        SetEnv GIT_HTTP_EXPORT_ALL
        ProxyPass /git/ !
        ScriptAlias /git /usr/lib/git-core/git-http-backend/

           SetEnv REMOTE_USER=git-allura

        <LocationMatch "^/(git)/">

        AuthType Basic
        AuthName "SCM Access"
        AuthBasicAuthoritative off

        AddHandler mod_python .py

        PythonDebug On

        PythonOption ALLURA_VIRTUALENV /path/to/env-allura

        PythonOption ALLURA_PERM_URL
   https://localhost:<allura-port>/auth/repo_permissions
        PythonOption ALLURA_AUTH_URL
   https://localhost:<allura-port>/auth/do_login

        PythonAccessHandler /path/to/ApacheAccessHandler.py
        </LocationMatch>

   </VirtualHost>

Thanks,
-1one.w01f

Reply via email to