andk / pause

Perl authors upload server
http://pause.perl.org/
150 stars 58 forks source link

Add MFA protection to several pages of the PAUSE #455

Open charsbar opened 5 months ago

charsbar commented 5 months ago

This is a replacement of https://github.com/wolfsage/pause/pull/5 . It should work, but we need some discussion before proceeding.

New configuration options are (for now):

rjbs commented 5 months ago

I think I more or less understand this, but I have some questions about what our longer-term plan is or should be. Rolling this out as a temporary security measure seems okay to me, but I think we'd get a lot more value out of real API tokens for uploading and for real sessions that can be re-authenticated. I know that's not going to happen in the next two days, but maybe we can discuss approving that as the next goal tomorrow.

What I'd actually love to see is something like a paragraph explaining (to the users who will have to use this) how it's meant to work. We'll need to show them something like this when it changes, and also it'd help me understand whether this is all going to work right!

wolfsage commented 5 months ago

I think there's a few real problems to fix, but otherwise this would be a good thing to do.

I have reservations about using Auth::GoogleAuth's qr_code image links.

I think we could relatively easily add a full set of tests to make sure the behaviour works as we expect so we don't have to hand test things every time. (You could inject a known totp secret into a test user, and either optionally provide a way (if tests don't already have it)) to fake the current time, or modify things so you can inject a timestamp into the totp stuff so we can have consistent tokens to test against)