~roadmr/canonical-identity-provider:nag-time-jitter

Last commit made on 2020-08-19
Get this branch:
git clone -b nag-time-jitter 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:
nag-time-jitter
Repository:
lp:~roadmr/canonical-identity-provider

Recent commits

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.

7e013bd... by Daniel Manrique

Update test expectations for both sha1 and sha2 saml signatures/digests

ea52f9f... by Maximiliano Bertacchini

Set explicit "SameSite=None; Secure" on session and csrf cookies

Fixes openid auth in modern browsers which default to "SameSite=Lax"
(Chrome 84 implements a slightly more permissive logic as a temporary mitigation; Firefox has it available to test as of version 69 and will make it default in the future)

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

7962caf... by Maximiliano Bertacchini

Fix a couple of lint issues

ece5bfa... by Maximiliano Bertacchini

Add explicit ua_parser dependency