Page MenuHomePhabricator

api-gateway chart: make cookie name configurable for testing
Closed, ResolvedPublic

Description

In order to safely test user identification for rate limiting based on cookies in production, we need the following in the api-gateway chart:

  • the name of the cookie must be configurable, so we can set it to something other than the cookie set by actual clients
  • the name of the fallback ratelimit class must be configurable, so we can set it to something other than "anon", since "anon" will actually enforce rate limits.
  • a special rate limit class "no-limit" that will disable rate limiting by unsetting the request headers used to construct the rate limit descriptor. If headers needed for the descriptor are missing, Envoy does not send a request to the ratelimit service and passes the request unchallanged.
NOTE: Using plain cookies for user identification is of course insecure. This is a stepping stone to the next phase which will transition to JWT cookies.

Event Timeline

Change #1198385 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/deployment-charts@master] api-gateway: make cookie name configurable for testing

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

Change #1199331 had a related patch set uploaded (by Clément Goubert; author: Polishdeveloper):

[operations/deployment-charts@master] api-gateway: Release patch for ratelimit test

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

Change #1198385 abandoned by Clément Goubert:

[operations/deployment-charts@master] api-gateway: make cookie name configurable for testing

Reason:

Stacked in Iec9ddec04c7d1a82bf48d2a0e54bbec2aa29f4dc

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