Page MenuHomePhabricator

Implement an hCaptcha IP blinding proxy prototype
Closed, ResolvedPublic

Description

Implement an IP blinding proxy for use with the hCaptcha API.

This will be a simple nginx-based HTTP proxy that forwards user requests to hcaptcha.com API endpoints, while passing a hash of the client IP address (and hiding the cleartext IP address).

  • decide on how to handle our default-public configuration vs security requirements
  • review prototype implementation
  • deploy
    • nginx proxy
    • secrets fixtures
    • DNS
  • Drop bare requests to / and deny access to / in robots.txt
  • Use real hCaptcha secrets in proxy
  • Drop the referer header (patch)
  • Grafana dashboard for monitoring traffic
  • wikitech page documenting setup and log locations on Wikitech

Event Timeline

Raine changed the task status from Open to In Progress.Jun 25 2025, 1:44 PM
Raine triaged this task as High priority.

Change #1155221 had a related patch set uploaded (by Kamila Součková; author: Kamila Součková):

[labs/private@master] Add fake hcaptcha proxy secrets.

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

Change #1164432 had a related patch set uploaded (by Kamila Součková; author: Kamila Součková):

[operations/puppet@production] hcaptcha: initial commit for proxy config

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

Change #1155221 merged by Hnowlan:

[labs/private@master] Add fake hcaptcha proxy secrets.

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

Change #1167669 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/dns@master] wikimedia: add CNAMEs for hcaptcha domains

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

Change #1167670 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/puppet@production] trafficserver, cache: add config for edge routing of hcaptcha

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

Change #1164432 merged by Hnowlan:

[operations/puppet@production] hcaptcha: initial commit for proxy config

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

Change #1167669 merged by Hnowlan:

[operations/dns@master] wikimedia: add CNAMEs for hcaptcha domains

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

Change #1167670 merged by Hnowlan:

[operations/puppet@production] trafficserver, cache: add config for edge routing of hcaptcha

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

Change #1167891 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/dns@master] wikimedia: simplify hcaptcha subsubdomains

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

Change #1167893 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/puppet@production] trafficserver, profile::hcaptcha: simplify subdomains

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

Change #1167891 merged by Hnowlan:

[operations/dns@master] wikimedia: simplify hcaptcha subsubdomains

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

Change #1167893 merged by Hnowlan:

[operations/puppet@production] trafficserver, profile::hcaptcha: simplify subdomains

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

Change #1168149 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/puppet@production] profile::hcaptcha: don't serve / or robots.txt

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

Dreamy_Jazz updated the task description. (Show Details)
Dreamy_Jazz updated the task description. (Show Details)

Change #1168149 merged by Giuseppe Lavagetto:

[operations/puppet@production] profile::hcaptcha: don't serve / or robots.txt

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

jijiki changed the status of subtask Restricted Task from Open to In Progress.Jul 16 2025, 10:48 AM
jijiki changed the status of subtask Restricted Task from In Progress to Stalled.Jul 24 2025, 10:42 AM

Change #1176248 had a related patch set uploaded (by Effie Mouzeli; author: Effie Mouzeli):

[operations/puppet@production] profile::hcaptcha::proxy: config improvements

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

Change #1176248 merged by Clément Goubert:

[operations/puppet@production] profile::hcaptcha::proxy: config improvements

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

@jijiki while discussing with @kostajh we agreed to avoid passing the REFERER header. I added it as another checkbox but I'm happy to file a separate ticket if that's better.

Change #1180204 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/puppet@production] hcaptcha: Unset Referer header

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

Change #1180204 merged by Clément Goubert:

[operations/puppet@production] hcaptcha: Unset Referer header

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

Clement_Goubert closed subtask Restricted Task as Resolved.Aug 20 2025, 8:27 AM
Clement_Goubert updated the task description. (Show Details)

@jijiki while discussing with @kostajh we agreed to avoid passing the REFERER header. I added it as another checkbox but I'm happy to file a separate ticket if that's better.

Merged, will be deployed by puppet runs over the next half-hour.

Change #1181739 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/dns@master] wikimedia.org: add hcaptcha-sentry CNAME

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

Change #1181739 merged by Hnowlan:

[operations/dns@master] wikimedia.org: add hcaptcha-sentry CNAME

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

kostajh updated the task description. (Show Details)
jijiki added a parent task: Restricted Task.Sep 5 2025, 2:07 PM