Commit Graph

234 Commits

Author SHA1 Message Date
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
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
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
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
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
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
arbisoft
004d856316 Fixing python-modernize issues. 2019-07-11 14:04:05 +05:00
Thomas Tracy
f0ecc938ef Add IdentityServer3 Backend (#20275)
* Add IdentityServer3 Backend

This adds a backend for users who want to use IdentityServer3 as their
SSO provider. It can be used with the OAuth2ProviderConfig in django
admin to point to an external provider.
2019-06-07 09:38:46 -04:00
irfanuddinahmad
53265d506e user existence check updated to use email only 2019-05-30 12:30:14 +05:00
Jeremy Bowman
f9929f32b5 Update quality threshold counts (#20681) 2019-05-24 08:27:54 -04:00
amitvadhel
8ef8dd27b2 INCR-139: Run python-modernize on common/djangoapps/third_party_auth/tests [tests, data] 2019-05-10 12:54:01 +03:00
Michael Roytman
66dc07a49f Merge pull request #20295 from edx/mroytman/EDUCATOR-4229-lms-redirection-idp
add LMS endpoint to redirect to identity provider
2019-04-25 14:13:06 -04:00
Zach Hancock
afe3cdb3ec user lookup util 2019-04-24 09:47:38 -04:00
Michael Roytman
14160b919f add LMS endpoint to redirect to identity provider 2019-04-23 17:10:31 -04:00
Waheed Ahmed
3bdf83dba7 Update third party auth login page message.
LEARNER-5258
2019-04-17 15:20:38 +05:00
Thomas Tracy
29fb1588a9 Another pip issue. 2019-04-10 09:02:50 -04:00
Thomas Tracy
f59dc6c820 Fix's bug that does not allow an Oauth2 provider to have different slug and backend_names
Added comment to explain model change.

Removed accidental whitespace.

Another pip issue.
2019-04-09 19:59:55 -04:00
Brittney Exline
34fa06aeda Merge pull request #20026 from edx/bexline/ent-1500
ENT-1500 Update third_party_auth pipeline to override get_username
2019-03-21 10:29:47 -04:00
Hammad Ahmad Waqas
a48b59c24c fixed : when SAML attribute is mapped + present, but has no value 2019-03-21 12:08:50 +05:00
Brittney Exline
550d2616b5 ENT-1500 Update third_party_auth pipeline to override get_username
We are doing this for two reasons:
1. We suspect that the get_username function in social_core is performing a case-sensitive
username check which is breaking when we try to create the user with a duplicate username.
This version ensures we perform a case insensitive check.

2. If it's not that, we want more logging information in order to debug the issue.
2019-03-19 17:01:29 -04:00
Matthew Piatetsky
9681ca36b8 fix unicode strings in common/ 2019-02-05 10:57:00 -05:00
Michael Youngstrom
e7898d153d Move to python3-saml 2019-01-30 16:35:16 -05:00
Nimisha Asthagiri
f840774169 Fix Studio SSO
ARCH-329
2018-12-22 22:48:46 -05:00
Gabe Mulley
5311509b19 Provide more context to calls to Segment.
Implementation for DE-1089.

Centralize the definition of context into a single method.  This is in
common/djangoapps/track because the context is originally set there by
middleware.
2018-11-15 20:56:10 -05:00
Waheed Ahmed
bf5ad9b871 Update session cookie expiry.
Update session cookie expiry to 4 weeks regardless of remember me
checkbox is checked or not.

LEARNER-6219
2018-11-14 17:36:51 +05:00
Ned Batchelder
3353e7425e Remove unused imports 2018-11-03 16:07:05 -04:00
Dillon-Dumesnil
1754dc5119 Merge pull request #19105 from edx/ddumesnil/unicode_cleanup
Cleaning up unicode waffle flag
2018-10-30 13:20:41 -04:00
Saleem Latif
ec2a36b4a4 Third Party Authentication (SSO): Default values for SAML attributes 2018-10-22 11:03:01 +05:00
Dillon Dumesnil
0a0df72fc9 Cleaning up unicode waffle flag 2018-10-19 13:25:08 -04:00
Nimisha Asthagiri
8cf44283c9 Consolidate user login and authentication code 2018-09-15 03:21:39 -04:00
asadiqbal
0dbdac3262 Unlink learner from Enterprise Customer when learner unlinks from IDP 2018-09-04 11:07:53 +05:00
Jeremy Bowman
3ff3eee2f2 TE-2689 Remove useless pylint suppressions part 4 2018-08-20 12:54:22 -04:00
Jeremy Bowman
69092ac18b Fix unit tests with latest social-auth-* packages 2018-06-13 17:24:33 -04:00
Michael Youngstrom
26b4e30833 Remove django 1.8 shim 2018-06-06 10:34:56 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Adeel Khan
cd2f6592c3 Catch HttpError thrown by Python Social Auth.
This patch enables catching HttpError exception raised
by PSA because of any issue caused at client/server.
Further it redirects user to login page with a
message about the error.

LEARNER-4344
2018-04-26 13:02:38 +05:00