django-trench icon indicating copy to clipboard operation
django-trench copied to clipboard

implement a pluggable "bypass MFA if..." solution (for example: "save this browser", or IP based)

Open benzkji opened this issue 6 years ago • 4 comments

as seen many times.

maybe as a generic solution, that allows to bypass 2FA, given a condition?

benzkji avatar May 17 '19 09:05 benzkji

In one of current projects we extended trench with IP whitelisting. So, what's your idea in depth? Mix user agent data and IP? On our TODO list there is also geolocation. Happy to discuss the topic further.

bbisk avatar May 20 '19 21:05 bbisk

Yes, why not mix it all up ;-) As you said you already implemented IP whitelisting, it would be interesting to have a generic solution, and maybe the most common bypass methods built into trench, easily pluggable.

"save this browser" could be one of these. Implementation details up to discuss - some use cookies (with a secret, as value) to remember and verify a browser (kind of a long living 2FA session). If trench is used via tokenauth/jwt from apps, this could be another secret, to be provided, instead of triggering 2FA (I'm not really into Mobile Dev...just thinking loud ;-).

benzkji avatar May 21 '19 08:05 benzkji

Would it make sense to store this information/flag in a server-side cookie? That way it's not by IP or anything, just trusting the particular device storing the cookie. I think this makes sense?

ckcollab avatar Mar 16 '20 20:03 ckcollab

sure. what we would need, is a pluggable system, where devs could add their own whitelisting methods. some builtin would be nice, cookie and ip for example, as basic showcases.

benzkji avatar Mar 17 '20 08:03 benzkji