Skip to content
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

Limit the rate of logins #554

Merged
merged 1 commit into from
Aug 2, 2013
Merged

Limit the rate of logins #554

merged 1 commit into from
Aug 2, 2013

Conversation

dianakhuang
Copy link
Contributor

This pull request adds rate limiting to our authentication backend.

This pull request covers:

  • rate limiting log in attempts from LMS
  • rate limiting log in attempts from Studio
  • rate limiting log in attempts into admin sites
  • tests
  • hiding warnings when you don't want to see them
  • removing an outdated settings file

These things are deliberately not tested after talking to Test Engineering:

  • tests for functionality that we do not use (admin sites on LMS)
  • SSL login / OpenID

This does not cover additional work needed for logging, since that relies on pull request 539 to implemented.

@brianhw @nedbat , review?

self._assert_response(response, success=True)

def test_login_ratelimited(self):
# try logging in 30 times
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment doesn't match the code

@dianakhuang
Copy link
Contributor Author

Okay, I've addressed all the current comments. Could you take another look?

try:
user = authenticate(username=username, password=password, request=request)
except RateLimitException:
log.warning('OpendID - Too many failed login attempts.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/OpendID/OpenId/. Also, shouldn't this write to AUDIT_LOG instead of log?

@brianhw
Copy link
Contributor

brianhw commented Aug 2, 2013

Looks good....

dianakhuang added a commit that referenced this pull request Aug 2, 2013
@dianakhuang dianakhuang merged commit 4005b3b into master Aug 2, 2013
@dianakhuang dianakhuang deleted the diana/django-ratelimit branch August 2, 2013 18:02
chrisrossi pushed a commit to jazkarta/edx-platform that referenced this pull request Mar 31, 2014
…file-view

Set request.user = student when impersonating a student
caesar2164 added a commit to caesar2164/edx-platform that referenced this pull request Jan 24, 2017
…eoquiz-version

Push up to version 0.1.2 of in video quiz
jfavellar90 pushed a commit to eduNEXT/edx-platform that referenced this pull request Apr 11, 2018
ENH: grades now returned on a hierarchical level bases.
dgamanenko referenced this pull request in raccoongang/edx-platform Jun 14, 2018
ENH: grades now returned on a hierarchical level bases.
Sujeet1379 pushed a commit to chandrudev/edx-platform that referenced this pull request Nov 17, 2022
…edx#554)

In https://github.com/edx/edx-platform/pull/28233, the logic was updated
to only return a URL if the content was still accessible to the learner.
This handles the case of the URL being null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants