<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Web Services + JSON = Dump Your Proxy</title>
	<atom:link href="http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/</link>
	<description>Web services, technology and random thoughts!</description>
	<lastBuildDate>Tue, 07 Aug 2007 21:51:21 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gregory Collins</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-11774</link>
		<dc:creator>Gregory Collins</dc:creator>
		<pubDate>Thu, 07 Dec 2006 21:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-11774</guid>
		<description>Hi Dan,

Our company is in the process of implementing JSON apis for our services, and we&#039;ve run into a serious limitation in JSONscriptRequest: it causes Internet Explorer to leak memory. See &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; for details --- even after you remove the script tag from the document head, IE decides to keep all of the js text around for, oh, some reason. 

Given that we&#039;re rolling this out on a serious scale (involving sending sometimes hundreds of kB of json across the communications channel every five minutes or so) this was causing serious problems.

We&#039;ve worked around this problem by rewriting JSONscriptRequest; instead of attaching a script tag to the document head, we add an iframe element to the page instead, which points to a cgi which loads the json script........ This is obviously not something we wanted, but since IE stubbornly refuses to garbage collect as well as the other browsers, we don&#039;t see any choice. 

If you email me I can send you a test case which illustrates the problem.

--Greg</description>
		<content:encoded><![CDATA[<p>Hi Dan,</p>
<p>Our company is in the process of implementing JSON apis for our services, and we&#8217;ve run into a serious limitation in JSONscriptRequest: it causes Internet Explorer to leak memory. See <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp" rel="nofollow">this</a> for details &#8212; even after you remove the script tag from the document head, IE decides to keep all of the js text around for, oh, some reason. </p>
<p>Given that we&#8217;re rolling this out on a serious scale (involving sending sometimes hundreds of kB of json across the communications channel every five minutes or so) this was causing serious problems.</p>
<p>We&#8217;ve worked around this problem by rewriting JSONscriptRequest; instead of attaching a script tag to the document head, we add an iframe element to the page instead, which points to a cgi which loads the json script&#8230;&#8230;.. This is obviously not something we wanted, but since IE stubbornly refuses to garbage collect as well as the other browsers, we don&#8217;t see any choice. </p>
<p>If you email me I can send you a test case which illustrates the problem.</p>
<p>&#8211;Greg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sell</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-6089</link>
		<dc:creator>Sell</dc:creator>
		<pubDate>Thu, 28 Sep 2006 15:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-6089</guid>
		<description>Thanks for posting that. I didn’t know the difference was that much. I used an external parser for the XML mash-up, I am sure it’s faster if the sample uses the one that the brower provides.</description>
		<content:encoded><![CDATA[<p>Thanks for posting that. I didn’t know the difference was that much. I used an external parser for the XML mash-up, I am sure it’s faster if the sample uses the one that the brower provides.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BorkWeb &#187; Remote JavaScripting Example - Part I</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-5805</link>
		<dc:creator>BorkWeb &#187; Remote JavaScripting Example - Part I</dc:creator>
		<pubDate>Fri, 22 Sep 2006 15:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-5805</guid>
		<description>[...] - PHP - JavaScript - XTemplate - RemoteJSOutput: a simple script by Matthew Batchelder (me) and Zach Tirrell - jsr_class via Theurer.cc (This won&#039;t be mentioned in this article until part II is published) [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; PHP &#8211; JavaScript &#8211; XTemplate &#8211; RemoteJSOutput: a simple script by Matthew Batchelder (me) and Zach Tirrell &#8211; jsr_class via Theurer.cc (This won&#8217;t be mentioned in this article until part II is published) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael A. Vickers</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-4802</link>
		<dc:creator>Michael A. Vickers</dc:creator>
		<pubDate>Tue, 29 Aug 2006 17:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-4802</guid>
		<description>Has anybody given any thought on how to secure a json-based api to an application?

For instance, let&#039;s say I have an application running on a server which serves out functionality through a json api. I&#039;ll call this server the parent.

I then have a customer who wants to build a public website (which I&#039;ll call child1) where all the data processing is handled by the parent through the API. I then have customer number 2 who wants to do the same thing with an app they accessed through child2. Repeat repeat repeat.

With the assumption that the customer data contains sensitive information, is building this type of application feasible? If I take the approach detailed here, I would dynamically include script tags which would interact with the api on the parent. Is there a way to lock down the api to the approved children where other parties could not interact with the API themselves?

The first thought that comes to mind is creating some type of token based system where the token would be included in the src/uri of the script tag. I would also assume that the token would be time-limited because it would be fairly trivial to read it from the html and included on another website. If this were the case, I&#039;m left with having to fetch a token from the parent by the child servers which would take some of the shine off not having to write a proxy. Although writing a token fetching procedure would not be that difficult, you would have to write a version for the various server technologies out there.

The second thought I have is to restrict access to the api based on http_referer on request of the document in the script tag, but I believe that http_referer is a) unreliable and b) easily spoofed.

I do not wish the end user to have to authenticate themselves (implying that they must create an account) prior to using a working child.

Is it possible to secure a json api in this scenario or am I just dreaming?</description>
		<content:encoded><![CDATA[<p>Has anybody given any thought on how to secure a json-based api to an application?</p>
<p>For instance, let&#8217;s say I have an application running on a server which serves out functionality through a json api. I&#8217;ll call this server the parent.</p>
<p>I then have a customer who wants to build a public website (which I&#8217;ll call child1) where all the data processing is handled by the parent through the API. I then have customer number 2 who wants to do the same thing with an app they accessed through child2. Repeat repeat repeat.</p>
<p>With the assumption that the customer data contains sensitive information, is building this type of application feasible? If I take the approach detailed here, I would dynamically include script tags which would interact with the api on the parent. Is there a way to lock down the api to the approved children where other parties could not interact with the API themselves?</p>
<p>The first thought that comes to mind is creating some type of token based system where the token would be included in the src/uri of the script tag. I would also assume that the token would be time-limited because it would be fairly trivial to read it from the html and included on another website. If this were the case, I&#8217;m left with having to fetch a token from the parent by the child servers which would take some of the shine off not having to write a proxy. Although writing a token fetching procedure would not be that difficult, you would have to write a version for the various server technologies out there.</p>
<p>The second thought I have is to restrict access to the api based on http_referer on request of the document in the script tag, but I believe that http_referer is a) unreliable and b) easily spoofed.</p>
<p>I do not wish the end user to have to authenticate themselves (implying that they must create an account) prior to using a working child.</p>
<p>Is it possible to secure a json api in this scenario or am I just dreaming?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-4783</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 29 Aug 2006 00:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-4783</guid>
		<description>Hi Patrick,

Yes that&#039;s correct. The server needs to support JSON with callback. If it doesn&#039;t, you can use the PHP proxy!

--dan</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Yes that&#8217;s correct. The server needs to support JSON with callback. If it doesn&#8217;t, you can use the PHP proxy!</p>
<p>&#8211;dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-4683</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Wed, 23 Aug 2006 20:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-4683</guid>
		<description>So,

is this solution available *ONLY* if the server supports JSON output ?

If the server doesn&#039;t support JSON output, using JSON it doesn&#039;t make sense, and I can use PHP proxy, or server-side proxy. Is it right ?

sorry for english! :)</description>
		<content:encoded><![CDATA[<p>So,</p>
<p>is this solution available *ONLY* if the server supports JSON output ?</p>
<p>If the server doesn&#8217;t support JSON output, using JSON it doesn&#8217;t make sense, and I can use PHP proxy, or server-side proxy. Is it right ?</p>
<p>sorry for english! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rowell</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-1709</link>
		<dc:creator>Rowell</dc:creator>
		<pubDate>Mon, 29 May 2006 22:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-1709</guid>
		<description>Oh no, Sindy what are you talking about?
So what is really security on internet?
Tell me please.</description>
		<content:encoded><![CDATA[<p>Oh no, Sindy what are you talking about?<br />
So what is really security on internet?<br />
Tell me please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-1558</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Thu, 25 May 2006 14:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-1558</guid>
		<description>Great tutorial. Very useful information. It helped me in my project.
Thanks!</description>
		<content:encoded><![CDATA[<p>Great tutorial. Very useful information. It helped me in my project.<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sindy</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-1516</link>
		<dc:creator>Sindy</dc:creator>
		<pubDate>Wed, 24 May 2006 18:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-1516</guid>
		<description>2 Dan - i think, that proxys is not anonimous way for internet security.</description>
		<content:encoded><![CDATA[<p>2 Dan &#8211; i think, that proxys is not anonimous way for internet security.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: layouts</title>
		<link>http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/comment-page-1/#comment-1056</link>
		<dc:creator>layouts</dc:creator>
		<pubDate>Fri, 12 May 2006 19:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.theurer.cc/?p=30#comment-1056</guid>
		<description>that&#039;s too bad I was looking forward to testing it out.

~Scotty</description>
		<content:encoded><![CDATA[<p>that&#8217;s too bad I was looking forward to testing it out.</p>
<p>~Scotty</p>
]]></content:encoded>
	</item>
</channel>
</rss>
