fix(create-a-container): loosen in-app rate limit by removing entirely - #429
Open
cmyers-mieweb wants to merge 2 commits into
Open
fix(create-a-container): loosen in-app rate limit by removing entirely#429cmyers-mieweb wants to merge 2 commits into
cmyers-mieweb wants to merge 2 commits into
Conversation
…ncer The previous limiter counted 4xx/5xx (excluding 404) as failures with a tiny budget of 10 per 5 minutes. With the SPA + OIDC flow, 401 and other 4xx responses are a normal part of the auth handshake, so legitimate users were throttled. Replace it with a lenient safety-net limiter that counts every request (1000/min per IP) and leave real rate limiting to the load balancer.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates create-a-container’s in-app rate limiting to avoid throttling legitimate SPA + OIDC authentication flows (where 401/other 4xx responses are expected), and instead leaves “real” throttling to the load balancer while keeping a high-ceiling safety net in the app.
Changes:
- Replaces the previous “failed-request-only” limiter with a lenient per-request limiter (1000 requests/minute per client IP).
- Enables modern rate-limit response headers and disables legacy headers.
Rate limiting is enforced at the load balancer. The in-app limiter added little value and its status-code classification throttled legitimate SPA + OIDC users on expected 401 responses. Drop express-rate-limit, the buildApp rateLimit option, and its test overrides.
Collaborator
Author
|
I went ahead and just blew away the rate limit for now, if we see a use case where we need it in the future, I can readd it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #403
The previous limiter counted 4xx/5xx (excluding 404) as failures with a tiny budget of 10 per 5 minutes. With the SPA + OIDC flow, 401 and other 4xx responses are a normal part of the auth handshake, so legitimate users were throttled. Replace it with a lenient safety-net limiter that counts every request (1000/min per IP) and leave real rate limiting to the load balancer.