Account Manager Plugin

219 views
Skip to first unread message

David Johnstone

unread,
Jul 16, 2017, 11:34:47 PM7/16/17
to trac-...@googlegroups.com

Good Afternoon,

 

I am having trouble getting Account Manager plugin working.

 

My trac.ini setting are copied direct from https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration (only change is the file name of the htpassword file.  I am running Trac 1.2.2 and the latest version from AccountManager from Trunk.  I get the same error message if I am running tracd or via Apache 2.4.

 

The error message I get is “ConfigurationError: Cannot find an implementation of the <code>IPasswordHashMethod</code> interface named <code>HtDigestHashMethod</code>. Please check that the Component is enabled or update the option <code>[account-manager] hash_method</code> in trac.ini.”

 

 

My setting are

 

# -*- coding: utf-8 -*-

 

[account-manager]

password_store = HtPasswdStore

htpasswd_hash_type = md5

htpasswd_file = C:\Locata\trac\conf\trac.passwd

reset_password = false

 

[attachment]

max_size = 262144

max_zip_size = 2097152

render_unsafe_content = disabled

 

[browser]

color_scale = enabled

downloadable_paths = /trunk,/branches/*,/tags/*

hide_properties = svk:merge

intermediate_color =

intermediate_point =

newest_color = (255, 136, 136)

oldest_color = (136, 136, 255)

oneliner_properties = trac:summary

render_unsafe_content = disabled

wiki_properties = trac:description

 

[changeset]

max_diff_bytes = 10000000

max_diff_files = 0

wiki_format_messages = enabled

 

[components]

acct_mgr.admin.* = enabled

acct_mgr.api.* = enabled

acct_mgr.db.sessionstore = disabled

acct_mgr.htfile.htdigeststore = disabled

acct_mgr.htfile.htpasswdstore = enabled

acct_mgr.http.* = disabled

acct_mgr.notification.* = enabled

acct_mgr.pwhash.* = disabled

acct_mgr.register.* = enabled

acct_mgr.svnserve.svnservepasswordstore = disabled

acct_mgr.web_ui.* = enabled

acct_mgr.web_ui.resetpwstore = disabled

datasaver.* = enabled

tracopt.versioncontrol.svn.* = enabled

tracdragdrop.* = enabled

tracfullblog.* = enabled

tractoc.* = enabled

tracwysiwyg.* = enabled

 

 

-=-=-=-=-=-=-=-=-=-=-=-

 

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\trac\web\api.py", line 701, in send_error

    add_stylesheet(self, 'common/css/code.css')

  File "c:\python27\lib\site-packages\trac\web\chrome.py", line 152, in add_stylesheet

    href = chrome_resource_path(req, filename)

  File "c:\python27\lib\site-packages\trac\web\chrome.py", line 367, in chrome_resource_path

    elif filename.startswith('common/') and 'htdocs_location' in req.chrome:

  File "c:\python27\lib\site-packages\trac\web\api.py", line 491, in __getattr__

    value = self.callbacks[name](self)

  File "c:\python27\lib\site-packages\trac\web\chrome.py", line 818, in prepare_request

    for contributor in self.navigation_contributors:

  File "c:\python27\lib\site-packages\trac\core.py", line 90, in extensions

    components = [component.compmgr[cls] for cls in classes]

  File "c:\python27\lib\site-packages\trac\core.py", line 220, in __getitem__

    component = cls(self)

  File "c:\python27\lib\site-packages\trac\core.py", line 152, in __call__

    self.__init__()

  File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 77, in __init__

    self.store = ResetPwStore(self.env)

  File "c:\python27\lib\site-packages\trac\core.py", line 152, in __call__

    self.__init__()

  File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 47, in __init__

    super(ResetPwStore, self).__init__()

  File "build\bdist.win32\egg\acct_mgr\db.py", line 29, in __init__

    self.hash_method_enabled

  File "build\bdist.win32\egg\acct_mgr\db.py", line 119, in hash_method_enabled

    self.hash_method

  File "c:\python27\lib\site-packages\trac\config.py", line 888, in __get__

    option=tag.code("[%s] %s" % (self.section, self.name))))

ConfigurationError: Cannot find an implementation of the <code>IPasswordHashMethod</code> interface named <code>HtDigestHashMethod</code>. Please check that the Component is enabled or update the option <code>[account-manager] hash_method</code> in trac.ini.

 

RjOllos

unread,
Jul 17, 2017, 12:11:51 AM7/17/17
to Trac Users
I committed a possible fix in r16714:

Could you please test it and report back?

Thanks,
- Ryan

David Johnstone

unread,
Jul 17, 2017, 12:49:55 AM7/17/17
to trac-...@googlegroups.com

Ryan,

 

Have installed r16714 and now get a message “No handler matched request to /login”.

 

The line in the trac log file is.

2017-07-17 14:44:59,489 Trac[main] WARNING: [172.16.12.197] HTTPNotFound: 404 Not Found (No handler matched request to /login), <RequestWithSession "GET '/login'">, referrer 'http://win-trac-2.locata.com:8080/trac'

 

Cheers,

David J.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

RjOllos

unread,
Jul 17, 2017, 1:54:55 AM7/17/17
to Trac Users


On Sunday, July 16, 2017 at 9:49:55 PM UTC-7, david.johnstone wrote:

Ryan,

 

Have installed r16714 and now get a message “No handler matched request to /login”.

 

The line in the trac log file is.

2017-07-17 14:44:59,489 Trac[main] WARNING: [172.16.12.197] HTTPNotFound: 404 Not Found (No handler matched request to /login), <RequestWithSession "GET '/login'">, referrer 'http://win-trac-2.locata.com:8080/trac'

 

Cheers,

David J.


There should also be a traceback during environment load that indicated why the Component is not activated. You can force an environment load by restarting your web server and making a single request. You may want to set the log level to DEBUG.

- Ryan

David Johnstone

unread,
Jul 17, 2017, 7:31:23 AM7/17/17
to trac-...@googlegroups.com

Ryan,

 

I have changed the trac logging to DEBUG.  Below are the last few lines of the log file.  The log is from running tracd.  Get the same result when using Apache.  Tracd is on port 8080 and Apache is on port 80

 

Full log file is attached.

 

2017-07-17 21:19:23,313 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/login'">

2017-07-17 21:19:23,328 Trac[main] DEBUG: Chosen handler is None

2017-07-17 21:19:23,328 Trac[session] DEBUG: Retrieving session for ID u'david'

2017-07-17 21:19:23,328 Trac[chrome] DEBUG: Prepare chrome data for request

2017-07-17 21:19:23,345 Trac[main] WARNING: [172.16.12.197] HTTPNotFound: 404 Not Found (No handler matched request to /login), <RequestWithSession "GET '/login'">, referrer 'http://win-trac-2.locata.com:8080/trac'

 

Cheers,

David J.

 

 

From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] On Behalf Of RjOllos


Sent: Monday, 17 July 2017 3:55 PM
To: Trac Users

--

trac.log

Steffen Hoffmann

unread,
Jul 17, 2017, 10:31:47 AM7/17/17
to trac-...@googlegroups.com
acct_mgr.pwhash.* = enabled

should get you started, until you understand more acctmgr internals.
Bzw, you shouldn't start using md5 hashes but daher use sha256, if there no very good reason against it.

Greetings,

Steffen Hoffmann
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

RjOllos

unread,
Jul 17, 2017, 7:01:40 PM7/17/17
to Trac Users


On Monday, July 17, 2017 at 4:31:23 AM UTC-7, david.johnstone wrote:

Ryan,

 

I have changed the trac logging to DEBUG.  Below are the last few lines of the log file.  The log is from running tracd.  Get the same result when using Apache.  Tracd is on port 8080 and Apache is on port 80

 

Full log file is attached.

 

2017-07-17 21:19:23,313 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/login'">

2017-07-17 21:19:23,328 Trac[main] DEBUG: Chosen handler is None

2017-07-17 21:19:23,328 Trac[session] DEBUG: Retrieving session for ID u'david'

2017-07-17 21:19:23,328 Trac[chrome] DEBUG: Prepare chrome data for request

2017-07-17 21:19:23,345 Trac[main] WARNING: [172.16.12.197] HTTPNotFound: 404 Not Found (No handler matched request to /login), <RequestWithSession "GET '/login'">, referrer 'http://win-trac-2.locata.com:8080/trac'

 

Cheers,

David J.

 

 

From: trac-...@googlegroups.com [mailto:trac-users@googlegroups.com] On Behalf Of RjOllos
Sent: Monday, 17 July 2017 3:55 PM
To: Trac Users
Subject: Re: [Trac] Re: Account Manager Plugin

 



On Sunday, July 16, 2017 at 9:49:55 PM UTC-7, david.johnstone wrote:

Ryan,

 

Have installed r16714 and now get a message “No handler matched request to /login”.

 

The line in the trac log file is.

2017-07-17 14:44:59,489 Trac[main] WARNING: [172.16.12.197] HTTPNotFound: 404 Not Found (No handler matched request to /login), <RequestWithSession "GET '/login'">, referrer 'http://win-trac-2.locata.com:8080/trac'

 

Cheers,

David J.


You also need the following in your [components] section:
trac.web.auth.loginmodule = disabled

I'll update the CookBook wiki page.

- Ryan

RjOllos

unread,
Jul 17, 2017, 7:03:32 PM7/17/17
to Trac Users


On Monday, July 17, 2017 at 7:31:47 AM UTC-7, hasienda wrote:
acct_mgr.pwhash.* = enabled

should get you started, until you understand more acctmgr internals.
Bzw, you shouldn't start using md5 hashes but daher use sha256, if there no very good reason against it.

Greetings,

Steffen Hoffmann

Hi Steffen,

He copied that from the CookBook for HtPasswd:
https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration#HtPasswdStore

Should we change that from "md5" to "sha256"?

- Ryan
 

David Johnstone

unread,
Jul 17, 2017, 10:44:30 PM7/17/17
to trac-...@googlegroups.com

Ryan,

 

Working now.

 

Thank you for your help

Cheers,

David J.

 

From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] On Behalf Of RjOllos
Sent: Tuesday, 18 July 2017 9:02 AM
To: Trac Users
Subject: Re: [Trac] Re: Account Manager Plugin

 

--

Steffen Hoffmann

unread,
Jul 18, 2017, 10:15:34 AM7/18/17
to trac-...@googlegroups.com
This is one at least not critical. acctmgr will always check and fix configurations missing that, and it will be saved with other changes next time.

Steffen Hoffmann
Reply all
Reply to author
Forward
0 new messages