Commit Graph

75 Commits

Author SHA1 Message Date
Awais Qureshi
8f4491e927 Pyupgrade in common/djangoapps/third-party-modes/ 2021-03-18 11:26:19 +05:00
mariagrimaldi
acc9eaed8c feat: Changed username max_length to get it from setting and set default to 30 chars 2021-02-19 15:29:14 -04:00
Jawayria
7be5a683aa Applied pylint-amnesty to third_party_auth 2021-02-03 13:37:05 +05:00
Gábor Boros
6ccd6c308d docs(lms and studio): Replace all .(lms|cms).(\w+|_)?\.json to .(lms|cms).(\w+|_)?\.yml 2020-09-18 10:44:14 +02:00
taliaedX
728d57aac2 Merge pull request #24888 from edx/trhodes/ENT-3350
SAML Configuration API endpoint (And Public Flag)
2020-09-08 10:42:45 -04:00
Talia
9cbd1907ea SAML Configuration API endpoint + Public flag 2020-09-04 14:58:05 -04:00
Régis Behmo
288ccc6705 Fix creation of LTIProviderConfig object in admin
When attempting to create a "Provider Configuration (LTI)" object in the
django admin, the following 500 error was being triggered:

    "Either an icon class or an icon image must be given (but not both)"

This was caused by the `clean()` method of the mother class
(OAuth2ProviderConfig) which checked whether at least the icon_class XOR
icon_list attribute was well defined. In the case of the
LTIProviderConfig objects it isn't, but that's ok because this object
is not meant to be displayed in the login form.

To resolve this issue, we modify the `clean()` method to ensure that at
most icon_class or icon_image is set. Alternatively, we could have set
`visible = False` and then dropped the `visible` column from the
database, but it was deemed too risky.
unused.

