~maxiberta/canonical-identity-provider:improve-2fa-invalid-msg

Last commit made on 2020-10-13
Get this branch:
git clone -b improve-2fa-invalid-msg https://git.launchpad.net/~maxiberta/canonical-identity-provider
Only Maximiliano Bertacchini can upload to this branch. If you are Maximiliano Bertacchini please log in for upload directions.

Branch merges

Branch information

Name:
improve-2fa-invalid-msg
Repository:
lp:~maxiberta/canonical-identity-provider

Recent commits

11a37b8... by Maximiliano Bertacchini

Improve wording of the "invalid 2FA" message

b8def06... by Daniel Manrique

Properly reset the thread's translation context to avoid a test depen-fail.

This is in the i18n test module, similar to the previous commit's fix (this one escaped initial testing).

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/+git/canonical-identity-provider/+merge/390335

1327fdf... by Daniel Manrique

Properly reset the thread's translation context to avoid a test depen-fail - this tine in test_views_i18n

d1b2eb3... by Daniel Manrique

Properly reset the thread's translation context to avoid a test depen-fail.

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/+git/canonical-identity-provider/+merge/390327

225bc64... by Daniel Manrique

Properly reset the thread's translation context to avoid a test depen-fail

6764af5... by Daniel Manrique

Add randomness to initial 2FA backup nag/check times.

To avoid an initial "horde" of people getting nagged on the exact same
day once we flip the feature flag on, this adds a random jitter from 0
to 50% of the nag interval to distribute the nags over a longer period.

This is done only on the *initial* nag set (i.e. when the value is found
to be None, meaning we had never set it for this user) and for both
last_nag (which is per account) and last_check (which is per device).

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/+git/canonical-identity-provider/+merge/389511

941819c... by Daniel Manrique

No randint in models.twofactor anymore

ed9121e... by Daniel Manrique

Fix jitter behavior for last_nag.

- Do not update last_nag with jitter when using a backup device.
- Do update it with jitter if it was None (so we set up to nag the
user randomly in the future, but not right now)
- But do not update it if the user has no backup devices (so we don't
set up a nag that will fire the moment they add a backup device)

6ba2bcc... by Daniel Manrique

Add randomness to initial 2FA backup nag/check times.

To avoid an initial "horde" of people getting nagged on the exact same
day once we flip the feature flag on, this adds a random jitter from 0
to 50% of the nag interval to distribute the nags over a longer period.

This is done only on the *initial* nag set (i.e. when the value is found
to be None, meaning we had never set it for this user) and for both
last_nag (which is per account) and last_check (which is per device).

0ef30ed... by Daniel Manrique

Update saml2idp to 0.21 for proper, tested, working sha2 digest/signature support in SAML.

Also update the tests so we're sure the correct identifiers are used at the SSO level; correct signing itself is tested thoroughly in the saml2idp project proper.

Had a bit more repercussions than I expected (required adding bs4 and updating m2crypto which required a custom wheel instead of system package) but it works well in local tests....

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/+git/canonical-identity-provider/+merge/388613