Page MenuHomePhabricator

Create Maintentance Script(s) to produce OAuth Consumers
Closed, ResolvedPublic8 Story Points

Description

One (or more) mediawiki maintenance scripts.

I think in an ideal world this would be part of the OAuth extension.

Acceptance criteria
It takes the same parameters as Propose Consumer (see: https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose) as well as the user
It can approve consumers see SpecialMWOAuthManageConsumers
It outputs to standard out:

  • OAUTH_CONSUMER_KEY
  • OAUTH_CONSUMER_SECRET

Event Timeline

Tarrow triaged this task as Normal priority.Dec 10 2018, 10:02 AM
Tarrow created this task.
Tgr added a subscriber: Tgr.Dec 11 2018, 6:20 PM

Vagrant has a role to do that (role::oauth::consumer) although it uses raw SQL queries which a maintenance script probably shouldn't.

Addshore moved this task from incoming to in progress on the Wikidata board.Dec 19 2018, 12:47 PM
Restricted Application added a project: User-Addshore. · View Herald TranscriptJan 11 2019, 12:35 PM

Change 483770 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/OAuth@master] Maint script for creating an OAuth consumer

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

Change 483772 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/OAuth@master] createOauthConsumer, optionally output success as JSON

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

Change 483776 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/OAuth@master] createOauthConsumer, add --approve option to auto approve

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

In their current state the patches enable the creation and approval of an OAuth consumer.
However the user needs to be allowed to "mwoauthproposeconsumer" and "mwoauthmanageconsumer".

@Tarrow do you think that is okay for our usecase?

Addshore moved this task from Backlog to Doing on the Wikibase-Containers board.
Addshore moved this task from Unsorted 💣 to Back Burner 🏛️ on the User-Addshore board.

In their current state the patches enable the creation and approval of an OAuth consumer.
However the user needs to be allowed to "mwoauthproposeconsumer" and "mwoauthmanageconsumer".
@Tarrow do you think that is okay for our usecase?

I don't think it is ideal but I think we can work around it by granting these permissions in the bundle version of LocalSettings.php.

I don't think it is ideal but I think we can work around it by granting these permissions in the bundle version of LocalSettings.php.

Ack, yes, for our usecase the user for the consumer can have and probably should have these permissions by default. :)

Change 483770 merged by jenkins-bot:
[mediawiki/extensions/OAuth@master] Maint script for creating an OAuth consumer

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

Change 483772 merged by jenkins-bot:
[mediawiki/extensions/OAuth@master] createOauthConsumer, optionally output success as JSON

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

Change 483776 merged by jenkins-bot:
[mediawiki/extensions/OAuth@master] createOauthConsumer, add --approve option to auto approve

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