Catalyst/API Keys
Appearance
< Catalyst
Catalyst API Key Policies
- API tokens shall be given to WMF staff and volunteers who have a use-case that cannot be addressed using the Patchdemo UI.
- Exactly one API token shall be created for each person who has access to the API (i.e. no key sharing).
- Access to the Catalyst API shall be requested as a ticket on Phabricator in Catalyst Backlog, with the following information about the human for whom access is requested:
- phabricator username
- Meta-Wiki username
- Wikimedia IDM/IDP username
- Reason/need for access
- 1password account e-mail or public key
- API tokens shall be given to teams with a need to use the Catalyst API in CI
- exactly one API token shall be create for each team with a CI use-case
- Access to the Catalyst API shall be requested as a ticket on Phabricator in Catalyst Backlog, with the following information about the human for whom access is requested:
- Team name
- Team email (preferably a group email not tied to a single human)
- Team or team member 1password account
- Reason/need for access
- API tokens must never be delivered or shared in plain text.
- New API tokens shall be delivered or shared via (in order of preference):
- https://wikimedia.1password.com/ which can be used to deliver the key:
- to a WMF staff member, shared with their WMF 1password account, or
- to a volunteer, shared with their personal 1password account
- encrypted using the requester's public key
- this method should only be used for volunteers who prefer not to use 1password
- https://wikimedia.1password.com/ which can be used to deliver the key:
- New API tokens shall be delivered or shared via (in order of preference):
- API keys MAY be revoked if unused for a period of six months
- Catalyst administrators SHOULD make an attempt to contact the user before revocation. Contact may either take the form of a direct message or a Phabricator task. If no contact information is available for a user, then this step MAY be skipped.
- In the case that there is no contact information available, or there is no reply to a contact attempt within two weeks, or, after contact, the user confirms there is no ongoing need for their API token then the token SHOULD be revoked.
- Users MAY re-request a new token after it has been revoked, following the process outlined on this page. Tokens MAY not be re-issued.
Issuing API Key Instructions
AS a Catalyst or Test Platform team member, substituting "YOUR_USER" and "HUMAN NAME AND TEAM NAME"
ssh YOUR_USER@k3s.catalyst.eqiad1.wikimedia.cloud
kubectl exec deploy/catalyst-api-deployment -n control-plane -- /bin/bash -c 'curl -s -H "Authorization: ApiToken $ADMIN_TOKEN" -X POST -d \'{"description": "HUMAN NAME AND TEAM NAME"}\' "http://catalyst-api-service/api/apiTokens"'
Copy the value of "token". This will only be displayed once. Create a new "secure message" in 1password. Paste the API key and share with the token owner's e-mail.