Page MenuHomePhabricator

Create Maintentance Script(s) to produce OAuth Consumers
Closed, ResolvedPublic8 Estimated 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

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

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?

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