Repository navigation
fix: upgrade social-auth-core to 5.0.2 with cryptography 46.0.7 and requests 2.34.2 - #784
Merged
Merged
Conversation
…line, do not merge) social-auth-core 5.0.2 fixes session fixation and login CSRF issues but requires cryptography>=46.0.7 and requests>=2.34, so those are bumped and the cryptography<46.0.0 cap is removed (snowflake-connector-python 4.0.0 is installed). The upgrade makes 12 third_party_auth pipeline tests fail because partial pipeline resume now redirects to / instead of the complete URL. Same as upstream openedx#38841.
syedsajjadkazmii
marked this pull request as ready for review
October 26, 2026 08:21
Faraz32123
approved these changes
Oct 26, 2026
Faraz32123
left a comment
There was a problem hiding this comment.
LGTM. Dependency version bump with correct test adaptations.
The Consistent Python dependencies check recompiles the requirement files. With social-auth-core 5.0.2 depending on cryptography and the cryptography cap removed from constraints.txt, social-auth-core is added to the cryptography via list and the constraints.txt via entry is dropped from the sandbox and user retirement files. No versions change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #780 (PyJWT 2.15.1)
social-auth-core 5.0.x requires
PyJWT[crypto]>=2.13.0, and this branch is based onulmo/rwaq-dev, which still pins PyJWT 2.10.1. Installing this branch alone fails with a pipResolutionImpossibleerror, which is why most CI jobs on this PR fail at the install step (Compile requirements, Lint Python Imports, Static analysis, JS tests, migrations checks, pylint). Merge #780 first, then update this branch and re-run CI. In the local containers, with all six upgrades installed together,pip checkis clean.Summary
Upgrades social-auth-core from 4.8.1 to 5.0.2 in the edx-platform requirement files (
base,development,testing,doc). 5.0.2 requirescryptography>=46.0.7andrequests>=2.34, so this also bumps:cryptography<46.0.0cap fromrequirements/constraints.txt. It existed because cryptography 46.0.0 conflicted with snowflake-connector-python (Upgrade Requirements action broken on snowflake-connector-python openedx/openedx-platform#37417). snowflake-connector-python 4.0.0 is installed, and pyOpenSSL 25.3.0 allowscryptography<47. Thepact-python<3.0.0cap stays.Advisories fixed
Known test failures (12)
12
third_party_authintegration tests fail only on the new versions:test_full_pipeline_succeeds_for_linking_account,..._for_signing_in_to_existing_active_accountand..._registering_new_accountfor Azure AD, Google, LinkedIn and Twitter. Inassert_logged_in_cookie_redirectthe redirect after the registration step is/where the tests expect/auth/complete/<backend>/?(the pipeline resume URL), so the partial pipeline is not resumed.This matches social-auth-core 5.0.0 and 5.0.1: partial pipeline resume now requires session ownership or explicit confirmation to prevent login CSRF. Upstream has the same failure and pinned
social-auth-core<5.0.0as a workaround (openedx#38841, open). Upstream master is on 4.9.1, which does not fix the session fixation bug.Why this is safe for Rwaq (checked 2026-10-26, read-only)
On Rwaq prod: third-party auth is enabled but no provider is configured (0 OAuth2, SAML, SAML configuration and LTI provider rows), so the Google, LinkedIn, Azure AD and Twitter flows these tests cover do not exist there. The only social login in use is the
edx-oauth2backend, which Studio uses to sign in through the LMS (28 linked users out of about 2.5 million). That login is covered by the session fixation fix.Tested locally on these versions in the CMS container: LMS login, Studio login redirect through the LMS (
/login/edx-oauth2/), the Studio MFE after login, and sign out then sign in again. All passed. The Studio login test was done by hand in a browser.Testing (local Tutor,
pip checkclean, same suites on old and new versions in one container)third_party_auth,oauth_dispatch,auth_exchange,user_authn,test_jwtandlti_provider: 41 failed on the new versions, 29 on the old. The 29 are test-environment failures that exist on both (CMS-only plugin middleware in the CMS container). The 12 extra failures are the pipeline tests above. The cryptography-dependent libraries import cleanly (snowflake-connector, paramiko, pgpy, jwcrypto, fernet fields).Decision on the 12 failing tests
Left failing on purpose (decided 2026-10-26). They are not skipped or changed in this PR, so the failures stay visible until the upstream issue (openedx-platform#38841) is resolved.
Release
Goes into
rwaq_release_v1.3.1with #779 to #783. No migrations. After deploy on stage, sign in to Studio through the LMS and confirm the course list loads.