dennisreimann / masquerade

masquerade is the predecessor of masq: https://github.com/dennisreimann/masq - please consider using masq from now on, as it is the more modular approach.
MIT License
218 stars 46 forks source link

Yubikey two factor auth can be bypassed #14

Closed jippi closed 14 years ago

jippi commented 14 years ago

Hi,

I have just got my yubikey, and I'm testing it with masquerade, it got asociated just fine, however, even if I attach a yubikey to my account, I'm still able to login with just my normal password...

so, I can login both with just my password, or my password+yubikey

I think it would make sense only to be able to login with password+yubikey once an account has been associated with such.

dennisreimann commented 14 years ago

The yubikey is only an additional factor for multifactor authentication. You can see the PAPE specs for more information on that: http://openid.net/specs/openid-provider-authentication-policy-extension-1_0.html#auth_policies

In its current state, this is just a proof of concept implementation.

jippi commented 14 years ago

Okay.

How big of a change would it be to check if the current_user.has_yubikey? and don't allow logins without the yubikey appended to the password? :) That would more or less fix the issue.. it's false security if you can use both your normal password and the password+yubikey :)

dennisreimann commented 14 years ago

Like I said: Currenty it's supposed to be an additional factor for multifactor authentication (if the relying party) requires that - so it isn't neccessarily false security. We'd have to add a flag to the user profile so that the user can choose to always require password+yubikey.

jippi commented 14 years ago

That would be cool! :)

dennisreimann commented 14 years ago

Go ahead if you like to implement it :)

jippi commented 14 years ago

I may give it a try, but I only have 2 months of experience with ruby / rails :)

djmaze commented 14 years ago

Hey guys,

I already wanted to implement that feature myself. Maybe I will do it over the weekend ;-)

Greetz

dennisreimann commented 14 years ago

Nice, thank you!

jippi commented 14 years ago

Awsome!

djmaze commented 14 years ago

Done in 2c40481811166e346f7f331a736e69f3abbc24a3

jippi commented 14 years ago

Niiice!

Thanks 100^1000

dennisreimann commented 14 years ago

great, thank you :)