Page MenuHomePhabricator

Toolhub API requests with PATCH verbs blocked by CDN
Closed, ResolvedPublic

Description

Toolhub's API has multiple routes like PATCH /api/lists/{id}/feature/ to make partial changes to resources. The production deployment of the app in the eqiad Kubernetes cluster is behind the CDN which is blocking the PATCH verb in the wm_recv_early sub because PATCH is not in the configured "allowed_methods" regex from hieradata/role/common/cache/text.yaml.

  • Option 1: Add PATCH to the regex in hiera
  • Option 2: Add a host specific carve out in the VCL to pass more/all verbs to toolhub.wikimedia.org
  • Option 3: rewrite Toolhub's API to avoid the PATCH verb

Event Timeline

bd808 triaged this task as High priority.Oct 12 2021, 10:43 PM
bd808 created this task.

The timing of this is on me, but I just found the block of PATCH today and the app is planned to be announced to the community tomorrow (2021-10-13). We can hold the announce if necessary, but really option 3 is not realistic for any rational timeline.

Change 730363 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/puppet@production] cache: Allow PATCH method to be passed to backend services

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

Change 730363 merged by Ema:

[operations/puppet@production] cache: Allow PATCH method to be passed to backend services

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

Change 730415 had a related patch set uploaded (by Ema; author: Ema):

[operations/puppet@production] varnish: test allowed HTTP methods

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

Change 730415 merged by Ema:

[operations/puppet@production] varnish: test allowed HTTP methods

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

@bd808: looks like we're all set!

$ curl -sv -X PATCH https://phabricator.wikimedia.org/T293157 2>&1 | grep '< HTTP/2'
< HTTP/2 200 
ema moved this task from Backlog to Radar on the User-ema board.
bd808 claimed this task.

Confirmed to be working, Thank you for the quick attention @ema.