Ticket #1021 (closed defect: duplicate)

Opened 2 years ago

Last modified 2 years ago

default configuration should include a setting so that mylar trac connector works

Reported by: ThurnerRupert Assigned to: coderanger
Priority: high Component: HttpAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

i'm not sure if it is a bug, or just a missing configuration setting. while web login works like expected, mylar-1.0 trac connector complains about wrong credentials when using httpauth plugin.

Attachments

Change History

12/18/06 03:31:55 changed by coderanger

Not using Mylar myself, I would need a lot more information. Do you get any tracebacks? Can you use XML RPC directly (i.e. xmlrpclib)?

(follow-ups: ↓ 3 ↓ 7 ) 12/18/06 09:49:24 changed by SoloTurn

can login into directory /xmlrpc, but logging in via mylar gives

2006-12-18 16:12:31,560 Trac[main] WARNING: 403 Forbidden (403 Forbidden (XML_RPC privileges are required to perform this operation))

i have TRAC_ADMIN and XML_RPC assigned. it also works if i try it with trac standard login with a webserver basic auth directive.

the access log file says

[18/Dec/2006:16:36:01 +0100] "POST /xml-rpc-test/login/xmlrpc HTTP/1.1" 403 3449

so maybe i'm just unable to configure the path correctly in the conf file? i tried (not everything at once though)

[httpauth]
paths = /login/xmlrpc /xmlrpc
paths = /login/xmlrpc;/xmlrpc
paths = /login/xmlrpc:/xmlrpc

(in reply to: ↑ 2 ) 12/18/06 09:50:48 changed by SoloTurn

Replying to SoloTurn:

i have to add just setting /xmlrpc works via the browser.

12/20/06 03:43:03 changed by anonymous

  • priority changed from normal to high.

This is correct, xml-rpc plugin description suggests to log in via the path /login/xmlrpc, which is not part of the (default) path checked by this plugin.

Could you please extend the description on how to set the additional path? Or is it a general problem to have /login enabled for normal form-based login, and /login/xmlrpc with HTTP basic auth?

(raised the prio to high as logged in xmlrpc would be the main use case)

12/20/06 10:02:03 changed by stp

12/21/06 11:36:04 changed by ThurnerRupert

mylar relies that a basic auth window pops up when entering the url /login/xmlrpc.

tried to hardcode /login/xmlrpc into this plugin as default url. but i do not get a basic auth window, just a permission denied. i don't know which component is responsible?

(in reply to: ↑ 2 ) 12/22/06 11:05:54 changed by mgood

Replying to SoloTurn:

so maybe i'm just unable to configure the path correctly in the conf file? i tried (not everything at once though) {{{ [httpauth] paths = /login/xmlrpc /xmlrpc paths = /login/xmlrpc;/xmlrpc paths = /login/xmlrpc:/xmlrpc }}}

You should use a comma to separate the paths.

12/23/06 07:21:24 changed by ThurnerRupert

  • type changed from enhancement to defect.

according to mgood HttpAuthPlugin should be responsible for (not) popping up a window if the path starts with "/login". hmm. see #1042.

change to defect.

01/10/07 07:13:53 changed by ThurnerRupert

in the code there is

    paths = ListOption('httpauth', 'paths', default='/login/xmlrpc',
                       doc='Paths to force HTTP authentication on.')

    implements(IRequestFilter, IAuthenticator)

    # IRequestFilter methods
    def pre_process_request(self, req, handler):
        for path in self.paths:
            if req.path_info.startswith(path):
                header = req.get_header('Authorization')
                if header is None:
                    self.log.info('HTTPAuthFilter: No authentication data given,
 returing 403')
                    return self # Run HTTP auth

in the xmlrpc code there is

    implements(IRequestHandler, ITemplateProvider)

    # IRequestHandler methods
    # IRequestHandler methods
    def match_request(self, req):
        return req.path_info in ('/login/xmlrpc', '/xmlrpc')

and it looks like xmlrpc comes first (or comes "only"). why? should xmlrpc also implement irequestfilter? is it a bug in trac?

01/10/07 13:10:56 changed by coderanger

  • status changed from new to closed.
  • resolution set to fixed.

(In [1858]) Change default path to match normal behavior. (closes #1021)

01/11/07 04:41:05 changed by ThurnerRupert

  • status changed from closed to reopened.
  • resolution deleted.

XmlRpcPlugin still complains about XML_RPC priviledge missing. can it be that it just authenticates, but does not log in?

if i configure some other path which is open for anonymous, like /timeline path, the log file says:

2007-01-11 12:37:55,497 Trac[filter] DEBUG: HTTPAuthFilter: Authentication okay

the page is shown, but trac does not show that you are logged in.

if i log in via the "login" link, i get the accountmanger form, log in, and then i also can display the xmlrpc url without error.

01/11/07 04:54:45 changed by ThurnerRupert

the log file says in this case:

2007-01-11 12:53:22,355 Trac[filter] DEBUG: HTTPAuthFilter: Authentication okay
2007-01-11 12:53:22,386 Trac[main] WARNING: 403 Forbidden (403 Forbidden (XML_RPC privileges are required to perform this operation))

the rights are set and work with form based login.

01/21/07 13:05:20 changed by anonymous

That sounds very much like you are hitting #1021 .

(follow-up: ↓ 15 ) 01/21/07 13:05:57 changed by anonymous

Sorry, I mean #1092 .

(in reply to: ↑ 14 ) 01/21/07 13:38:24 changed by ThurnerRupert

  • status changed from reopened to closed.
  • resolution set to duplicate.

Replying to anonymous:

Sorry, I mean #1092 .

close as duplicate of #1092.


Add/Change #1021 (default configuration should include a setting so that mylar trac connector works)




Change Properties
Action