@mattab opened this Issue on October 13th 2011 Member
  • Consider extending click jacking http://dev.piwik.org/trac/changeset/4451#file0 and http://piwik.org/faq/how-to/#faq_92 to all pages, including: Email reports, API page.
  • Also, can we remove token_auth from all rendered piwik pages?
    When report is iframed, and the token_auth is NOT specified, it would be nice if the token_auth was NOT displayed at all in no page. This would prevent clickjack even further.
@robocoder commented on October 16th 2011 Contributor

If we add new settings, e.g.,

  • enable_framed_dashboard
  • enable_framed_widgets

I would recommend secure-by-default. So, the big compatbuster is that the Widgets page would display a warning div if enable_framed_widgets=0.

@mattab commented on October 24th 2011 Member
  • when token_auth is NOT specified, the HTML generated in the Iframe will not contain token_auth. So, it is OK that it is not secure.
  • when token_auth is specicied, the dragndrop vector is due to token_auth found in hard links. AFAIK We can mitigate this issue by removing the token_auth from all links. Then the widgets will be "secure" unless there is some other risk involved I'm missing!
@mattab commented on October 25th 2011 Member

I got confirmation that removing token_auth from all HREF will solve the sec issue.

Also, Anthon we could make secure by default all pages that are NOT widgets (in particular the API age and Email reports page which contain the token). For these, secure by default makes sense (since iframing them is not desired).

Plan would be :

  • allow iframing all widgets and dashboard
  • remove token_auth from all HREF links to prevent drag n drop (token_auth would be added "on click" in javascript?)
  • secure by default (via Xframe deny header) all pages that are NOT (widgets or dashboard)

PS: contact mauro when fixed

@robocoder commented on November 19th 2011 Contributor

What about this? If any existing sites have anonymous view access, then the updater writes the override setting to config.ini.php. In this case, could we default to no framing anywhere?

@mattab commented on November 22nd 2011 Member

but if we don't allow framing of widgets and dashboard, we remove a big feature from Piwik (which would require config file edit to support). It seems in this case that we can keep the feature and make it 100% safe by not having the token_auth in any of the <A> links (which allows for drag n drop attacks).

@mattab commented on February 11th 2012 Member

(In [5804]) Refs #2701
prevent click jacking attacks by dynamically adding the token auth when the link is clicked

@mattab commented on February 11th 2012 Member

(In [5805]) Fixes #2701

  • Iframe busting ALL pages except widgets/dashboard
  • Refactored iframe busting code
  • This new behavior might break some backward compatibility but can be disabled by setting enable_framed_pages = 1 in the config file

@vipsoft your review is welcome on this one!

@robocoder commented on February 12th 2012 Contributor

Thanks for refactoring.

May want to add a comment to global.ini.php that enable_framed_logins overrides this new setting.

Otherwise looks OK.

This Issue was closed on February 13th 2012
Powered by GitHub Issue Mirror