Modify

Opened 8 years ago

Closed 8 years ago

#1021 closed defect (duplicate)

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

Reported by: ThurnerRupert Owned by: 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 (0)

Change History (15)

comment:1 Changed 8 years ago 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)?

comment:2 follow-ups: Changed 8 years ago 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

comment:3 in reply to: ↑ 2 Changed 8 years ago by SoloTurn

Replying to SoloTurn:

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

comment:4 Changed 8 years ago 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)

comment:6 Changed 8 years ago 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?

comment:7 in reply to: ↑ 2 Changed 8 years ago 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.

comment:8 Changed 8 years ago 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.

comment:9 Changed 8 years ago 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?

comment:10 Changed 8 years ago by coderanger

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:11 Changed 8 years ago by ThurnerRupert

  • Resolution fixed deleted
  • Status changed from closed to reopened

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.

comment:12 Changed 8 years ago 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.

comment:13 Changed 8 years ago by anonymous

That sounds very much like you are hitting #1021 .

comment:14 follow-up: Changed 8 years ago by anonymous

Sorry, I mean #1092 .

comment:15 in reply to: ↑ 14 Changed 8 years ago by ThurnerRupert

  • Resolution set to duplicate
  • Status changed from reopened to closed

Replying to anonymous:

Sorry, I mean #1092 .

close as duplicate of #1092.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.