Skip to content

prevent the LMS/CMS from being renderable in an iframe - #2712

Closed
chrisndodge wants to merge 2 commits into
masterfrom
cdodge/prevent-clickjacking
Closed

prevent the LMS/CMS from being renderable in an iframe#2712
chrisndodge wants to merge 2 commits into
masterfrom
cdodge/prevent-clickjacking

Conversation

@chrisndodge

Copy link
Copy Markdown
Contributor

@dianakhuang @ormsbee not sure who to ask here

I can't think of an automated test for this. Basically, this just makes sure that someone can't embed the LMS/CMS in an iframe.

@sefk

sefk commented Feb 25, 2014

Copy link
Copy Markdown
Contributor

Why? I love the idea of people embedding edX in other sites / apps. Fits in to my whole worldview of breaking up courses, modules, syndication and mixups, etc. (If anyone hasn't heard my rant on that, I'd be happy to replay :) )

@chrisndodge

Copy link
Copy Markdown
Contributor Author

@sefk just sent out-of-band email on this.

Anyhow, seems like this breaks the LTI tests....

@jbau

jbau commented Feb 25, 2014

Copy link
Copy Markdown

I agree with clickjacking prevention as a goal. I suspect there will be use cases where we want the LMS to be embedded in something as an iframe, and we'll need to work around this in some way (probably more granularity on when to send the header, based on URI).

So I'm philosophically in support of this PR, but anticipating that it'll create future work.

@jbau

jbau commented Feb 25, 2014

Copy link
Copy Markdown

actually wait--this might break your LMS buttons for login and registration, which are iframed in by drupal. And I think we have usage cases where OpenEdX is iframed by coursework.

I think we'll want to use allow-from to whitelist. Can we do it that way instead (there must be some other middleware that's open source and can do this.

https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options

@jbau

jbau commented Feb 25, 2014

Copy link
Copy Markdown

Looking here https://github.com/django/django/blob/stable/1.4.x/django/middleware/clickjacking.py
it seems like we can just make settings.X_FRAME_OPTIONS configurable and it'll work. I believe edx.org can use a setting like *.edx.org, and Stanford can do something like *.class.stanford.edu *.coursework.stanford.edu

@chrisndodge

Copy link
Copy Markdown
Contributor Author

@jbau good catch! I think you are right. Right now the configuration is to "sameorigin", which I presume does not cover subdomains.

@jbau

jbau commented Feb 25, 2014

Copy link
Copy Markdown

Erm. Looks like allow-from is not well supported: see https://bugs.webkit.org/show_bug.cgi?id=94836

So I guess switching by site (on for certain partners, default off for the rest) is the way to go.

@chrisndodge

Copy link
Copy Markdown
Contributor Author

Closing this PR for now as I have to make this more configurable to allow for iframing of the registration button.

rmoch added a commit to openfun/edx-platform that referenced this pull request Mar 15, 2016
rmoch added a commit to openfun/edx-platform that referenced this pull request Mar 16, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, then we use new dependancy edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own
     Related to openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712
rmoch added a commit to openfun/edx-platform that referenced this pull request Mar 17, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, then we use new dependancy edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own
     Related to openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712

Quick fix missing i18n in javascript

This closes issue openedx#2705.
regisb pushed a commit to openfun/edx-platform that referenced this pull request Mar 22, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, then we use new dependancy edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own
     Related to openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712

Quick fix missing i18n in javascript

This closes issue openedx#2705.
regisb pushed a commit to openfun/edx-platform that referenced this pull request Mar 23, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, then we use new dependancy edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own
     Related to openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712

Quick fix missing i18n in javascript

This closes issue openedx#2705.
regisb pushed a commit to openfun/edx-platform that referenced this pull request Mar 24, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, then we use new dependancy edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own
     Related to openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712

Quick fix missing i18n in javascript

This closes issues openedx#2705 and openedx#1831.
regisb pushed a commit to openfun/edx-platform that referenced this pull request May 9, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, then we use new dependancy edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own
     Related to openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712

Quick fix missing i18n in javascript

This closes issues openedx#2705 and openedx#1831.
regisb pushed a commit to openfun/edx-platform that referenced this pull request May 26, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, so we use new dependency edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own

Related to issues openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712 openedx#2705 openedx#1831 openedx#2788 openedx#2791 openedx#2863
rmoch added a commit to openfun/edx-platform that referenced this pull request Aug 26, 2016
Fork edx-platform to allow usage of ecommerce service and Paybox:
     - ecommerce code is not compatible with Cypress regarding the JWT authentification, so we use new dependency edx_rest_api_client (added to fun-apps requirements) to auth
     - Display prices in Euro currency
     - Alphabeticaly order Paybox fields to ensure they are posted in the same order they were signed where created
     - Change edX payement related wording for our own

Related to issues openedx#1831 openedx#2637 openedx#2636 openedx#2635 openedx#2656 openedx#2644 openedx#2662 openedx#2712 openedx#2705 openedx#1831 openedx#2788 openedx#2791 openedx#2863
Dogwood openedx#3116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants