Modify

Opened 15 years ago

Last modified 12 years 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 15 years ago.
quick hack.
filter.py.patch (917 bytes) - added by txcraig@… 12 years ago.
Patch to allow querystring identification of API clients

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by anonymous

Attachment: envvarconds.patch added

quick hack.

comment:1 Changed 15 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 12 years ago by txcraig@…

Attachment: filter.py.patch added

Patch to allow querystring identification of API clients

comment:2 Changed 12 years ago by txcraig@…

Trac Release: 0.111.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 12 years ago by Ryan J Ollos

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 12 years ago by txcraig@…

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

comment:5 Changed 12 years ago by txcraig

Owner: changed from Noah Kantrowitz to txcraig
Status: newassigned

I am adopting this plugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain txcraig.

Add Comment


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

 
Note: See TracTickets for help on using tickets.