-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing sender email address and cookie name conflicts in edX deployments
This fixes two distinct and unrelated issues that we are seeing in our edX installations. - When working across installations that share a subdomain (e.g. QA and production or residential staging and live) users are unable to stay logged into the corresponding edX installations. This is due to a conflict in the cookie names related to JWT sessions for e.g. the learner MFE. This adds environment scoping to all of the cookie names that might conflict across installations. - When sending bulk emails through the instructor dashboard we are seeing various failure modes. The root of the issue is that the `BULK_EMAIL_DEFAULT_FROM_EMAIL` value needs to be overridden or else those bulk emails will be sent from `[email protected]`. This adds an appropriate value for that setting to each of the configuration templates relating to our separate deployments.
- Loading branch information
1 parent
64a2cfa
commit 77c3ab8
Showing
17 changed files
with
68 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ jobs: | |
- name: mfe-app-learning/dist | ||
params: | ||
ABOUT_US_URL: https://rc.mitxonline.mit.edu/about-us/ | ||
ACCESS_TOKEN_COOKIE_NAME: edx-jwt-cookie-header-payload | ||
ACCESS_TOKEN_COOKIE_NAME: mitxonline-qa-edx-jwt-cookie-header-payload | ||
BASE_URL: https://courses-qa.mitxonline.mit.edu/learn | ||
CSRF_TOKEN_API_PATH: /csrf/api/v1/token | ||
Contact: mailto:[email protected] | ||
|
@@ -69,7 +69,7 @@ jobs: | |
SUPPORT_URL: https://mitx-micromasters.zendesk.com/hc/en-us/requests/new | ||
TERMS_OF_SERVICE_URL: https://rc.mitxonline.mit.edu/terms-of-service/ | ||
TRADEMARK_TEXT: © MITxOnline. All rights reserved except where noted. | ||
USER_INFO_COOKIE_NAME: edx-user-info | ||
USER_INFO_COOKIE_NAME: mitxonline-qa-edx-user-info | ||
run: | ||
path: sh | ||
dir: mfe-app-learning | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,8 @@ SECRET_KEY: {{ .Data.django_secret_key }} | |
JWT_AUTH: # NEEDS ATTENTION | ||
JWT_AUDIENCE: mitx | ||
JWT_AUTH_COOKIE: {{ env "ENVIRONMENT"}}-edx-jwt-cookie | ||
JWT_AUTH_COOKIE_HEADER_PAYLOAD: edx-jwt-cookie-header-payload | ||
JWT_AUTH_COOKIE_SIGNATURE: edx-jwt-cookie-signature | ||
JWT_AUTH_COOKIE_HEADER_PAYLOAD: {{ env "ENVIRONMENT" }}-edx-jwt-cookie-header-payload | ||
JWT_AUTH_COOKIE_SIGNATURE: {{ env "ENVIRONMENT" }}-edx-jwt-cookie-signature | ||
JWT_ISSUER: 'https://{{ key "edxapp/lms-domain" }}/oauth2' | ||
JWT_LOGIN_CLIENT_ID: login-service-client-id | ||
JWT_LOGIN_SERVICE_USERNAME: login_service_user | ||
|
@@ -141,6 +141,7 @@ BUGS_EMAIL: [email protected] # MODIFIED | |
EMAIL_USE_DEFAULT_FROM_FOR_BULK: true | ||
BULK_EMAIL_EMAILS_PER_TASK: 500 | ||
BULK_EMAIL_LOG_SENT_EMAILS: false | ||
BULK_EMAIL_DEFAULT_FROM_EMAIL: {{ key "edxapp/sender-email-address" }} # ADDED | ||
CACHES: # MODIFIED | ||
celery: | ||
<<: *redis_cache_config | ||
|
@@ -243,7 +244,7 @@ DJFS: | |
type: osfs | ||
url_root: /static/django-pyfs | ||
|
||
EDXMKTG_USER_INFO_COOKIE_NAME: edx-user-info | ||
EDXMKTG_USER_INFO_COOKIE_NAME: {{ env "ENVIRONMENT" }}-edx-user-info | ||
EDX_PLATFORM_REVISION: release | ||
ELASTIC_SEARCH_CONFIG: | ||
- host: elasticsearch.service.consul | ||
|
@@ -361,7 +362,7 @@ INTEGRATED_CHANNELS_API_CHUNK_TRANSMISSION_LIMIT: | |
SAP: 1 | ||
JWT_EXPIRATION: 30 | ||
LANGUAGE_CODE: en | ||
LANGUAGE_COOKIE: openedx-language-preference | ||
LANGUAGE_COOKIE: {{ env "ENVIRONMENT" }}-openedx-language-preference | ||
LEARNER_PORTAL_URL_ROOT: https://learner-portal-localhost:18000 | ||
LMS_BASE: {{ key "edxapp/lms-domain" }} # MODIFIED | ||
LMS_INTERNAL_ROOT_URL: https://{{ key "edxapp/lms-domain" }} # MODIFIED | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,8 @@ SECRET_KEY: {{ .Data.django_secret_key }} | |
JWT_AUTH: # NEEDS ATTENTION | ||
JWT_AUDIENCE: mitx | ||
JWT_AUTH_COOKIE: {{ env "ENVIRONMENT"}}-edx-jwt-cookie | ||
JWT_AUTH_COOKIE_HEADER_PAYLOAD: edx-jwt-cookie-header-payload | ||
JWT_AUTH_COOKIE_SIGNATURE: edx-jwt-cookie-signature | ||
JWT_AUTH_COOKIE_HEADER_PAYLOAD: {{ env "ENVIRONMENT" }}-edx-jwt-cookie-header-payload | ||
JWT_AUTH_COOKIE_SIGNATURE: {{ env "ENVIRONMENT" }}-edx-jwt-cookie-signature | ||
JWT_ISSUER: https://{{ key "edxapp/lms-domain" }}/oauth2 | ||
JWT_LOGIN_CLIENT_ID: login-service-client-id | ||
JWT_LOGIN_SERVICE_USERNAME: login_service_user | ||
|
@@ -142,6 +142,7 @@ BUGS_EMAIL: [email protected] # MODIFIED | |
EMAIL_USE_DEFAULT_FROM_FOR_BULK: true | ||
BULK_EMAIL_EMAILS_PER_TASK: 500 | ||
BULK_EMAIL_LOG_SENT_EMAILS: false | ||
BULK_EMAIL_DEFAULT_FROM_EMAIL: {{ key "edxapp/sender-email-address" }} # ADDED | ||
CACHES: # MODIFIED | ||
celery: | ||
<<: *redis_cache_config | ||
|
@@ -243,7 +244,7 @@ DJFS: | |
type: osfs | ||
url_root: /static/django-pyfs | ||
|
||
EDXMKTG_USER_INFO_COOKIE_NAME: edx-user-info | ||
EDXMKTG_USER_INFO_COOKIE_NAME: {{ env "ENVIRONMENT" }}-edx-user-info | ||
EDX_PLATFORM_REVISION: release | ||
ELASTIC_SEARCH_CONFIG: | ||
- host: elasticsearch.service.consul | ||
|
@@ -361,7 +362,7 @@ INTEGRATED_CHANNELS_API_CHUNK_TRANSMISSION_LIMIT: | |
SAP: 1 | ||
JWT_EXPIRATION: 30 | ||
LANGUAGE_CODE: en | ||
LANGUAGE_COOKIE: openedx-language-preference | ||
LANGUAGE_COOKIE: {{ env "ENVIRONMENT" }}-openedx-language-preference | ||
LEARNER_PORTAL_URL_ROOT: https://learner-portal-localhost:18000 | ||
LMS_BASE: {{ key "edxapp/lms-domain" }} # MODIFIED | ||
LMS_INTERNAL_ROOT_URL: https://{{ key "edxapp/lms-domain" }} # MODIFIED | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ SECRET_KEY: {{ .Data.django_secret_key }} | |
JWT_AUTH: # NEEDS ATTENTION | ||
JWT_AUDIENCE: mitxonline | ||
JWT_AUTH_COOKIE: {{ env "ENVIRONMENT"}}-edx-jwt-cookie | ||
JWT_AUTH_COOKIE_HEADER_PAYLOAD: edx-jwt-cookie-header-payload | ||
JWT_AUTH_COOKIE_SIGNATURE: edx-jwt-cookie-signature | ||
JWT_AUTH_COOKIE_HEADER_PAYLOAD: {{ env "ENVIRONMENT" }}-edx-jwt-cookie-header-payload | ||
JWT_AUTH_COOKIE_SIGNATURE: {{ env "ENVIRONMENT" }}-edx-jwt-cookie-signature | ||
JWT_ISSUER: 'https://{{ key "edxapp/lms-domain" }}/oauth2' | ||
JWT_LOGIN_CLIENT_ID: login-service-client-id | ||
JWT_LOGIN_SERVICE_USERNAME: login_service_user | ||
|
@@ -136,6 +136,7 @@ BUGS_EMAIL: [email protected] # MODIFIED | |
EMAIL_USE_DEFAULT_FROM_FOR_BULK: true | ||
BULK_EMAIL_EMAILS_PER_TASK: 500 | ||
BULK_EMAIL_LOG_SENT_EMAILS: false | ||
BULK_EMAIL_DEFAULT_FROM_EMAIL: {{ key "edxapp/sender-email-address" }} # ADDED | ||
CACHES: # MODIFIED | ||
celery: | ||
<<: *redis_cache_config | ||
|
@@ -228,7 +229,7 @@ DJFS: | |
type: osfs | ||
url_root: /static/django-pyfs | ||
|
||
EDXMKTG_USER_INFO_COOKIE_NAME: edx-user-info | ||
EDXMKTG_USER_INFO_COOKIE_NAME: {{ env "ENVIRONMENT" }}-edx-user-info | ||
EDX_PLATFORM_REVISION: release | ||
ELASTIC_SEARCH_CONFIG: | ||
- host: elasticsearch.service.consul | ||
|
@@ -317,7 +318,7 @@ INTEGRATED_CHANNELS_API_CHUNK_TRANSMISSION_LIMIT: | |
SAP: 1 | ||
JWT_EXPIRATION: 30 | ||
LANGUAGE_CODE: en | ||
LANGUAGE_COOKIE: openedx-language-preference | ||
LANGUAGE_COOKIE: {{ env "ENVIRONMENT" }}-openedx-language-preference | ||
LEARNER_PORTAL_URL_ROOT: https://learner-portal-localhost:18000 | ||
LMS_BASE: {{ key "edxapp/lms-domain" }} # MODIFIED | ||
LMS_INTERNAL_ROOT_URL: https://{{ key "edxapp/lms-domain" }} # MODIFIED | ||
|
Oops, something went wrong.