Page MenuHomePhabricator

config.authenticate should allow configuration using family/lang
Open, LowPublic

Description

As http methods are URI based, config.authenticate is currently URI based.
However the configuration is typically family/lang based.

Once the URI->Site mapping has been rewritten (several patches under review), http can reliably get the family/lang for a URI, then get authenticate tokens using the family/lang.

Event Timeline

jayvdb created this task.Aug 7 2015, 3:14 PM
jayvdb raised the priority of this task from to Low.
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: jayvdb.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptAug 7 2015, 3:14 PM

Change 230159 had a related patch set uploaded (by VcamX):
Support wildcard character for config.authenticate

https://gerrit.wikimedia.org/r/230159

XZise added a subscriber: XZise.Aug 7 2015, 8:56 PM

This won't work when HTTP authentication is used on non wikis. So maybe it may not be possible to support a “family/lang-only” mode. Although even both should be possible with the current system, as config.authenticate will then contain a dict (which would indicate that the first value was a family):

authenticate['example.com'] = ('user', 'pass')
authenticate['wikipedia'] = {'en': ('user', 'pass')}
VcamX added a subscriber: VcamX.Aug 8 2015, 2:49 AM

The description mentions 'several patches under review'. What are those patches?

I guess @jayvdb meant T85658?

Yes. We've got good patches ready, but URI->Site is a performance problem as we dont want to load every family in order to determine the correct Site for a URI. So there are also other changesets which allow URI->Site resolutions shortcuts , such as https://gerrit.wikimedia.org/r/#/c/219617/ , and https://gerrit.wikimedia.org/r/#/c/221637/ is the patch which will provide 'open the doors' for large numbers of family classes to be added to pywikibot. I dont expect these patches could be merged before 'pens down' for GSOC.

Another way to partially implement family/lang is to also support http:// vs https:// in config.authenticate keys , as that will allow uses to specify 'https://*.website.org' to prevent authentication tokens being sent over http.

Change 230159 merged by jenkins-bot:
Support wildcard character for config.authenticate

https://gerrit.wikimedia.org/r/230159

jayvdb set Security to None.
Masti added a subscriber: Masti.Nov 28 2016, 6:45 PM