<?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: Plank</title>
	<atom:link href="http://www.plankdesign.com/blog/2010/02/plank-github/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.plankdesign.com/blog/2010/02/plank-github/</link>
	<description>Carving digital goodness since 1998</description>
	<lastBuildDate>Thu, 02 Feb 2012 10:30:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Neil Crookes</title>
		<link>http://www.plankdesign.com/blog/2010/02/plank-github/#comment-25</link>
		<dc:creator>Neil Crookes</dc:creator>
		<pubDate>Wed, 25 Aug 2010 15:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/3.0/uncategorized/plank-github#comment-25</guid>
		<description>Hi Joel, Thanks for sharing these with the community. Just wondering, on the SslComponent, what&#039;s the difference between it and SecurityComponent::requireSecure ?</description>
		<content:encoded><![CDATA[<p>Hi Joel, Thanks for sharing these with the community. Just wondering, on the SslComponent, what&#8217;s the difference between it and SecurityComponent::requireSecure ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joël</title>
		<link>http://www.plankdesign.com/blog/2010/02/plank-github/#comment-24</link>
		<dc:creator>Joël</dc:creator>
		<pubDate>Wed, 25 Aug 2010 15:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/3.0/uncategorized/plank-github#comment-24</guid>
		<description>Hey Neil,

SecurityComponent::requireSecure() was actually the first iteration of what this component became.

requireSecure() was not exactly what we needed - that particular method will blackhole your request if it is not coming over HTTPS. While it would be possible to then write a blackhole method that simply redirects you to the HTTPS version of the current URL, that&#039;s a slight abuse of the error control flow graph; blackhole&#039;ing a request is what I would consider an &#039;error&#039; path in the control flow. Blackhole methods should be endpoints, and I wanted to keep it that way.

Additionally, if you use the requireSecure() + blackhole redirect technique, then all of your subsequent requests will be over HTTPS as well - CakePHP link urls generated with the HtmlHelper are all relative (as opposed to absolute), and will simply inherit the protocol used in the previous request. While this may not be a problem for many people, I needed to avoid the encryption overhead on all non-essential requests.

Finally, having all of the related logic in a component also makes things very easy to debug or disable, instead of having to chase around your AppController &amp; SecurityComponent configurations.

So, to solve these two issues and address the third, the SSL component was born. It&#039;s not the most clever piece of code I&#039;ve ever written, but it solved a few problems in a concise and very project-reusable manner.</description>
		<content:encoded><![CDATA[<p>Hey Neil,</p>
<p>SecurityComponent::requireSecure() was actually the first iteration of what this component became.</p>
<p>requireSecure() was not exactly what we needed &#8211; that particular method will blackhole your request if it is not coming over HTTPS. While it would be possible to then write a blackhole method that simply redirects you to the HTTPS version of the current URL, that&#8217;s a slight abuse of the error control flow graph; blackhole&#8217;ing a request is what I would consider an &#8216;error&#8217; path in the control flow. Blackhole methods should be endpoints, and I wanted to keep it that way.</p>
<p>Additionally, if you use the requireSecure() + blackhole redirect technique, then all of your subsequent requests will be over HTTPS as well &#8211; CakePHP link urls generated with the HtmlHelper are all relative (as opposed to absolute), and will simply inherit the protocol used in the previous request. While this may not be a problem for many people, I needed to avoid the encryption overhead on all non-essential requests.</p>
<p>Finally, having all of the related logic in a component also makes things very easy to debug or disable, instead of having to chase around your AppController &amp; SecurityComponent configurations.</p>
<p>So, to solve these two issues and address the third, the SSL component was born. It&#8217;s not the most clever piece of code I&#8217;ve ever written, but it solved a few problems in a concise and very project-reusable manner.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

