~roadmr/canonical-identity-provider:fix-another-i18n-leaky-test-state

Last commit made on 2020-09-04
Get this branch:
git clone -b fix-another-i18n-leaky-test-state https://git.launchpad.net/~roadmr/canonical-identity-provider
Only Daniel Manrique can upload to this branch. If you are Daniel Manrique please log in for upload directions.

Branch merges

Branch information

Name:
fix-another-i18n-leaky-test-state
Repository:
lp:~roadmr/canonical-identity-provider

Recent commits

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

73e7807... by Daniel Manrique

Update sha512 test and key/cert files so it works

3956c71... by Daniel Manrique

Update requirements files for saml2idp.

Add saml2idp 0.21 which also requires the following changes.

m2crypto from xenial is ancient, moving to a new version.

saml2idp tests now require beautifulsoup4 in addition to
beautifulsoup3. bs4 is available as a system package but moving
toward wheels sounds nice.