Bug 58214 - Nubus for K8s: self-service passwortreset outgoing email sending hits rate limit
Summary: Nubus for K8s: self-service passwortreset outgoing email sending hits rate limit
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Self Service
Version: UCS 5.2
Hardware: Other Mac OS X 10.1
: P5 normal
Target Milestone: UCS 5.2-1-errata
Assignee: Juan Pedro Torres
QA Contact: Dirk Wiesenthal
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-17 15:48 CEST by Thomas Kintscher
Modified: 2025-05-28 13:40 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.411
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kintscher univentionstaff 2025-04-17 15:48:08 CEST
In Nubus for K8s, the "password reset" function runs into a ratelimit on the UMC selfservice endpoints:

1. User requests a password-reset through the frontend.
   This aspect is rate-limited, which is correct, as it is unauthenticated. The rate-limit is per IP.
2. The UMC places a password-reset request in a NATS queue for the self-service consumer.
3. The self-service consumer processes the password-reset requests one-by-one. Each time it calls an endpoint on the UMC, which sends the actual email.
   This endpoint is rate-limited as well. Large customers, which set up their environment initially, which can easily lead to thousands of emails which need to be sent. As the self-service consumer calls the UMC always from the same IP, it will trigger the rate-limit and the customer onboarding process gets stuck.

Workaround:
- Restart the memcached pod. This will clear the rate-limit cache and allow continuing for another couple of requests. After the initial onboarding spike, the rates should be much lower and the system becomes unstuck.
- Reconfigure UCR variables which control the rate-limit. This is not advised as it will also affect other self-service functionality which needs a rate-limit to protect against brute-force attacks.
Comment 2 Juan Pedro Torres univentionstaff 2025-05-21 12:26:33 CEST
Change the bug to UCS, so we use this bug to release the patch to the selfservice
Comment 3 Juan Pedro Torres univentionstaff 2025-05-27 15:56:55 CEST
Successful build
Package: univention-self-service
Version: 7.1.2
Branch: 5.2-0
Scope: errata5.2-1
User: jtorres
Host: ladda
Comment 4 Juan Pedro Torres univentionstaff 2025-05-27 15:57:39 CEST
Test

Successful build
Package: ucs-test
Version: 12.1.17
Branch: 5.2-0
Scope: errata5.2-1
User: jtorres
Host: ladda
Comment 5 Dirk Wiesenthal univentionstaff 2025-05-28 12:20:47 CEST
Code review: OK
YAML: OK
Documentation: OK
Test: ~OK: SKIPPED, but manually run and it works
K8s: SKIPPED, only tested UCS
Comment 6 Christian Castens univentionstaff 2025-05-28 13:40:33 CEST
<https://errata.software-univention.de/#/?erratum=5.2x116>