-
Notifications
You must be signed in to change notification settings - Fork 1
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 auth flow does not utilize refresh tokens #298
Comments
Looked into it more -- it appears that the final step of 2FA does not have a This would mean a flow like the following:
One "downside" to this is that someone who knows the user's password could trigger that registration with the SFTP service. Now, I don't think that causes any actual harm (and indeed we were thinking about just automatically registering all users with SFTP as a potentially desired approach), but I wanted to raise it. An alternative would be to simply reject any user with 2FA enabled, and avoid any complications at all. Given that the most likely long term solution to SFTP authentication is to avoid passwords and 2FA entirely / rely on SSH keys... that might not be a bad plan? |
WAIT! I found the proper documentation: https://fusionauth.io/docs/apis/login#complete-multi-factor-authentication And I do see a 202 response there 🎉 The question now is whether we can re-use the same MFA key to submit a second login request (e.g. "log in with MFA, get a 202, register the user, log in again with the same MFA). |
When refactoring authentication to use refresh tokens we missed the 2FA flow. It's not clear that we should be supporting 2FA to begin with since rclone doesn't support it, and ultimately the real solution is to use keys instead of passwords for sftp authentication. That being said, while it's here we should make sure it isn't broken! Issue #298 2FA auth flow does not utilize refresh tokens
When refactoring authentication to use refresh tokens we missed the 2FA flow. It's not clear that we should be supporting 2FA to begin with since rclone doesn't support it, and ultimately the real solution is to use keys instead of passwords for sftp authentication. That being said, while it's here we should make sure it isn't broken! Issue #298 2FA auth flow does not utilize refresh tokens
It looks like #175 did not account for the
processTwoFactorCodeResponse
flow, which means if a user has 2FA enabled then they get an auth token with no refresh token.We'll need to refactor to have both flows set up refresh tokens properly. This work may be done as part of #288, but I wanted to open the issue separately since they are technically separate issues.
The text was updated successfully, but these errors were encountered: