Page MenuHomePhabricator

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


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 raised the priority of this task from to Low.
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: jayvdb.

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

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[''] = ('user', 'pass')
authenticate['wikipedia'] = {'en': ('user', 'pass')}

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 , and 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://*' to prevent authentication tokens being sent over http.

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