Edgewall Software
Modify

Ticket #2258 (closed defect: invalid)

Opened 6 years ago

Last modified 2 years 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:
Release Notes:
API 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

Change History

comment:1 Changed 6 years ago by anonymous

  • Keywords authz_module_name Authentication available added; authz_modulAuthentication availablee_name removed

Update keywords

comment:2 follow-up: Changed 6 years ago by cmlenz

  • Resolution set to invalid
  • Status changed from new to 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 Changed 6 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>

comment:4 Changed 6 years ago by edsuom

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 0.9b2 to 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 Changed 6 years ago by mgood

  • Resolution set to invalid
  • Status changed from reopened to 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.

comment:6 follow-up: Changed 4 years ago by fwulm [at] yahoo [dot] de

  • Priority changed from normal to high
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from devel to 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 in reply to: ↑ 6 Changed 4 years ago by mgood

  • Priority changed from high to normal
  • Resolution set to invalid
  • Status changed from reopened to 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.

comment:8 follow-ups: Changed 4 years 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.

comment:9 in reply to: ↑ 8 ; follow-up: Changed 4 years ago by anonymous

  • Resolution invalid deleted
  • Severity changed from normal to blocker
  • Status changed from closed to 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 in reply to: ↑ 9 Changed 4 years ago by mgood

  • Resolution set to invalid
  • Severity changed from blocker to normal
  • Status changed from reopened to 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 in reply to: ↑ 2 Changed 3 years 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>

comment:12 in reply to: ↑ 8 Changed 2 years ago by 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, followed these configurations:
http://trac.edgewall.org/wiki/0.11/TracOnUbuntu

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.