#2258 closed defect (invalid)
Login authentication fails w/ AssertionError: Authentication information not available.
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | web frontend | Version: | 0.10.4 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The error trace:
Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 206, in handler dispatch_request(mpr.path_info, mpr, env) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 139, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 107, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 81, in process_request self._do_login(req) File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 102, in _do_login assert req.remote_user, 'Authentication information not available.' AssertionError: Authentication information not available.
Trac.ini File:
[trac] default_charset = iso-8859-15 ignore_auth_case = false permission_store = DefaultPermissionStore check_auth_ip = true database = sqlite:db/trac.db templates_dir = /usr/share/trac/templates default_handler = WikiModule metanav = login,logout,settings,help mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search repository_dir = /home/svn/repos/test authz_file = /home/svn/.svn-policy-file authz_module_name = test
Subversion Policy File
[/] * = [test:/] pcm = rw
Attachments (0)
Change History (13)
comment:1 by , 19 years ago
Keywords: | authz_module_name Authentication available added; authz_modulAuthentication availablee_name removed |
---|
follow-up: 11 comment:2 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
This doesn't have anything to do with authz, it just means you haven't configured authentication with your web server. See TracCgi#AddingAuthentication for more information. (Basically the same for mod_python)
comment:3 by , 19 years ago
Traced failure cause to a silent httpd.conf error.
The TracOnWindows wiki page (since updated) specifed the following sample Apache config:
<Location "/trac/project/login"> AuthType Basic AuthName "Trac Project" AuthUserFile C:/trac/.htaccess Require valid-user </Location>
This config parsed correctly and Apache would start without error.
However, when a user clicked the "login" link, Apache would not match the login Location directive, and a HTTP 401 response was not returned. This meant that when Trac's auth code executed, no remote user information was present in the request and the assertion consequently failed.
The question is, why did the <Location "/trac/project/login"> directive fail to match? It turns out to be the presence of the double quotes.
Removing the double quotes fixes the problem.
<Location /trac/project/login> AuthType Basic AuthName "Trac Project" AuthUserFile C:/trac/.htaccess Require valid-user </Location>
comment:4 by , 19 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Version: | 0.9b2 → devel |
I'm running Trac from a Python HTTP server (twisted.web2) via WSGI and do not have Apache installed at all. I get this error when I try to login, and don't see any way around that in any of the docs. So it's a real problem for me.
comment:5 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
edsuom: Well, WSGI opens up many new ways of running Trac, and twisted.web2
is not one tested and documented yet, so you're kind of on your own for now. However, the point still applies that you will need to set up your server to do HTTP authentication for you to login to Trac. I'm not sure what Twisted provides for doing this, so you will probably need to check their documentation or mailing list for help with this. It may also be possible to use WSGI middleware to handle authentication such as [http://pythonpaste.org/module-paste.auth.html paste.auth]
. Also take a look at the form-based auth from AccountManager or ask on the MailingList to see if any one has done this already.
follow-up: 7 comment:6 by , 17 years ago
Priority: | normal → high |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
Version: | devel → 0.10-stable |
Same Problem here I also tried <LocationMatch /login>, with and without quotes, with trailing blank and without, but nothing worked… But if I just use <Location /> everything works fine Looks like Apache doesn't parse the Subdomain urls correctly Is there any way to fix that (mod_rewrite or stuff like that)?
Best wishes, Felix
ps: was it ok to reopen this ticket or should I have created a new one?
comment:7 by , 17 years ago
Priority: | high → normal |
---|---|
Resolution: | → invalid |
Status: | reopened → closed |
Replying to fwulm [at yahoo [dot] de]:
was it ok to reopen this ticket or should I have created a new one?
This is a config issue, so please use the MailingList to reach a larger portion of the user community for support.
follow-ups: 9 12 comment:8 by , 17 years ago
Keywords: | Internal Server Error 500 added |
---|---|
Version: | 0.10-stable → 0.10.4 |
Internal Server Error
500 Internal Server Error (Authentication information not available. Please refer to the <a href="/dinercard.com/wiki/TracInstall#ConfiguringAuthentication" title="Configuring Authentication">installation documentation</a>.)
I get this error when I run tracd —port 8000 /srv/trac/myproject - no other http server is running.
follow-up: 10 comment:9 by , 17 years ago
Resolution: | invalid |
---|---|
Severity: | normal → blocker |
Status: | closed → reopened |
Replying to Zoran:
Internal Server Error
500 Internal Server Error (Authentication information not available. Please refer to the <a href="/dinercard.com/wiki/TracInstall#ConfiguringAuthentication" title="Configuring Authentication">installation documentation</a>.)
I get this error when I run tracd —port 8000 /srv/trac/myproject - no other http server is running.
I have the exact same problem.
comment:10 by , 17 years ago
Resolution: | → invalid |
---|---|
Severity: | blocker → normal |
Status: | reopened → closed |
Replying to anonymous:
Replying to Zoran:
Internal Server Error
500 Internal Server Error (Authentication information not available. Please refer to the <a href="/dinercard.com/wiki/TracInstall#ConfiguringAuthentication" title="Configuring Authentication">installation documentation</a>.)
I get this error when I run tracd —port 8000 /srv/trac/myproject - no other http server is running.
I have the exact same problem.
Have you read the documentation section linked to in the error message? If so, please read the comments above for the previous times this ticket has been closed and ask on the MailingList for more help.
comment:11 by , 16 years ago
Replying to cmlenz:
This doesn't have anything to do with authz, it just means you haven't configured authentication with your web server. See TracCgi#AddingAuthentication for more information. (Basically the same for mod_python)
Hi!
I've set up the environment, as described in the mentioned page. I want to use the same password file for svn and trac. Still I can browse the repository, although the login page still gives 500 Internal Server Error. From the apache2 config:
<Location /trac/[/]+/login">
AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/passwords Require valid-user
</Location>
comment:12 by , 15 years ago
Replying to Zoran:
Internal Server Error
500 Internal Server Error (Authentication information not available. Please refer to the <a href="/dinercard.com/wiki/TracInstall#ConfiguringAuthentication" title="Configuring Authentication">installation documentation</a>.)
I get this error when I run tracd —port 8000 /srv/trac/myproject - no other http server is running.
I have the exact same problem, followed these configurations: http://trac.edgewall.org/wiki/0.11/TracOnUbuntu
comment:13 by , 15 months ago
Component: | general → web frontend |
---|---|
Keywords: | Internal Server Error 500 authz_file authz_module_name Authentication information not available removed |
Owner: | removed |
Update keywords