One of our main features broke after upgrading to version 6:
Problem
We have some custom views that allow users to get information without login. In order to do that we use insecure login and iframes.
http://docs.splunk.com/Documentation/Splunk/6.0/AdvancedDev/3rdParty#x1._Enable_insecure_login
I tested the insecure login and the view is working fine. However, when is coming in the iframe we do not have any display. Please note that this was working just before we did the upgrade.
This is my HTML code
<meta http-equiv="X-Frame-Options" content="allow" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="X-Frame-Options" content="allow" />
This is my view code
<module name="HiddenSearch" autoRun="True" layoutPanel="panel_row2_col1">
<param name="search">sourcetype="tpharma_admin" | timechart span="5m" avg(free_memory) by source</param>
<param name="earliest">-24h</param>
<module name="HiddenChartFormatter">
<param name="chart">column</param>
<param name="primaryAxisTitle.text">time</param>
<param name="legend.placement">right</param>
<param name="chartTitle">FAST Admin free_mem</param>
<!-- Time Range Button -->
<module name="TimeRangePicker">
<param name="selected">Last 24 hours</param>
<param name="searchWhenChanged">True</param>
<module name="JobProgressIndicator"/>
<!-- Define JSChart -->
<module name="JSChart"/>
</module>
</module>
</module>
</view>
Thanks,
Dan
In 5.0.5 and 6.0, as part of a security-related fix (reference SPL-65987) we disabled the ability to insecurely embed content on a remote site by default.
To restore this capability, you now need to make an explicit change in web.conf to the x_frame_options_sameorigin
parameter and set it to False
:
x_frame_options_sameorigin = [True | False]
* adds a X-Frame-Options header set to "SAMEORIGIN" to every response served by cherrypy
* Defaults to True
a change was made in 5.0.5 and later versions to improve security and prevent clickjacking issues, this is what you're running into.
to implement this change, we set X-FRAME-OPTIONS=SAMEORIGIN in the header for all cherrypy served pages. this means that you can only iframe in pages coming from the same site.
we added a new web.conf setting: x_frame_options_sameorigin = [True | False] which defaults to True.
if you set this to False, your iframing will work again.
Im on Splunk 6.1.3 and Im still seeing this problem: Refused to display 'https://sites.google.com/site/rickerlr/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. I have set in my $SPLUNK_HOME/etc/system/local/web.conf x_frame_options_sameorigin = False , restarted Splunk but still getting the same error. Ideas?
Thank you for your answer problem solved.
In 5.0.5 and 6.0, as part of a security-related fix (reference SPL-65987) we disabled the ability to insecurely embed content on a remote site by default.
To restore this capability, you now need to make an explicit change in web.conf to the x_frame_options_sameorigin
parameter and set it to False
:
x_frame_options_sameorigin = [True | False]
* adds a X-Frame-Options header set to "SAMEORIGIN" to every response served by cherrypy
* Defaults to True
Hi,
Do we any documentation for this type of issue , as it's with every upgrade
I am havng same issue with Splunk 8.0.6, and the above is not helping me to load iframe
Tried the same in web.conf
hexx,
I was trying to embed iframe for "https://localhost:8089/services/" in my xml located in "http://localhost:8000".
But it throws an error as "Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'"
So I have modified the above stanza in my web.conf as you stated above. However no luck.
Then I added the following stanza in my system/local server.conf. Then it works like a charm.
[httpServer]
x_frame_options_sameorigin = False
Is there any notable difference between these two stanzas in web.conf and server.conf? Why the error occured even-though i changed my web.conf?
Splunk Version : 6.3.0
Hello all,
As a follow up.. Would there be a config available to keep the security, though allow ONLY a specific address?
IE: Keep the setting "x_frame_options_sameorigin = [True ]" with an exception set to allow x.x.x.x\16 OR x.x.x.x OR URL string
Thanks!!
@ rbardonetorian if you have any solution then kindly share the same since we also want to keep the x_frame_options as "True" and we want to allow only a particular URL so if you have any ideas then kindly share.
Can anyone help on this
When using search-head pooling, which web.conf file would get updated for this issue?
Thank you for your answer problem solved.
Similar question posted by watsm10: http://answers.splunk.com/answers/103706/splunk-505-upgrade-stopping-iframes-from-working