Modify

Opened 5 years ago

Last modified 22 months ago

#6304 assigned enhancement

basic authenticating only specific client, otherwise requiring normal login

Reported by: anonymous Owned by: txcraig
Priority: normal Component: HttpAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Original Trac's login feature is useful for human user, but programs prefer basic auth. Such programs are not only XML-RPC clients, some of them need to read normal pages.

One example that i encounter is search engine crawler in intranet which has basic auth client function but does not support cookie.

Attachments (2)

envvarconds.patch (1.3 KB) - added by anonymous 5 years ago.
quick hack.
filter.py.patch (917 bytes) - added by txcraig@… 23 months ago.
Patch to allow querystring identification of API clients

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by anonymous

quick hack.

comment:1 Changed 5 years ago by anonymous

Attached my patch for the feature. (sorry for the dirtiness, i am not pythonist.)

It worked with Trac 0.11.5.

Changed 23 months ago by txcraig@…

Patch to allow querystring identification of API clients

comment:2 follow-up: Changed 23 months ago by txcraig@…

  • Trac Release changed from 0.11 to 1.0

It would be really great to see this ticket fixed. It is difficult on forms-login based Trac sites to access Trac programmatically (i.e. resources other than the XmlRpcPlugin API). For example being able to grab a fully rendered ticket or wiki page is very useful and not possible with just XmlRpcPlugin.

I have a slightly different approach attachment:filter.py.patch that is based on the API client specifying a querystring parameter to identify itself (instead of the user agent method in the other patch). I suspect that if you considered all possible clients it is generally easier to tweak the request URL than tweak the user-agent.

[httpauth]
paths = /xmlrpc, /login/xmlrpc
apiclients = mylyn

To force the basic auth just access the ticket URL like this: http://trac-hacks.org/ticket/6304?apiclient=mylyn

comment:3 in reply to: ↑ 2 Changed 23 months ago by rjollos

Replying to txcraig@gmail.com:

It would be really great to see this ticket fixed.

The plugin is in need of a maintainer. Interested?

comment:4 Changed 23 months ago by txcraig@…

Sure, I'll contact you offline to see what is involved.

comment:5 Changed 22 months ago by txcraig

  • Owner changed from coderanger to txcraig
  • Status changed from new to assigned

I am adopting this plugin.

Add Comment

Modify Ticket

Action
as assigned The owner will remain txcraig.
Author


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

 
Note: See TracTickets for help on using tickets.