Page MenuHomePhabricator

Retire explicit 'roots' sudo policies
Closed, ResolvedPublic

Description

In tools and toolsbeta we have a roots sudo policy with a duplicated list of folks with sudo privileges. In addition the profile::toolforge::base puppet profile provisions a sudo rule grants full sudo privileges to everyone in the ${::wmcs_project}.admin group.

In order to drop one more manually maintained list of Toolforge admins, I propose we migrate that Puppet-managed sudo rule to profile::toolforge::infrastructure (which applies to all the nodes in the project, not just ones with custom Toolforge-specific roles) and drop the LDAP-managed rule.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1139416 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/puppet@production] P:toolforge: Apply admin-root sudo policy to all instances

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

I support dropping the redundant list. I thought I filed a related phab task about simplifying root/admin lists, but I cannot find it so maybe I never created it. :)

This documentation page will need an update after this task is resolved: https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Toolforge_roots_and_Toolforge_admins

Change #1139416 merged by Majavah:

[operations/puppet@production] P:toolforge: Apply admin-root sudo policy to all instances

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

Mentioned in SAL (#wikimedia-cloud) [2025-05-07T09:36:57Z] <taavi> remove 'roots' ldap sudo policy T392797

Dropped the toolsbeta policy from LDAP and as far as I can tell the access is still there:

taavi@toolsbeta-puppetserver-1:~$ sudo -u raymond-ndibe sudo -l
Matching Defaults entries for raymond-ndibe on toolsbeta-puppetserver-1:
    env_reset, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, passwd_tries=0, lecture=never

User raymond-ndibe may run the following commands on toolsbeta-puppetserver-1:
    (ALL) NOPASSWD: ALL
    (ALL) NOPASSWD: ALL
    (toolsbeta.admin) NOPASSWD: AL

Mentioned in SAL (#wikimedia-cloud) [2025-05-07T09:40:33Z] <taavi> remove 'roots' ldap sudo policy T392797

I dropped it from tools as well, and updated the docs.