two-factor icon indicating copy to clipboard operation
two-factor copied to clipboard

U2F Authentication with my own server

Open niravzaveri opened this issue 10 years ago • 3 comments

Would it be possible that I can specify the U2F Registration/Authentication Server? That way, I can integrate U2F Mechanism of this plugin with my common server.

This will be particularly helpful in achieving single sign-on mechanism. This can also be helpful for people who manage more than one Wordpress sites.

niravzaveri avatar Dec 02 '15 07:12 niravzaveri

Short Answer is "No."

There are no plan to support it at the moment. But you can create "child plugin" of this plugin. Or pull request is welcome!

shield-9 avatar Dec 02 '15 08:12 shield-9

@niravz Are you referring to something like https://github.com/Yubico/php-u2flib-server

You would need to create a custom second factor provider and replace validate_authentication() with something that makes REST call to validate the U2F response data from the token. Same with authentication_page() and the way it calls self::$u2f->getAuthenticateData( $keys );.

That kind of API approach seems to be vulnerable to a MITM attack where you only need to respond with {"touch": "\u0001", "counter": N} for the authentication to be considered successful.

kasparsd avatar Dec 02 '15 16:12 kasparsd

Thanks @shield-9 @kasparsd Thanks for the update on how I could do it. What if I just modify the current plugin - U2F Provider's validate_authentication() and do_register() functions - and let my WP server act as a middle-layer between my client browser and the external server?

That way, I wouldn't do any changes in the authentication_page() functionality - and thereby won't be opening up any vulnerabilities, right?

Thanks.

niravzaveri avatar Dec 05 '15 10:12 niravzaveri

U2F is deprecated and no longer works in Chrome, so the provider is being removed in #439 . Given that, there's probably no reason to keep this open anymore.

It seems like this feature is best left to an add-on plugin too.

iandunn avatar Oct 20 '22 14:10 iandunn