Edgewall Software
Modify

Opened 19 years ago

Closed 17 years ago

Last modified 15 months ago

#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 anonymous, 19 years ago

Keywords: authz_module_name Authentication available added; authz_modulAuthentication availablee_name removed

Update keywords

comment:2 by Christopher Lenz, 19 years ago

Resolution: invalid
Status: newclosed

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 matthew.donald@…, 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 edsuom, 19 years ago

Resolution: invalid
Status: closedreopened
Version: 0.9b2devel

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 Matthew Good, 19 years ago

Resolution: invalid
Status: reopenedclosed

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.

comment:6 by fwulm [at] yahoo [dot] de, 17 years ago

Priority: normalhigh
Resolution: invalid
Status: closedreopened
Version: devel0.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?

in reply to:  6 comment:7 by Matthew Good, 17 years ago

Priority: highnormal
Resolution: invalid
Status: reopenedclosed

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.

comment:8 by Zoran, 17 years ago

Keywords: Internal Server Error 500 added
Version: 0.10-stable0.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.

in reply to:  8 ; comment:9 by anonymous, 17 years ago

Resolution: invalid
Severity: normalblocker
Status: closedreopened

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.

in reply to:  9 comment:10 by Matthew Good, 17 years ago

Resolution: invalid
Severity: blockernormal
Status: reopenedclosed

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.

in reply to:  2 comment:11 by anonymous, 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>

in reply to:  8 comment:12 by anonymous, 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 Jun Omae, 15 months ago

Component: generalweb frontend
Keywords: Internal Server Error 500 authz_file authz_module_name Authentication information not available removed
Owner: Jonas Borgström removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.