-
Notifications
You must be signed in to change notification settings - Fork 2
ss-1359 Introduce throttling for the auth endpoint #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
alfredeen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Nitpick spelling of a word.
studio/throttle.py
Outdated
| rate = getattr(settings, "AUTH_RATE_LIMIT_VALUE", "10/minute") | ||
|
|
||
| def allow_request(self, request: HttpRequest, view: APIView) -> Any: | ||
| incomming_ip = self.get_ident(request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling of incoming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! 🙈
Description
serve-repoJira: https://scilifelab.atlassian.net/browse/SS-1359
This PR aims to throttle the auth endpoint to a given number of requests per minute. This comes after a user was repeatedly calling this endpoint causing an outage.
Although some rate limiting will be done at the Ingress level, further limits will be done on the auth endpoint excluding UU IP range for testing purposes.
Checklist