You are browsing a read-only backup copy of Wikitech. The live site can be found at

SRE/SRE Clinic Duty/Access requests: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Neil P. Quinn-WMF
m (Protected "SRE/SRE Clinic Duty/Access requests": Instructions for security-critical processes should not be publicly editable ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
imported>Neil P. Quinn-WMF
(Neil P. Quinn-WMF moved page SRE/SRE Clinic Duty/Access requests to SRE/Clinic Duty/Access requests: No need to duplicate "SRE")
Line 1: Line 1:
==LDAP group changes==
#REDIRECT [[SRE/Clinic Duty/Access requests]]
Access to a range of mostly web-based services is granted via the "wmf" and "nda" groups. The specific permissions are listed here: The change should be tracked in a ticket.
*WMF staff can be added to the "wmf" group on request (not everyone needs that kind of access)
**to confirm a staff member use [[Ldapsearch]] to check they have been created on the OIT ldap mirror (i.e.
**alternatively, you can search on Namely
*Contractors will not appear on Namely, in which case you may ask for the person's manager/point of contact for approval, on the phabricator task
*Volunteers and researchers can be added to the "nda" group (this needs a valid NDA, everyone who's WMF staff is covered by the work contract NDA)
*All other groups need to be approved by the user's manager
====Create/Get LDAP account====
In order to add or update a a user's LDAP permissions, they will first need an LDAP account.  This can be created by either:
*having the user create a [ Wikitech account]
*if the user already has a meta account, using it to create a [ Toolforge account]
**NB that in the case of a Toolforge-only account, Wikitech will have no knowledge of the user account, despite it existing in LDAP, and the account being valid for logging into other things.  This is [[phab:T250189#6086726|expected but not widely understood]]
In either case you will need to know the username (for Wikitech) or shell account name (for Toolforge) name used. You can also search ldap to try and find it: <code>mwmaint1002$ ldapsearch -x</code>
====Update data.yaml====
Check whether there's an existing entry in {{Gitweb|project=operations/puppet|file=modules/admin/data/data.yaml}}:
*If the user already has shell access, no further change is needed. You can proceed with the LDAP change below:
*If not, add the user to the ''ldap_only_users'' table at the end of the file, using their would-be shell username (LDAP <code>uid=</code>) as the key within ''ldap_only_users''. (This is just added for tracking/verification purposes. As you'll be making the LDAP changes yourself, no puppet run is required after this.)
**Add the ''realname'' of the user (most Cloud VPS accounts don't have a real name set)
**Add the ''email'' address of the users:
***If the user is WMF staff, use the email address of their Google account (You can double-check the account name in the Gmail interface). Some users have aliases for their nickname; don't use these, use the official Google account (this allows cross-checking data against corp LDAP)
***If the user is not staff, ask for a contact email address (to have a reliable contact e.g. in case of an account compromise)
**If the user is someone with a time-limited access e.g. interns, researchers who have time-limited MOUs or short term contractor, add the estimated account end date as <code>expiry_date</code> (format is YYYY-MM-DD) and a staff contact as <code>expiry_contact</code>
The entry should look something like the following:<syntaxhighlight lang="yaml">
  ensure: present
  realname: Example User
  expiry_date: 2038-01-19
====Modify LDAP groups====
After having added the user to data.yaml, the change in LDAP can be done from one of the "mediawiki maintenance" hosts like mwmaint1002 (this will be automated in a subsequent step):
*Check if they are a member of the group from the Cloud VPS LDAP server: <code>ldapsearch -x cn=grpname</code>
*Add them if they are not there: <code>modify-ldap-group grpname</code> and add their entry in the editor window that pops up
*To remove someone from an ldap group you can <code>modify-ldap-group grpname</code> and delete their entry in the editor window that pops up
''TIP: If a user has to be removed from special LDAP access, in most cases (e.g. contract termination) you may want to notify also @aklapper to remove/check Phabricator access on the same ticket.''
For further instructions see [[Help:Access]], [[LDAP]] and [[LDAP Groups]].
====wmde access====
Anyone at Wikimedia Deutschland who wants to get added to the "wmde" LDAP group needs to sign an NDA with the Legal department of the WMF. Simply add [[phab:p/KFrancis|@KFrancis]] to the Phab task and she'll deal with it.
In addition, the access to "wmde" needs to be approved by an engineering manager from Wikimedia Deutschland. You can add either of the four to the Phab task:
==Access requests==
Access and reasoning for requesting it are documented on [[Requesting shell access]].  Please read and understand entirely before processing any access requests, as this very brief summary documentation may not cover all required points in the linked page.
If a request asks for things like new shell accounts, access to additional servers, log files, personal data, admin roles in systems like Mailman, Bugzilla, data center access, opening a firewall rule etc, then it is an access request and should be moved into the [[phab:project/view/956/|SRE-Access-Requests]] Project. Once the initial request is made, a number of follow up steps must be confirmed. Here is a checklist that can be pasted into the Phab task:
  [] - User has signed the L3 Acknowledgement of Wikimedia Server Access Responsibilities Document.
  [] - User has a valid NDA on file with WMF legal.  (This can be checked by SRE via the NDA tracking sheet & is included in all WMF Staff/Contractor hiring.)
  [] - User has provided the following: wikitech username, preferred shell username, email address, and full reasoning for access (including what commands and/or tasks they expect to perform.
  [] - User has provided a public SSH key.  This ssh key pair should only be used for WMF cluster access, and not share with any other service (this includes not sharing with WMCS access, no shared keys.)
  [] - Access request (or expansion) has sign off of WMF sponsor/manager (sponsor for volunteers, manager for WMF/WMDE staff). If the permissions also give access to restricted data then the data owner must also approve the request.
  [] - Patchset for access request
More details on the above.
*User's direct supervisor has approved of access request via comment on phabricator task.
*Approval from project lead where user's access will be granted via comment on phabricator task.
*[[phab:legalpad/signatures/|Confirmation]] that the user has read, comprehend, and signed the [[phab:L3|Acknowledgement of Wikimedia Server Access Responsibilities]] document.
**Anyone who's Wikimedia staff has signed an NDA as part of their work contract. To validate that someone is staff you can either (1) check ldap-corp1001 via an LDAP search for the GCorp username (2) have the person's manager confirm (they need to sign off anyway)
**Volunteers and researchers need to sign an NDA with the legal department. You can check existing NDAs on file at
**If that's not the case, add @[[phab:p/KFrancis|KFrancis]] to the Phabricator task to prepare an NDA (she'll confirm on task when that's completed)
*SSH public key has to be submitted via gerrit patchset by user, or by some confirmed (non-email) method (suggestion: wiki user page).
**You can verify that the SSH key is not used in WMCS by running from the current MediaWiki maintenance host (<code>mwmaint1002</code> as of March 2021) the cross-validate-accounts command, for example like:<syntaxhighlight lang="shell">
cross-validate-accounts --username USRNAME --uid 00000 --email --real-name "Real User" --ssh-key "ssh-ed25519 AAAAC...." --kerberos
*Any requests to add sudo rights to a ''group'' should be reviewed at the Infrastructure Foundations SRE meeting. Tag the task with [[phab:tag/Infrastructure-Foundations|#Infrastructure-Foundations]] and assign it to [[phab:p/joanna_borun|@joanna_borun]] to add it to the next meeting's agenda; don't grant access until it's discussed at the meeting. Skip this step for requests to add a ''user'' to an existing group (the most common kind of production access request).
*Please update the Task in phabricator, as the requestor will get update.
*Please raise any security concerns on ticket via comments.
====Analytics Groups====
*There are multiple potential groups.  They have been detailed on [[Analytics/Data_access#Access_Groups]].
**The clinic duty person can often link to this page for the person requesting access, and require the requestor to define which of the groups are required.
**The clinic duty person should also highlight [[Analytics/Data access#User responsibilities]] to the requestor.
*Make sure to seek signoff from Analytics folks on access tasks
====Deployment Groups====
*Requires Shell and must have approval from releng to be added to the deployment group
**The user should also be added to the Gerrit group [[gerrit:#/admin/groups/21,members|wmf-deployment]].
====Creating new shell users====
Please see instructions in the puppet admin module's [ README].
Some notable changes since February 2017:
*Add the ''realname'' of the user (most Cloud VPS accounts don't have a real name set)
*Add the ''email'' address of the users:
**If the user is WMF staff use the email address of their Google account (usually the first letter of the first name and the surname, you can double-check the account name in the Gmail interface). Some users have aliases for their nickname e.g., don't use these, use the official Google account (this allows cross-checking data against corp LDAP)
**If the user is a volunteer, a researcher or contractor without access to a account, ask for a contact email address (to have a reliable contact e.g. in case of an account compromise)
*If the user to be added is someone with a time-limited access (e.g. interns, researchers (who have time-limited MOUs) or short term contractor), add the estimated account end date as ''expiry_date'' (format is YYYY-MM-DD) and add a staff contact as ''expiry_contact''
====Renaming shell users====
Sometimes we have to rename a shell user.  This is typically when their shell name doesn't match their login name, and they have issues logging into items requiring LDAP credentials.
Renaming a user will require a few things happen, in a very specific order.  Since many users keep data in their home directories, backups can sometimes be made, but not always.  (Private data that isn't allowed to be copied off the cluster should not be backed up to laptops.)  The existing username has to be removed from the host, since the new username will use the old username's UID.
*Patchset is prepared, but not merged.
*Using cumin for these batch commands, all hosts that have the existing (to be replaced) username should have puppet halted.
*Affected hosts should have the user (to be replaced) deleted.  DO NOT DELETE THE USER'S HOME DIRECTORY.
*Merge patchset with username change (UID remains the same).
*Run puppet on affected hosts, and they will create the new user (using the same UID.)
*Batch move the contents of the old user home into the new user home.
====IRC channel access====
/query chanserv
help access
access #channel list
access #channel add *!*@wikimedia/cloak
14:07 -ChanServ(ChanServ@services.)- Flags +Aiortv were set on ...
For people wanting to be a channel operator for #wikimedia-operations, first check they got nick protection enabled
  /msg nickserv info <nick>
  <nick> has enabled nick protection
and then
  /msg chanserv flags #wikimedia-operations <nick> +Aiotv
====Check on a Phabricator user====
As part of an access request you might want to check first if a Phabricator user is actually who they say they are. There is a shell command on the the Phabricator server. see [[Phabricator#Check_on_a_Phabricator_user]]

Latest revision as of 18:23, 27 August 2021