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
[2FA] longevity of Backup-Codes #9036
Comments
|
@ChristophWurst
|
|
maybe i'm guessing wrong, but IMHO this is even more a security issue for users which has disabled 2FA and enables it again: because then there are backup codes still valid(?) which the user probably has carelessly discarded (because he disabled 2FA anyway). and if he has even completely forgotten about them or does not create new backup-codes for what ever reason, there are still a bunch of valid backup codes floating around somewhere...! |
|
@danielkesselberg correct, the codes get deleted when a users is deleted. @DJCrashdummy we have to trust users that they stored their codes at a place where they can find them again later. One would otherwise also argue that we have to force user to re-generate codes once every x months because they would otherwise also loose access to them over time. We can give them a hint when re-enabling 2FA though, sure. This is somewhat related to #11380. cc @rullzer |
|
@ChristophWurst you are right, but thats not my point: |
|
Did you read my last reply?
|
yes for sure! |
Scenario: phone is lost and totp is therefore invalid Solution: disable TOTP for old phone, re-enable for new phone. ^ here it's just pain to have to re-generate the backup codes But, as always, this project is open source and you're very welcome to implement a sophisticated and bullet proof solution and submit it as pull request. |
|
well... in this case, wouldn't it be better to have a "renew/reload"-button for the TOTP beside the en-/disable-box? - so backup codes can be deleted as soon as 2FA is disabled. or an other solution: delete the backup codes some time (lets say a hour or day) after 2FA is disabled and not enabled again. maybe even a week is ok, but not keeping backup codes forever and staying valid even if the user enables 2FA after years again. sadly i'm not a developer (just an advanced user and FOSS-enthusiast), so unfortunately i can't code such things myself... else i would probably do so, as i do it for little bugfixes which are possible with my skills. |
as already mentioned in nextcloud/twofactor_totp#244, maybe just a question...
but shouldn't the Backup-Codes be cleared/deleted after an user disables his 2FA?
in the database they are still present, also for users which were completely deleted ages ago.
i'm not sure if this may even become a security issue, especially if a user enables 2FA again...
The text was updated successfully, but these errors were encountered: