Page MenuHomePhabricator

cloudcumin: decide sudoers rules for users without global root
Closed, ResolvedPublic


Once the cloudcumin setup is complete and we can succesfully run cookbooks from there as root (T319401), we would like to let other non-root users also run WMCS cookbooks (or a subset of them) from cloudcuminXXXX hosts.

We can probably define some sudoers rule in a similar way to what is in place for cuminXXXX hosts.

Some security considerations of having non-root (and volunteers) run cookbooks from cloudcumin hosts are being discussed at T324986.

Event Timeline

Happy to provide input, but the task description could use a little more context :-)

It's definitely a bit vague at the moment :) I just wanted to split it from the main task, as it can be discussed and addressed separately.

We will have to consider which commands will be allowed for non-root users SSHing to the new cloudcumin hosts. We want both WMF staff without global root and external volunteers to be able to run (at least some) cookbooks from cloudcumin hosts.

Let's discuss details and possible options in the comments of this task.

As someone without global root who has been a test case in the past for this, allowing wmcs* cookbook runs for a subset of users has been an interim solution. I suspect however that useful cookbooks would be more nuanced than that. For example, I would love to be able to run cookbooks to reimage machines; albeit only the machines I do have root on. There may also be specific cookbooks that would want to be more restricted that a blanket PREFIX* might not cover.

Indeed, I agree that we might need later on some more fine-tuned way to authorize things. That said the new cloudcumin setup will already have only access to the WMCS-owned production hosts as root, although they will have root access on all Openstack VMs.

fnegri renamed this task from Decide sudoers rules for users without global root to cloudcumin: decide sudoers rules for users without global root.Aug 1 2023, 3:52 PM
fnegri triaged this task as Medium priority.Aug 10 2023, 9:27 AM

Change 952448 had a related patch set uploaded (by FNegri; author: FNegri):

[operations/puppet@production] cluster::cloud_management allow access to wmcs

I created a patch to propose a specific solution for this task:

Before merging it, we need to find a consensus about the security concerns in T324986.

fnegri closed subtask Restricted Task as Resolved.Oct 2 2023, 10:32 AM

Change 952448 merged by FNegri:

[operations/puppet@production] cluster::cloud_management allow access to wmcs

fnegri claimed this task.

The patch above has been merged and now all members of the wmcs-roots group can ssh to cloudcumins and run cookbooks from there.

Please note that some cookbooks are not working correctly from cloudcumins, until we find a solution for T347490: [wmcs-cookbooks] Downtime alerts from cloudcumins.