<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Nagesh Susarla's Blog - Latest Comments in Keeping secrets safe with YQL Storage</title><link>http://nageshsusarla.disqus.com/</link><description></description><atom:link href="https://nageshsusarla.disqus.com/keeping_secrets_safe_with_yql_storage/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 01 May 2015 13:17:14 -0000</lastBuildDate><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-1998006835</link><description>&lt;p&gt;The reason this is a top ten &lt;a href="http://www.bestbustours.com/4-day-from-new-york-to-niagara-falls-canada-montreal-toronto-tour.html" rel="nofollow noopener" target="_blank" title="http://www.bestbustours.com/4-day-from-new-york-to-niagara-falls-canada-montreal-toronto-tour.html"&gt;niagara tours from new york&lt;/a&gt; safe travel tip is obvious. The kids are our number one concern when it comes to traveling.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Linda Lovelace</dc:creator><pubDate>Fri, 01 May 2015 13:17:14 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-260680631</link><description>&lt;p&gt;This is nice YQL tutorial.  Thanks nagesh for providing such a great post. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jane Deas</dc:creator><pubDate>Fri, 22 Jul 2011 07:28:34 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-84556207</link><description>&lt;p&gt;Thanks, Nagesh! This all works beautifully. I've learned some very useful details about using YQL. I blogged my usage of YQL, in case you're interested!&lt;/p&gt;&lt;p&gt;Halo Reach API demo -- this would not be possible without YQL:&lt;br&gt;&lt;a href="http://www.timacheson.com/Blog/2010/oct/halo_reach_api_demo" rel="nofollow noopener" target="_blank" title="http://www.timacheson.com/Blog/2010/oct/halo_reach_api_demo"&gt;http://www.timacheson.com/B...&lt;/a&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Acheson</dc:creator><pubDate>Wed, 06 Oct 2010 07:39:48 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-84528982</link><description>&lt;p&gt;Hi Tim,&lt;br&gt;&lt;br&gt;That's indeed a very good question. Query aliases are only shortcuts. Besides that they do not prevent the user from seeing the actual URLs that you used in your query. The user of the alias can add a '&amp;amp;diagnostics=true' and see the entire URL that was used to make the call to the webservice. &lt;br&gt;&lt;br&gt;Let me take the following example:&lt;br&gt;&lt;br&gt;If I declared a query alias, such as &lt;a href="http://query.yahooapis.com/v1/public/yql/nagesh/test2?foo=topstories" rel="nofollow noopener" target="_blank" title="http://query.yahooapis.com/v1/public/yql/nagesh/test2?foo=topstories"&gt;http://query.yahooapis.com/v1/public/yql/nagesh/test2?foo=topstories&lt;/a&gt; which takes in a query parameter named 'foo' and the rest of the URL is hardcoded in my alias, I can simply append &amp;amp;diagnostics=true to see the following which gives away the URL that I used in this case.&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;url execution-time="10" &amp;gt;&lt;a href="http://rss.news.yahoo.com/rss/topstories&lt;/url&gt;" rel="nofollow noopener" target="_blank" title="http://rss.news.yahoo.com/rss/topstories&lt;/url&gt;"&gt;http://rss.news.yahoo.com/r...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;br&gt;Using stored secrets going one step ahead by obsuring all URLs that appear in the diagnostics to look something like http://domain... thus ensuring that any secret gives are not divulged to the user.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nagesh Susarla</dc:creator><pubDate>Wed, 06 Oct 2010 02:16:30 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-84526945</link><description>&lt;p&gt;Thanks, that's fantastic!&lt;/p&gt;&lt;p&gt;Is it enough to hide my API within a query alias? Or is YQL Storage the only way? If the latter is the case, can you explain why? It seems to me that, when the API key is in a query alias, other people can't see it. (E.g. if I set a hard-coded API key value in a query alias, with parameters for the other values, and then use the URL for that query alias. Then, the API key is not revealed in the URL.)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Acheson</dc:creator><pubDate>Wed, 06 Oct 2010 01:58:36 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-84363118</link><description>&lt;p&gt;Hi Tim,&lt;/p&gt;&lt;p&gt;One way to accomplish this is by using the uritemplate table which lets you create arbitrary URLs from templates like the one you mention.&lt;/p&gt;&lt;p&gt;example:&lt;/p&gt;&lt;p&gt;select url from uritemplate where template='&lt;a href="http://bungie.net/videos/" rel="nofollow noopener" target="_blank" title="http://bungie.net/videos/"&gt;http://bungie.net/videos/&lt;/a&gt;{BungieAPIKey}/{user}/{page}' and BungieAPIKey='key' and user='foo' and page='bar'&lt;/p&gt;&lt;p&gt;Once you have the URL you can use the JSON table to curl the URL&lt;/p&gt;&lt;p&gt;select * from json where url in (select url from uritemplate where template='&lt;a href="http://bungie.net/videos/" rel="nofollow noopener" target="_blank" title="http://bungie.net/videos/"&gt;http://bungie.net/videos/&lt;/a&gt;{BungieAPIKey}/{user}/{page}' and BungieAPIKey='key' and user='foo' and page='bar')&lt;/p&gt;&lt;p&gt;Now once you have this working, lets look at what needs to be done to make the API key a secret. To do that you could have to create a store table entry which contains the following&lt;/p&gt;&lt;p&gt;"SET BungieAPIKey='secret' on uritemplate;"&lt;/p&gt;&lt;p&gt;Insert this into the &lt;a href="http://yql.storage" rel="nofollow noopener" target="_blank" title="yql.storage"&gt;yql.storage&lt;/a&gt; as described in the docs or the link and use the execute key that is returned to run your query.&lt;/p&gt;&lt;p&gt;&lt;a href="http://developer.yahoo.com/yql/console?env=YOUR_STORE_ENTRY" rel="nofollow noopener" target="_blank" title="http://developer.yahoo.com/yql/console?env=YOUR_STORE_ENTRY"&gt;http://developer.yahoo.com/...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The query doesn't need the api key anymore so you can run&lt;/p&gt;&lt;p&gt; select * from json where url in (select url from uritemplate where template='&lt;a href="http://bungie.net/videos/" rel="nofollow noopener" target="_blank" title="http://bungie.net/videos/"&gt;http://bungie.net/videos/&lt;/a&gt;{BungieAPIKey}/{user}/{page}'  and user='foo' and page='bar')&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nagesh Susarla</dc:creator><pubDate>Tue, 05 Oct 2010 14:35:15 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-83732162</link><description>&lt;p&gt;Hi Nagesh, thanks, this is a useful tutorial, but it doesn't solve the biggest problem I have with needing to hide my API keys.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;I have a YQL query which returns JSON from a web service URL:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;SELECT&lt;br&gt;    * &lt;br&gt;FROM&lt;br&gt;    json &lt;br&gt;WHERE &lt;br&gt;    url="http://bungie.net/videos/{BungieAPIKey}/{user}/{page}"&lt;/pre&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;How can I use a YQL query to return the JSON from this URL, while making my API Key secret or less obvious?&lt;/b&gt; Is it impossible to do?&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;I want to keep my API key "{BungieAPIKey}" secret, or at least make it a parameter "@BungieAPIKey" so I can hide it slightly within a query alias.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;I posted &lt;a href="http://developer.yahoo.net/forum/index.php?showtopic=7197" rel="nofollow noopener" target="_blank" title="http://developer.yahoo.net/forum/index.php?showtopic=7197"&gt;this question on the YDN/YQL forum&lt;/a&gt;, but I rarely get much of a response on the YDN forums.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Acheson</dc:creator><pubDate>Mon, 04 Oct 2010 05:37:11 -0000</pubDate></item><item><title>Re: Keeping secrets safe with YQL Storage</title><link>http://nagiworld.net/2010/03/keeping-secrets-safe-with-yql-storage#comment-64831712</link><description>&lt;p&gt;Thanks for the information. Nothing is gonna break this lock. It is Unbreakable (like in the song by Michael Jackson which can be downloaded from &lt;a href="http://www.mp3hounddog.com" rel="nofollow noopener" target="_blank" title="http://www.mp3hounddog.com"&gt;http://www.mp3hounddog.com&lt;/a&gt; )!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ViolaBrown</dc:creator><pubDate>Wed, 28 Jul 2010 07:29:10 -0000</pubDate></item></channel></rss>