Last modified: 2014-04-10 15:13:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60375, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58375 - Selenium user rights on test2wiki
Selenium user rights on test2wiki
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-12 07:08 UTC by spage
Modified: 2014-04-10 15:13 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2013-12-12 07:08:06 UTC
The Flow browsertests are failing on test2wiki,
`/^I should see a Block User link$/'

According to Special:ListUsers, on betalabs "Selenium user" has 
   oversight, administrator
rights, but on test2wiki "Selenium user" has
   autochecked user, bureaucrat, editor, reviewer, administrator

I think Selenium_user has to be in the administrator ('sysop') group to be able to block users and make this test pass.
Comment 1 p858snake 2013-12-12 07:26:48 UTC
(In reply to comment #0)
> rights, but on test2wiki "Selenium user" has
>    autochecked user, bureaucrat, editor, reviewer,***administrator***

I has Sysop Rights, It's just labelled Administrator on wiki, and it has rights to block, see: https://test2.wikipedia.org/wiki/Special:ListGroupRights#sysop
Comment 2 spage 2013-12-12 07:57:06 UTC
D'oh, so it must be something else.
Comment 3 Chris McMahon 2013-12-12 15:48:04 UTC
No, something is wrong with the permissions for Selenium_user to see "Block" and also to see "Suppress" under Actions in Flow.  Whatever is required, my user Chrismcmahon(WMF) also lacks those permissions.
Comment 4 Chris McMahon 2013-12-12 15:56:38 UTC
I mean Cmcmahon(WMF)
Comment 5 Chris McMahon 2013-12-12 17:37:12 UTC
It seems that neither local 'sysop' nor global 'administrator' has the 'oversight' right: 

Flow.php:$wgGroupPermissions['oversight']['flow-suppress'] = true;
Comment 6 Željko Filipin 2014-01-28 12:55:06 UTC
Is this fixed?
Comment 7 Chris McMahon 2014-01-28 14:57:09 UTC
This is working now
Comment 8 spage 2014-02-13 09:19:25 UTC
This is again a problem.

Selenium_user on test2wiki cannot Delete or Suppress topics or posts, so several tests are failing.  Selenium_user on test2wiki can't see its own Special:UserRights but Special:UserList shows Selenium_user has
(autochecked user, editor, reviewer)

For comparison, Selenium_user on en betalabs can visit Special:UserRights and has (oversight, administrator).
Comment 9 p858snake 2014-02-13 09:23:48 UTC
Special:UserRights is only visible if you have rights to change group members. I'm unsure what test2 is setup as but autochecked, editor and reviewer generally don't have those rights.
Comment 10 Chris McMahon 2014-02-13 15:06:34 UTC
OK.  Chris Steipp had asked if we could curb the permissions on test2wiki for Selenium_user.  We seem to have gone too far. 

Let's restore the minimum set of permissions to make the Flow tests pass, and also do the password-change and security dance at the same time.
Comment 11 Chris Steipp 2014-02-13 17:41:43 UTC
Just to clarify, my concern was that I think I've seen the password for the Selenium_user account, and I we probably store it in Cloudbees somewhere. So it's likely several people have had access to it at one time or another.

Because test/test2 is a production domain, a sysop who inserts malicious javascript there can escalate their privileges across the cluster. We can take away CORS access from test/test2, but then cross-domain gadgets and other things that should be tested will fail. So after talking to Chris McMahon, I remove sysop and bureaucrat from Selenium_user.

Options for going forward:
* Don't run tests that require sysop on the production cluster
* Move the permissions that we need for the tests (I'm guessing these are all flow specific currently?) into a new group on test/test2, and assign Selenium_user as the only user in that group.
* Have the tests use OAuth, with a grant that only contains the necessary rights and is only valid on those wikis, so that the Selenium_user's actual password doesn't have to be shown/stored anywhere.
Comment 12 spage 2014-02-14 00:45:55 UTC
(In reply to Chris Steipp from comment #11)
Yes, giving Selenium_user oversight and admin in production seems crazy.

> * Move the permissions that we need for the tests (I'm guessing these are
> all flow specific currently?) into a new group on test/test2, and assign
> Selenium_user as the only user in that group.

Sounds good.  I don't understand the nuances of groups, but we want something that ends up with a "qa_automation" group on test2wiki that does:
    $wgFlowGroupPermissions['qa_automation']['flow-delete'] = true;
    $wgFlowGroupPermissions['qa_automation']['flow-suppress'] = true;

and then some admin can add Selenium_user to this group. I don't fully understand wgOverrides/wgOverrides2/wgAddGroups, but I have a patch anyway 8-)
Comment 13 Gerrit Notification Bot 2014-02-14 00:46:09 UTC
Change 113311 had a related patch set uploaded by Spage:
Add qa_automation group and grant it Flow rights

https://gerrit.wikimedia.org/r/113311
Comment 14 Gerrit Notification Bot 2014-02-18 22:18:54 UTC
Change 113311 merged by jenkins-bot:
Add qa_automation group and grant it Flow rights

https://gerrit.wikimedia.org/r/113311
Comment 15 spage 2014-02-19 22:56:34 UTC
Mostly fixed. qa_automation also needs the 'block' right on test2wiki, or we should remove that browser test.
Comment 16 Željko Filipin 2014-03-03 14:12:54 UTC
It has been a couple of weeks since the last commit. Is this fixed in the meantime?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links