Commit Graph

430 Commits

Author SHA1 Message Date
Manjinder Singh
eb694528e7 Adding metrics to oauth2authentication class (#22970)
Currently, we are working on removing the rest_framework_auth library from edx-platform. For this push, we need to remove the oauth2Authentication class. This PR creates a new class oauth2AuthenticationDeprecated that adds additional new relic metrics. The metrics would allow us to see how often this class is used and its success rate. The hope is that this information will help us with transitioning to a different authentication class.
2020-01-30 09:13:51 -05:00
Aarif
97d327feeb BOM-1121
Old style mixin compatibility with django2.2
2020-01-30 16:36:02 +05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Calen Pennington
c83d0e2ca8 OverwriteStorage was removed from django-storages, so pull it into edx-platform (for now?) 2019-12-19 14:06:30 -05:00
Robert Raposa
3505492fff require POST for login_user
ARCH-1253
2019-12-15 11:20:06 -05:00
Robert Raposa
d79e7df32b use login_ajax for logistration
- use login_ajax (in place of login_session with shim) for
logistration's call to login POST
- add toggle for using login_ajax from logistration
  - FEATURES['ENABLE_LOGIN_POST_WITHOUT_SHIM']
- add custom metrics for redirect_url
- update test for third-party auth error_code

NOTE: The error_code `third-party-auth-with-no-linked-account`
was introduced in JSON in this earlier PR:
https://github.com/edx/edx-platform/pull/22452/files

ARCH-1253
2019-12-12 10:39:49 -05:00
Zainab Amir
7eb21f4dec Change version of social-auth-app-django (#21956)
Microsoft social login is not working on edx mobile app. The issue
is fixed in newer version of social-auth-app-django.

PROD-718
2019-12-12 18:07:34 +05:00
Robert Raposa
9e4706e7bb remove UPDATE_LOGIN_USER_ERROR_STATUS_CODE toggle
The toggle UPDATE_LOGIN_USER_ERROR_STATUS_CODE was added to roll out a
breaking change for `login_user` auth errors to return a 400 rather than
a 200.

This toggle was enabled in Production on 12/5/2019 with seemingly no
adverse affects.

ARCH-1253
2019-12-06 17:20:17 -05:00
Robert Raposa
2202545aec remove studio signin and signup pages
This completes the work started in https://github.com/edx/edx-platform/pull/19453
to use the LMS login and registration for Studio, rather than Studio
providing its own implementation.

LMS login/registration are being used for the following reasons:
1. LMS logistration properly handles all SSO integrations.
2. A single logistration is simpler to maintain and understand.
3. Allows Studio to work more like all other IDAs that use LMS
logistration.

The original switch to use LMS logistration for Studio also added the
toggle `DISABLE_STUDIO_SSO_OVER_LMS` to provide the community some
additional time for switching. This commit removes this toggle, which
at this point means all deployments will use the LMS logistration.

This change requires sharing cookies across LMS and Studio. Should that
prove to be a problem for certain Open edX instances, there are
discussions of possible alternative solutions.
See https://github.com/edx/edx-platform/pull/19845#issuecomment-559154256

Detailed changes:
* Fix some Studio links that still went to old Studio signin and signup.
* Remove DISABLE_STUDIO_SSO_OVER_LMS feature toggle.
* Remove old studio signin and signup pages and templates.
* Fix url name "login", which had different meanings for Studio and LMS.
* Use the following settings: LOGIN_URL, FRONTEND_LOGIN_URL,
FRONTEND_LOGOUT_URL, and FRONTEND_REGISTER_URL.
* Redirect /signin and /signup to the LMS logistration.
* Add custom metric `uses_pattern_library`.
* Add custom metric `student_activate_account`.
* Add Django Settings to allow /signin, /signup, and /login_post to be
disabled once ready.

This work also relates to ARCH-218 and DEPR-6.

ARCH-1253
2019-12-04 02:36:36 -05:00
Zaman Afzal
9b82185323 Revert "ENT-2454 Modify third party auth pipeline to update user enterprise (#22314)" (#22384)
This reverts commit 439e4b4169.
2019-11-22 20:46:36 +05:00
Zaman Afzal
439e4b4169 ENT-2454 Modify third party auth pipeline to update user enterprise (#22314)
* ENT-2454 Modify third party auth pipeline to update user enterprise
2019-11-22 17:47:12 +05:00
hasnain-naveed
057f443a26 ENT-2437 | get_enterprise_customer_for_learner method replaced with enterprise_customer_for_request. 2019-11-08 15:47:52 +05:00
Manjinder Singh
79c9231128 Revert "ENT-2437 | get_enterprise_customer_for_learner method replaced with e…" (#22248) 2019-11-05 16:51:44 -05:00
Hasnain Naveed
6820b20059 Merge pull request #22207 from edx/hasnain-naveed/ENT-2437
ENT-2437 | get_enterprise_customer_for_learner method replaced with e…
2019-11-04 15:45:26 +05:00
hasnain-naveed
4b827d5be0 ENT-2437 | get_enterprise_customer_for_learner method replaced with enterprise_customer_for_request. 2019-11-01 17:19:56 +05:00
Diana Huang
e026006f9a Move RegistrationView from user_api to user_authn. 2019-11-01 07:41:48 -04:00
Nimisha Asthagiri
f533134db1 Merge pull request #22086 from edx/arch/user-authn-delete-deprecated
User Authn: Remove deprecated, ENABLE_COMBINED_LOGIN_REGISTRATION
2019-10-29 09:37:53 -04:00
Nimisha Asthagiri
db42c7e1e2 User Authn: Remove deprecated, ENABLE_COMBINED_LOGIN_REGISTRATION 2019-10-29 08:57:58 -04:00
Manjinder Singh
80c7f5af01 BOM-933: Fix type mismatches in various migrations 5 (#22147)
* fix type mismatch in third_party_auth migrations

* fix type mismatch in verify_student  migrations

* fix type mismatch in video_config  migrations

* fix type mismatch in verified_track_content  migrations

* fix type mismatch in commercemigrations

* fix type mismatch in xblock_config migrations

* fix type mismatch in course_creators migrations

* fix type mismatch in contentstore migrations
2019-10-24 16:08:04 -04:00
Zia Fazal
7ccd2a6901 Refactored enterprise unlink code to fix ENT-1890
Refactored enterprise unlink code to fix ENT-1890

Fixed quality violations and brokent test

Fixed pylint quality violations

Fixed failing unit test

Fixed broken test after rebasing with master
2019-10-23 11:35:58 +05:00
Christie Rice
1d5fcc60bb ENT-1604 Send signal when user is verified via SSO (#21946) 2019-10-15 08:18:54 -04:00
Nimisha Asthagiri
8cfc33c0f1 Python 3: multi-line regex replacement of assertIn and assertNotIn 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
e5c258948d third_party_auth python-3 upgrade 2019-09-28 12:42:51 -04:00
Feanil Patel
844acea50e Fix linting errors. 2019-09-19 17:05:02 -04:00
Feanil Patel
4eaf875741 BOM-621 Fix hashing in a bunch of places. 2019-09-19 15:53:39 -04:00
Ned Batchelder
835a84f33c Use bytestrings to create SimpleUploadedFiles. BOM-616 2019-09-19 10:32:23 -04:00
Feanil Patel
f259a911c7 BOM-618 Decode content we get from test requests. 2019-09-19 10:32:23 -04:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
aarif
61800c619f replaced StringIO imports with import from six
replaced cStringIO and StringIO imports with import from six

fixed StringIO imports

fixed StringIO imports

fixed XSS python-wrap warning
2019-08-08 00:09:16 +05:00
Zachary Hancock
90c9103a89 command to remove social auth users (#21280)
remove social auth users command
2019-08-06 15:48:19 -04:00
pkulkark
076d82970c Fix unicode username hints with SSO
Usernames containing unicode characters were
reportedly not showing up correctly in the
registration form when registered with MOE/SAML,
FB and Google.
This change fixes the issue by overriding the
django setting SOCIAL_AUTH_CLEAN_USERNAMES to
disable the default username check that wasn't
allowing non-ascii values.
2019-08-02 09:53:42 +05:30
irfanuddinahmad
e723448a77 minor logs update 2019-07-29 16:22:42 +05:00
irfanuddinahmad
df1c7f553a reformatted logging 2019-07-25 16:10:48 +05:00
aarif
ccff822a28 ran python-modernize and isort on files mentioned in INCR-396 2019-07-19 10:04:05 -04:00
Ayub khan
83bc838fae python 3 compatibility 2019-07-19 10:02:38 -04:00
Ayub khan
33bcb76a26 INCR-400 python3 compatibility 2019-07-19 10:00:39 -04:00
Awais Qureshi
3ed1399216 Merge pull request #21065 from edx/awais786/INCR-398
INCR-398
2019-07-19 11:33:43 +05:00
Awais Qureshi
af50c3c043 Merge pull request #21063 from edx/awais786/INCR-397
INCR-397
2019-07-18 14:34:43 +05:00
Awais Qureshi
8b278f3ac2 Merge pull request #21062 from edx/awais786/INCR-395
INCR-395
2019-07-18 12:19:30 +05:00
Awais Qureshi
288195e1be Merge pull request #21060 from edx/awais786/INCR-394
INCR-394
2019-07-18 12:15:37 +05:00
Amit
0044bef4fd INCR-393: Updates on Python 3.x (#21054) 2019-07-11 10:21:47 -04:00
arbisoft
e87dc6cc77 Fixing python-modernize issues. 2019-07-11 14:24:38 +05:00
arbisoft
004d856316 Fixing python-modernize issues. 2019-07-11 14:04:05 +05:00
arbisoft
c82b0110b0 Fixing python-modernize issues. 2019-07-11 13:37:11 +05:00
arbisoft
503622c5d2 Fixing python-modernize issues. 2019-07-11 12:59:47 +05:00