Page MenuHomePhabricator

Add *.toolforge.org to `wgCopyUploadsDomains`
Closed, DeclinedPublic

Description

Please add *.wmflabs.org to wgCopyUploadsDomains on Wikimedia Commons. This would allow bots to make the WMF server pull files instead of having the complicated and error-prone upload part on my side.

Event Timeline

Rillke raised the priority of this task from to Needs Triage.
Rillke updated the task description. (Show Details)
Rillke changed Security from none to None.
Rillke subscribed.

Change 179094 had a related patch set uploaded (by Steinsplitter):
Adding *.wmflabs.org to wgCopyUploadsDomains

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

Patch-For-Review

Another advantage is that production servers would decide when they want to fetch the file.

Steinsplitter triaged this task as Medium priority.

Last I checked, production servers can't talk to labs, so even if you add the domain, I'm pretty sure it won't work.

If someone has a url of a file hosted on labs, we can easily confirm...

legoktm@terbium:~$ HTTPS_PROXY=url-downloader.wikimedia.org:8080 curl https://tools.wmflabs.org/legobot/hi.txt
curl: (56) Received HTTP code 403 from proxy after CONNECT

production servers can't talk to labs

And what is the reason for that? The same invalid one as in T44473 ?

Change 179094 abandoned by Steinsplitter:
Adding *.wmflabs.org to wgCopyUploadsDomains

Reason:
see T78167, wmflabs in internal, so it dosen't work

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

Dzahn changed the task status from Open to Stalled.May 7 2015, 12:16 AM
Dzahn subscribed.
Steinsplitter changed the task status from Stalled to Open.May 19 2015, 6:03 PM

Hi, Could you speed up this task a bit please? It would be quite useful for many tools on the Labs (e.g. https://tools.wmflabs.org/yifeibot/gallica.py). It is not really a great deal to reconfigure a proxy...

You realise this task has an open blocker, right?

You realise this task has an open blocker, right?

Somone schould work on the "blocker"....

The use case from T78167 is for wgCopyUploadsDomain:

legoktm@terbium:~$ HTTPS_PROXY=url-downloader.wikimedia.org:8080 curl https://tools.wmflabs.org/legobot/hi.txt
curl: (56) Received HTTP code 403 from proxy after CONNECT

If I try again now, it seems to pass with:

HTTPS_PROXY=url-downloader.wikimedia.org:8080 curl https://tools.wmflabs.org/

Maybe the url-downloader did not have access to the labs reverse proxy / tools-wmflabs.org ..

So let's summarize.

  1. T95714 is marked as declined.
  2. @csteipp expressed several times an opinion we should prepare exceptions one per one, and not allow *.wmflabs.org

Would someone see any solution to whitelist a domain we can't access or could we resolve as WONTFIX this task too?

  1. T95714 is marked as declined.
  2. @csteipp expressed several times an opinion we should prepare exceptions one per one, and not allow *.wmflabs.org

Would someone see any solution to whitelist a domain we can't access or could we resolve as WONTFIX this task too?

I guess that means declining this task. :-/

So we're declining the task, with the precision it could be allowed in the future to allow <subdomain>.wmflabs.org.

So we're declining the task, with the precision it could be allowed in the future to allow <subdomain>.wmflabs.org.

The blocking task (T95714) was also reopened so we shouldn't close this one.

T95714: Allow the production cluster to access *.wmflabs.org IPs was Resolved. Can we update this task ?

For example, can someone test on prod cluster this command ?

legoktm@terbium:~$ HTTPS_PROXY=url-downloader.wikimedia.org:8080 curl https://tools.wmflabs.org/robots.txt

If it's good, we probably will be able to merge the patch that simply add the domain to the whitelist.

T95714: Allow the production cluster to access *.wmflabs.org IPs was Resolved. Can we update this task ?

For example, can someone test on prod cluster this command ?

legoktm@terbium:~$ HTTPS_PROXY=url-downloader.wikimedia.org:8080 curl https://tools.wmflabs.org/robots.txt

If it's good, we probably will be able to merge the patch that simply add the domain to the whitelist.

Yes that works, per my comment two years ago T95714#1470497 and I have confirmed it again right now:

terbium$ HTTPS_PROXY=url-downloader.wikimedia.org:8080 curl https://tools.wmflabs.org/robots.txt
User-agent: *
Crawl-delay: 3
...

Most probably, url-downloader.wikimedia.org was not able to reach the wmflabs proxy.


So I guess it now it depends whether we want to allow $wgCopyUploadsDomains = '*.wmflabs.org' or a subset of subdomains or whatever. I can not tell.

Hi. With the blocker task being resolved, how shall this task move? Thanks.

This comment was removed by Stang.
Stang renamed this task from Add *.wmflabs.org to `wgCopyUploadsDomains` to Add *.toolforge.org to `wgCopyUploadsDomains`.EditedMay 11 2022, 4:53 PM
Stang claimed this task.
Stang unsubscribed.

Based on T292213 (and also T255363), I tried to upload a file from https://wikisource-bot.toolforge.org and it looks good, and I believe there should be no technical barrier from implementing this. Also as stated in T95714#1303192, we should trust those (toolforge user).

Change 791059 had a related patch set uploaded (by Stang; author: Stang):

[operations/mediawiki-config@master] commonswiki: Add *.toolforge.org to wgCopyUploadsDomains allowlist

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

Change 791059 abandoned by Stang:

[operations/mediawiki-config@master] commonswiki: Add *.toolforge.org to wgCopyUploadsDomains allowlist

Reason:

Per Majavah's comment

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

Stang closed this task as Declined.EditedMay 16 2022, 3:13 PM
Stang removed Stang as the assignee of this task.
Stang subscribed.

Per Majavah's comment, It would be much better, from the security perspective, to maintain a whitelist for some tools only. Close as decline.