From af18bad8313416e4fce9f151db4fe84c81ac8006 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Wed, 29 Mar 2023 12:59:03 +0000 Subject: [PATCH 1/2] rate limit per ip for /conversations/join --- charts/nginz/templates/conf/_nginx.conf.tpl | 2 +- charts/nginz/values.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/nginz/templates/conf/_nginx.conf.tpl b/charts/nginz/templates/conf/_nginx.conf.tpl index 6d5541c381..b4462c390b 100644 --- a/charts/nginz/templates/conf/_nginx.conf.tpl +++ b/charts/nginz/templates/conf/_nginx.conf.tpl @@ -259,7 +259,7 @@ http { {{- if ($location.unlimited_requests_endpoint) }} # Note that this endpoint has no rate limit per user for authenticated requests {{- else }} - limit_req zone=reqs_per_user burst=20; + limit_req zone=reqs_per_user burst=20; {{- end }} {{- end }} diff --git a/charts/nginz/values.yaml b/charts/nginz/values.yaml index b2e69396bb..e810b750d1 100644 --- a/charts/nginz/values.yaml +++ b/charts/nginz/values.yaml @@ -444,6 +444,11 @@ nginx_conf: - all doc: true oauth_scope: conversations_code + - path: /conversations/join + envs: + - all + specific_user_rate_limit: reqs_per_addr + specific_user_rate_limit_burst: "10" - path: /conversations envs: - all From 28233c02199837b4ad08a2b7aaa511fc21ef09f1 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Wed, 29 Mar 2023 13:33:20 +0000 Subject: [PATCH 2/2] changelog --- changelog.d/2-features/pr-3202 | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2-features/pr-3202 diff --git a/changelog.d/2-features/pr-3202 b/changelog.d/2-features/pr-3202 new file mode 100644 index 0000000000..d4d09bd8c6 --- /dev/null +++ b/changelog.d/2-features/pr-3202 @@ -0,0 +1 @@ +`conversations/join` endpoint rate limited per IP address