Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ EDXAPP_ENABLE_AUTO_AUTH: false
# Settings for enabling and configuring third party authorization
EDXAPP_ENABLE_THIRD_PARTY_AUTH: true
EDXAPP_ENABLE_OAUTH2_PROVIDER: false
EDXAPP_THIRD_PARTY_AUTH_BACKENDS:
- social_core.backends.google.GoogleOAuth2
- social_core.backends.linkedin.LinkedinOAuth2
- social_core.backends.facebook.FacebookOAuth2
- social_core.backends.azuread.AzureADOAuth2
- third_party_auth.appleid.AppleIdAuth

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kaizoku -- this breaks juniper.3 deployments because third_party_auth.appleid.AppleIdAuth doesn't exist in opencraft-release/juniper.3 (nor in upstream open-release/juniper.3, it's only in master).

The default settings should suffice if there's nothing set for EDXAPP_THIRD_PARTY_AUTH_BACKENDS though, so not sure why they're duplicated here?

@pomegranited pomegranited Oct 9, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ach bummer, I tried using EDXAPP_THIRD_PARTY_AUTH_BACKENDS: !!null to see if it would fallback to the defaults in the code, but it doesn't work:

 File "/edx/app/edxapp/edx-platform/lms/envs/production.py", line 630, in <module>
AUTHENTICATION_BACKENDS = list(tmp_backends) + list(AUTHENTICATION_BACKENDS)
TypeError: 'NoneType' object is not iterable

We could have achieved the same effect by adding THIRD_PARTY_AUTH_BACKENDS to EDXAPP_LMS_ENV_EXTRA and/or EDXAPP_CMS_ENV_EXTRA instead of adding a new variable here. But since it's already upstreamed and we're stuck with it, could you submit an internal PR to remove this third_party_auth.appleid.AppleIdAuth line from opencraft-release/juniper.3?

This is blocking redeployments of juniper.3 instances.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investigating this @pomegranited. #140 has the fix.

It was pointed out to me that we could use EDXAPP_LMS_ENV_EXTRA unfortunately after we had opened the upstream PR, and they merged this upstream fairly quickly. Also as you found we had to duplicate the default variables since setting anything else would override the defaults.

- third_party_auth.identityserver3.IdentityServer3
- third_party_auth.saml.SAMLAuthBackend
- third_party_auth.lti.LTIAuthBackend

EDXAPP_ENABLE_MOBILE_REST_API: false

Expand Down Expand Up @@ -1506,6 +1515,7 @@ lms_env_config:
OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS: "{{ EDXAPP_OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS }}"
OAUTH_DELETE_EXPIRED: "{{ EDXAPP_OAUTH_DELETE_EXPIRED }}"
PAID_COURSE_REGISTRATION_CURRENCY: "{{ EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY }}"
THIRD_PARTY_AUTH_BACKENDS: "{{ EDXAPP_THIRD_PARTY_AUTH_BACKENDS }}"
GIT_REPO_DIR: "{{ EDXAPP_GIT_REPO_DIR }}"
SITE_NAME: "{{ EDXAPP_LMS_SITE_NAME }}"
HTTPS: "{{ EDXAPP_LMS_HTTPS }}"
Expand Down