Skip to content

[stable14] Bruteforce protection handling in combination with - #12160

Merged
MorrisJobke merged 3 commits into
nextcloud:stable14from
Dagefoerde:stable14-oauth-backports
Nov 1, 2018
Merged

[stable14] Bruteforce protection handling in combination with #12160
MorrisJobke merged 3 commits into
nextcloud:stable14from
Dagefoerde:stable14-oauth-backports

Conversation

@Dagefoerde

Copy link
Copy Markdown
Member

Backports

Cheers!

Signed-off-by: Jan C. Dageförde jan.dagefoerde@ercis.uni-muenster.de

When using atoken obtained via OAuth the token expires. Resulting in
brute force attempts hitting the requesting IP.
This resets the brute force attempts for that UID on a valid refresh of
the token.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Fixesnextcloud#12131
If we hit an expired token there is no need to continue checking. Since
we know it is a token.
We also should not register this with the bruteforce throttler as it is
actually a valid token. Just expired. Instead the authentication should
fail. And buisness continues as usual.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzerrullzer added this to the Nextcloud 14.0.4 milestone Oct 31, 2018
@rullzerrullzer added bug 3. to review Waiting for reviews labels Oct 31, 2018
@rullzer

Copy link
Copy Markdown
Member

@Dagefoerde mind to backport to 13 as well?

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code change looks good 👍

@MorrisJobke
MorrisJobke merged commit d1d82fc into nextcloud:stable14Nov 1, 2018
@Dagefoerde

Copy link
Copy Markdown
MemberAuthor

@Dagefoerde mind to backport to 13 as well?

generally, sure :)

in this case, I had better not. Sorry. Rebasing your second (cleanup) commit gives funny conflicts

DU lib/private/Authentication/Token/Manager.php
DU lib/private/Authentication/Token/PublicKeyTokenProvider.php
[...]
DU tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php

... and since I'm not familiar with (the rest of) Nextcloud authentication, I'd rather leave it up to you. Not sure what the consequences would be. It's not really necessary for Moodle, though. I'll advise 14.0.4 as the minimum Nextcloud version anyway ;)

@MorrisJobkeMorrisJobke mentioned this pull request Nov 13, 2018
@MorrisJobkeMorrisJobke mentioned this pull request Nov 22, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Dagefoerde@rullzer@MorrisJobke