Page MenuHomePhabricator

Do not expose dead git-ssh.wikimedia.org service as repo Clone URLs (defined in diffusion.ssh-host setting)
Open, Stalled, LowPublic

Description

https://phabricator.wikimedia.org/config/edit/diffusion.ssh-host/ is still set to git-ssh.wikimedia.org which got killed in T296022: Deprecate git-ssh service on phabricator.wikimedia.org:

aklapper@phab1004:~$ sudo /srv/phab/phabricator/bin/config get diffusion.ssh-host
{
  "config": [
    {
      "key": "diffusion.ssh-host",
      "source": "local",
      "value": "git-ssh.wikimedia.org",
      "status": "set",
      "errorInfo": null
    },
    {
      "key": "diffusion.ssh-host",
      "source": "database",
      "value": null,
      "status": "unset",
      "errorInfo": null
    }
  ]
}

It's visible in many Diffusion repositories when you click the green Clone button, e.g. on https://phabricator.wikimedia.org/diffusion/EMMV/

It adds to confusion where potential contributors are supposed to get their code to hack.

Details

TitleReferenceAuthorSource BranchDest Branch
Draft: Do not expose defunct git-ssh.wikimedia.org as repo Clone URLrepos/phabricator/phabricator!21aklapperT347408-hide-gitssh-clone-uriwmf/stable
Customize query in GitLab

Event Timeline

Aklapper created this task.
Aklapper renamed this task from Replace dead git-ssh.wikimedia.org service in diffusion.ssh-host setting to Do not expose dead git-ssh.wikimedia.org service as repo Clone URLs (defined in diffusion.ssh-host setting).Oct 24 2023, 11:24 PM

As a mitigation for the time being, I quickly edited those ~2650 ssh://vcs@git-ssh.wikimedia.org URIs to not be exposed when clicking the green Clone button on a Diffusion repo browsing page in the web browser.

#!/bin/bash
# SELECT u.phid, CONCAT("https://phabricator.wikimedia.org/diffusion/", r.id, "/manage/uris/"), r.name, u.uri, u.displayType FROM phabricator_repository.repository_uri u INNER JOIN phabricator_repository.repository r ON r.phid = u.repositoryPHID WHERE u.builtinProtocol = "ssh" AND u.displayType != "never" AND u.uri = "ssh://callsign";
INFILE=/home/acko/diffusionuris
while read -r URI
do
  echo '{"objectIdentifier":"'$URI'", "transactions": [{"type": "display", "value":"never"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri https://phabricator.wikimedia.org --conduit-token api-xxxxxxxxxxxxxxxxxxxxxxxxxxxx diffusion.uri.edit --
  sleep 5
done < "$INFILE"

Hiding them by default for future repos to be created would require a code change it seems.

Aklapper changed the task status from Open to Stalled.Tue, Apr 16, 4:47 PM

I'd like to stall this on the outcome of T361997 in upstream which might be a way better approach.