-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding fall back method for sha1
in case default algo is sha256
#33345
Conversation
sha1
has been deprecated in django32 and removed in django42.sha1
has been deprecated in django32 and removed in django42.
Found multiple instances of sha1
It looks like most/all of the |
1b1c74c
to
2c5c164
Compare
ec4df89
to
8cb5472
Compare
sha1
has been deprecated in django32 and removed in django42.sha1
in case default algo is sha256
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of minor comments around monitoring.
@robrap Just fixing tests, will then implement your suggestions regarding monitoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Minor comments. You don't need to wait for another round from me before approving/merging when you are ready.
8e9213c
to
53be61a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok, but it is hard to review with all the test duplication, and not knowing what is changing in each case. I made a potential suggestion.
a9603ba
to
62b57ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is probably all set with my PR. I just wanted to ensure that all cases were being covered.
I was wondering about all the cases, so I updated the test to reflect this. I also made some other minor adjustments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this.
A possible deployment plan:
- Merge
- Create (and share) a small New Relic dashboard (ask if you need help). If you FACET by appName (or add separate charts for Stage), we can watch in Stage for a bit before going to Prod.
- Enable in Stage and ensure all is well. (Maybe leaves this for a day?)
- Enable in Prod.
Thoughts?
Yeah, this is what we had in our minds for deployment. I will try to create a New Relic dashboard and surely ask for help if I will get stuck. Also merging this PR now. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
…a256` (#33345) --------- Co-authored-by: Muhammad Soban Javed <[email protected]> Co-authored-by: Robert Raposa <[email protected]> Co-authored-by: Muhammad Soban Javed <[email protected]>
…a256` (openedx#33345) --------- Co-authored-by: Muhammad Soban Javed <[email protected]> Co-authored-by: Robert Raposa <[email protected]> Co-authored-by: Muhammad Soban Javed <[email protected]>
https://docs.djangoproject.com/en/3.2/ref/settings/#default-hashing-algorithm
https://docs.djangoproject.com/en/4.2/releases/4.0/#features-removed-in-4-0
The
DEFAULT_HASHING_ALGORITHM
transitional setting is removed.its defined in django-global settings as 256https://github.com/django/django/blob/stable/3.2.x/django/conf/global_settings.py#L450
Initially we were assuming that platform is going to usesha256
as default algorithm for every thing. But now we got clarity thatsafesessionmiddleware
will use thesha1
so created new PR with new variable.Testing steps1. create sandbox with master branch and login on sandbox.2. install
django42
and restartlms
only.3. keep continue using the site, some
middleware
call that method. It will mismatch due to algorithm and logouts the user.4. Also moving to
django42
will invalidates the forgot passwords links generated viadjango32
.Picking
SHA256
value from internal config for stage. https://github.com/edx/edx-internal/pull/9332For production it will remain
sha1
.