-
Notifications
You must be signed in to change notification settings - Fork 6k
SEC-2390: Multi Factor Authentication #2603
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
Comments
Jeroen Cranendonk said: I was looking for something like this, petty it's not here yet, building my own now :) Has anyone given any thought already how this should be done? Right now I'm struggeling with setting up some proper events for all this, I rely on events for audit logging, but I'm getting two succesfull authentication events with my current setup ;) (Oh, shouldn't there be a link to SEC-2824 from here too?) |
Jeroen Cranendonk said: Some related resources I found and which I based my approach on, might help someone: |
Jeroen Cranendonk said: Noticed a issue with the setup as I described above, sending the OTP from the UserDetailsService means sending it on a faulty password too, which isn't a great plan. Instead I now made a wrapping provider, which I stick above the dao provider, makes for cleaner separation anyways :) |
the guys from projectlombok recently gave a talk about MFA with TOTP - might be a good inspiration: https://github.com/rzwitserloot/totp-example |
Thanks @thomasdarimont! |
actually I even started porting this to spring security ;-) |
@thomasdarimont Would love to see a pull request :-D or even a sample thrown together |
Hi, I'm implementing AuthenticationProvider for Web Authnetication specification (https://www.w3.org/TR/webauthn/), which is successor of FIDO 2.0, and became W3C Candidate Recommendation recently. I implement AuthenticationProvider for Spring Security study. It is still a proof of concept, but in future, I'd like to send pull request. I'll be happy if you look into it. Sample application which works with Firefox Beta and FIDO-U2F device like Yubikey is provided. I have a favor to ask for Spring Security core to have some foundation class for multi factor authentication. It is desired to have a way to indicate a user who passed first step of multi step (factor) authentication. The status is: "not yet authenticated, but the user is identified". Since FIDO-U2F device needs keyHandle stored in server associated with user id for its authentication step, user need to be identified in the first step. PullRequest for it: #5196 I made a new AuthenticationToken named I hope you enjoy the PoC. |
Wow, I can't believe this issue is still open. |
Hi @rwinch, As was recommended to me on Gitter, I'm reaching out here to talk about the required features for a Spring Security 2FA implementation. So far I have a configuration that supports MFA as specified in https://datatracker.ietf.org/doc/html/rfc4226 and a interface for spring users to implement their own code sending logic. The implementation also supports custom redirect URLs, success and failure handlers and default and custom login pages, varying code generation strategies and different code storage locations. The intermediate saving of codes and login attempts is all based on JSESSIONIDs but could be updated to be an unauthenticated token. As of now, the configuration in a WebSecurityConfigurerAdapter looks like this:
But to make this whole system work I had to change the UserDetails interface. I added two abstract methods:
I don't know if this is a big no no and I need to find a work around or if its cool. I also see there are a number of a different features I have not yet considered listed above, but I'd also like some feedback on how im doing so far and what else I need to add. |
Hi, dear spring-security developers. Do you have plan to implement the MFA feature? |
@rwinch I am looking to revisit / further implement this. Any suggestions on how to proceed? |
Rob Winch (Migrated from SEC-2390) said:
Include support for HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.
https://fidoalliance.org/about
See https://code.google.com/p/google-authenticator/
A simple example of U2F https://github.com/rwinch/spring-boot-security-u2f
The text was updated successfully, but these errors were encountered: