Edgewall Software

Ticket #2258 (closed defect: invalid)

Opened 3 years ago

Last modified 11 days ago

Login authentication fails w/ AssertionError: Authentication information not available.

Reported by: anonymous Owned by: jonas
Priority: normal Milestone:
Component: general Version: 0.10.4
Severity: normal Keywords: Internal Server Error 500 authz_file authz_module_name Authentication information not available
Cc:

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

Change History

  Changed 3 years ago by anonymous

  • keywords authz_module_name Authentication available added; authz_modulAuthentication availablee_name removed

Update keywords

follow-up: ↓ 11   Changed 3 years ago by cmlenz

  • status changed from new to closed
  • resolution set to invalid

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)

  Changed 3 years ago by matthew.donald@…

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>

  Changed 2 years ago by edsuom

  • status changed from closed to reopened
  • version changed from 0.9b2 to devel
  • resolution invalid deleted

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.

  Changed 2 years ago by mgood

  • status changed from reopened to closed
  • resolution set to invalid

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   Changed 13 months ago by fwulm [at] yahoo [dot] de

  • priority changed from normal to high
  • status changed from closed to reopened
  • version changed from devel to 0.10-stable
  • resolution invalid deleted

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   Changed 13 months ago by mgood

  • priority changed from high to normal
  • status changed from reopened to closed
  • resolution set to invalid

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-up: ↓ 9   Changed 13 months ago by Zoran

  • keywords Internal Server Error 500 added
  • version changed from 0.10-stable to 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.

in reply to: ↑ 8 ; follow-up: ↓ 10   Changed 12 months ago by anonymous

  • status changed from closed to reopened
  • resolution invalid deleted
  • severity changed from normal to blocker

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   Changed 12 months ago by mgood

  • status changed from reopened to closed
  • resolution set to invalid
  • severity changed from blocker to normal

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   Changed 11 days ago by anonymous

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>

Add/Change #2258 (Login authentication fails w/ AssertionError: Authentication information not available.)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.