Close CRI-205.
2020-08-21 09:51:12 +02:00
Talia
6d365ca1da fixes for front end saml work and to align with data requirements. 2020-07-24 14:45:34 -04:00
Alexander Sheehan
0e5b70a800 Adding country to list of attrs, updating help text and max length 2020-07-23 16:29:05 -04:00
Alexander Sheehan
2e2493f99d ENH adding country to SAML mapping config 2020-07-21 16:23:00 -04:00
Tim McCormack
9cff06d762 Address 1+N django_site queries on login page by comparing keys directly (#23947)
Rather than fetching the Site for every provider in a loop, just look at
the ID of the site.

Added regression test, showing N `django_site` requests before and 0 after.
2020-05-11 15:37:22 +00:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Manjinder Singh
d08cd9ce04 Removing provider imports from edx-platform (#23229)
* Removing from provider imports from openedx

 * removed all uses of retire_dop_oauth2_models

* Removing provider library from lms, common, and cms

Created/copied function short_token(from django-oauth-provider) and create_hash256 to help with conversion
2020-03-02 08:56:54 -05:00
Manjinder Singh
953b0e728b Remove ThirdPartyAuthProviderApiPermission (#23195)
* Remove ThirdPartyAuthProviderApiPermission

Also removed ProviderApiPermissions and ApiPermissionsAdminForm and removal of DOP for third_party_auth

* Removing model

* Replaced long_token with default_token_generator

* Adding skip to test_migrations_are_in_sync
2020-02-27 15:42:09 -05:00
zia.fazal@arbisoft.com
d7ed021b8d Added ability to logout from IDP
Logout link should be displayed only for learner portal

Added changed to display only for learner portal
Added unit tests

check third_party_auth is enabled

Changes to extend SSO logout link feature to Oauth providers

Fixed quality violations

Removed unncessary assert

Reviewer feedback changes
2020-02-07 19:38:36 +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
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
Zach Hancock
a350d327de complete waiting enrollments. fixed 2019-05-24 13:47:49 -04:00
Jeremy Bowman
f9929f32b5 Update quality threshold counts (#20681) 2019-05-24 08:27:54 -04:00
Zach Hancock
afe3cdb3ec user lookup util 2019-04-24 09:47:38 -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
Cory Lee
ac4845d052 DEPR-14 Remove AWS.py 2019-03-28 10:48:34 -04:00
Julia Eskew
368f221f0a Initial start on annotations. 2019-02-19 11:24:21 -05:00
Matthew Piatetsky
9681ca36b8 fix unicode strings in common/ 2019-02-05 10:57:00 -05:00
Saleem Latif
ec2a36b4a4 Third Party Authentication (SSO): Default values for SAML attributes 2018-10-22 11:03:01 +05:00
Nimisha Asthagiri
8cf44283c9 Consolidate user login and authentication code 2018-09-15 03:21:39 -04:00
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
Brittney Exline
f41bf2f409 ENT-944 Create SSOVerifications for users in tpa pipeline based on provider's settings 2018-04-23 10:10:26 -04:00
Brittney Exline
9a86a67ae0 ENT-943 Cleanup of old third_party_auth provider slug fields 2018-04-10 09:58:31 -04:00
Brittney Exline
682ec886ed ENT-943 Refactoring third_party_auth models 2018-04-05 15:19:58 -04:00
Douglas Hall
2ecbe19b29 ENT-936 Allow TPA providers to be configured to not send a welcome email upon registration. 2018-03-28 14:00:35 -04:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Brittney Exline
c4670a33d7 ENT-839 Add ability to configure SP metadata for an IdP 2018-01-30 11:37:46 -05:00
asadiqbal
47547c0c1b Delete SAML Provider Configurations 2018-01-26 17:54:45 +05:00
Douglas Hall
d8494483c1 ENT-779 Remove code references to ProviderConfig.drop_existing_session.
We no longer need the drop_existing_session flag on IdP configurations
because dropping the existing session should actually be the only
behavior for certain view in the edx-enterprise code.
2017-12-21 14:39:46 -05:00
Uman Shahzad
ee09c4ccf9 Add a TPA pipeline step to allow force sync of user details.
The feature is controlled by a switch on the provider.
Emails are sent if the email changes during the sync.
We skip syncing the username/email if there would be a conflict.
2017-11-29 16:16:55 +05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Brittney Exline
f844510b71 ENT-619 Clean usernames coming from identity providers
Since we have started integrating with more clients, we have found that the usernames
that get passed are not compatible with our username restrictions. This PR introduces
a function to clean usernames to make them compatible, particularly in the auto registration
case.
2017-08-30 13:36:57 -04:00
Omar Al-Ithawi
d0c7a532ad Make the platform name translatable 2017-08-29 12:43:36 -04:00
Saleem Latif
9e3f7ed69b Add more debug info when SAMLProviderData is not found. 2017-08-11 15:21:19 +05:00
Brittney Exline
ae8a5f2bf7 ENT-447 Add flag to third party auth SAML provider to send to the registration page first 2017-06-27 13:12:00 -04:00
Uman Shahzad
8b65ca17c5 Migrate to latest, split python-social-auth.
PSA was monolothic, now split, with new features, like
a DB-backed partial pipeline. FB OAuth2 version also upped.

Partial pipelines don't get cleared except when necessary.
They persist for special cases like change of browser while
still mid-pipeline (i.e. email validation step).

Refactor, cleanup, and update of a lot of small things as well.

PLEASE NOTE the new `social_auth_partial` table.
2017-06-20 22:05:36 +05:00
Uman Shahzad
d5c85331c5 Automatically populate additional fields for SSO scenarios.
When authenticating using an SAML IdP, gather additional user
data besides what is standard. Requires admin to input JSON
in settings to recognize the additional user data.
2017-06-18 22:18:43 +00:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Brandon DeRosier
123584e5af ENT-361: Allow hiding of IDP selection page during SSO
Closes ENT-361.
2017-05-03 03:39:48 -04:00
Jesse Shapiro
ee9f632a3d Allow per-SSO-provider session expiration limits 2017-04-18 09:07:53 -04:00
Jesse Shapiro
3f6e690827 When visiting track selection page with a TPA hint, logout the existing session 2017-04-17 23:09:01 -04:00
Jesse Shapiro
da3867e870 Enable direct calls to SAP SuccessFactors OData API to fetch user data during SSO process 2017-04-06 10:31:01 -04:00