Skip to content

Replace the endpoint-specific rate limit for CreateAuthenticateChallenge with a custom rate limiter for unauthenticated requests#64559

Open
espadolini wants to merge 6 commits intomasterfrom
espadolini/createauthenticatechallenge-ratelimit
Open

Replace the endpoint-specific rate limit for CreateAuthenticateChallenge with a custom rate limiter for unauthenticated requests#64559
espadolini wants to merge 6 commits intomasterfrom
espadolini/createauthenticatechallenge-ratelimit

Conversation

@espadolini
Copy link
Contributor

This PR removes the endpoint-specific rate limit for /proto.AuthService/CreateAuthenticateChallenge and replaces it with a custom rate limit that only triggers when the request is understood to be an "unauthenticated" one - meaning that it's a CreateAuthenticateChallenge request with a ContextUser payload rather than being a request with username/password, token password recovery or passwordless auth.

Fixes #63549

Changelog: API rate limiting for authenticated per-session MFA requests now follows the regular API rate limits, making the limit unlikely to be hit during parallel SSH operations

Manual Test Plan

Test Environment

TBD

Test Cases

  • A burst of SSH requests won't result in "rate limit exceeded" errors from the MFA attempt
  • Logins are still rate limited at 20 per minute with a burst of 40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Auth service API rate limiter is too strict on per-session MFA requests

1 participant