<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Securing Grails Plugin Artifacts with Filters</title>
	<atom:link href="http://mattstine.com/2009/11/10/securing-grails-plugin-artifacts-with-filters/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattstine.com/2009/11/10/securing-grails-plugin-artifacts-with-filters/</link>
	<description>Thoughts on Java, Groovy, Grails, Agile Development, etc. etc. etc.</description>
	<lastBuildDate>Tue, 17 May 2011 16:24:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Matt Passell</title>
		<link>http://mattstine.com/2009/11/10/securing-grails-plugin-artifacts-with-filters/#comment-96</link>
		<dc:creator><![CDATA[Matt Passell]]></dc:creator>
		<pubDate>Fri, 04 Dec 2009 18:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattstine.com/?p=278#comment-96</guid>
		<description><![CDATA[Hi (other) Matt,

I&#039;m not sure how relevant this is after Burt&#039;s very helpful suggestion, but I noticed that your second code snippet is exactly the same as the first.  You meant to include some code from SecurityConfig.groovy there, right?

--Matt]]></description>
		<content:encoded><![CDATA[<p>Hi (other) Matt,</p>
<p>I&#8217;m not sure how relevant this is after Burt&#8217;s very helpful suggestion, but I noticed that your second code snippet is exactly the same as the first.  You meant to include some code from SecurityConfig.groovy there, right?</p>
<p>&#8211;Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce Richardson</title>
		<link>http://mattstine.com/2009/11/10/securing-grails-plugin-artifacts-with-filters/#comment-95</link>
		<dc:creator><![CDATA[Bruce Richardson]]></dc:creator>
		<pubDate>Sun, 29 Nov 2009 09:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattstine.com/?p=278#comment-95</guid>
		<description><![CDATA[For me, this demonstrates the dangers and problems of using annotations in this way.  Now you have two ways to indicate security settings and you have to audit them both.  If you&#039;d done with the external configuration option, you&#039;d have the one way and the one set of problems.

There are now a huge number of  frameworks offering the use of annotations for configuration (Hibernate, Spring, JAX-WS etc.)  Use all their annotations and your domain objects will be decorated like the outside of a Minnesotan house at Christmas (visit Minnesota any December to find out just how garish that is).  Not only does it obscure the code rather than enhancing it, it means that code is changed much more frequently than it should.

Annotations should be intrinsically meaningful to the objects they adorn, so that any code you write can make intelligent use of them, or they should be meaningful in contexts so widely understood that their purpose will not be lost .  This often means that the only useful annotations are those meaningful to the Java compiler, but other annotations can be valid *if* the annotated object will only be used in a context where those annotations are universally understood.  Security for Grails controllers is a good candidate for the second, but since the use of annotations for security isn&#039;t part of the Grails core, which would encourage every security-plugin developer to adopt a single standard, they fail.

The whole Java world and their pets seem to be gleefully ignoring this and adopting annotation-based configuration like crazy.  It&#039;s wrong, it will bite them and maybe they&#039;ll learn.]]></description>
		<content:encoded><![CDATA[<p>For me, this demonstrates the dangers and problems of using annotations in this way.  Now you have two ways to indicate security settings and you have to audit them both.  If you&#8217;d done with the external configuration option, you&#8217;d have the one way and the one set of problems.</p>
<p>There are now a huge number of  frameworks offering the use of annotations for configuration (Hibernate, Spring, JAX-WS etc.)  Use all their annotations and your domain objects will be decorated like the outside of a Minnesotan house at Christmas (visit Minnesota any December to find out just how garish that is).  Not only does it obscure the code rather than enhancing it, it means that code is changed much more frequently than it should.</p>
<p>Annotations should be intrinsically meaningful to the objects they adorn, so that any code you write can make intelligent use of them, or they should be meaningful in contexts so widely understood that their purpose will not be lost .  This often means that the only useful annotations are those meaningful to the Java compiler, but other annotations can be valid *if* the annotated object will only be used in a context where those annotations are universally understood.  Security for Grails controllers is a good candidate for the second, but since the use of annotations for security isn&#8217;t part of the Grails core, which would encourage every security-plugin developer to adopt a single standard, they fail.</p>
<p>The whole Java world and their pets seem to be gleefully ignoring this and adopting annotation-based configuration like crazy.  It&#8217;s wrong, it will bite them and maybe they&#8217;ll learn.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://mattstine.com/2009/11/10/securing-grails-plugin-artifacts-with-filters/#comment-94</link>
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Wed, 11 Nov 2009 02:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattstine.com/?p=278#comment-94</guid>
		<description><![CDATA[OK, so why have I never been able to find this before?!?!? This is exactly the behavior that I have wanted out of the plugin, but somehow I have never been able to track it down. Definitely a far superior approach. Thanks!]]></description>
		<content:encoded><![CDATA[<p>OK, so why have I never been able to find this before?!?!? This is exactly the behavior that I have wanted out of the plugin, but somehow I have never been able to track it down. Definitely a far superior approach. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Burt Beckwith</title>
		<link>http://mattstine.com/2009/11/10/securing-grails-plugin-artifacts-with-filters/#comment-93</link>
		<dc:creator><![CDATA[Burt Beckwith]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 23:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattstine.com/?p=278#comment-93</guid>
		<description><![CDATA[Check out the &#039;controllerAnnotationStaticRules&#039; discussion in the annotation section of http://grails.org/AcegiSecurity+Plugin+-+Securing+URLs

This is used to secure URL patterns that can&#039;t be annotated, i.e. static resources (JavaScript, CSS, etc.) and controllers that you can&#039;t edit for whatever reason:

controllerAnnotationStaticRules = [
   &#039;/blurb/**&#039;: [&#039;ROLE_ADMIN&#039;],
   &#039;/setting/**&#039;: [&#039;ROLE_ADMIN&#039;]
]

This has the advantage over the filter approach of being fully integrated into the plugin and Spring Security, in that when navigating to a secured controller the requested URL will be remembered, and after a successful login you&#039;ll be redirected to that URL.]]></description>
		<content:encoded><![CDATA[<p>Check out the &#8216;controllerAnnotationStaticRules&#8217; discussion in the annotation section of <a href="http://grails.org/AcegiSecurity+Plugin+-+Securing+URLs" rel="nofollow">http://grails.org/AcegiSecurity+Plugin+-+Securing+URLs</a></p>
<p>This is used to secure URL patterns that can&#8217;t be annotated, i.e. static resources (JavaScript, CSS, etc.) and controllers that you can&#8217;t edit for whatever reason:</p>
<p>controllerAnnotationStaticRules = [<br />
   '/blurb/**': ['ROLE_ADMIN'],<br />
   &#8216;/setting/**&#8217;: ['ROLE_ADMIN']<br />
]</p>
<p>This has the advantage over the filter approach of being fully integrated into the plugin and Spring Security, in that when navigating to a secured controller the requested URL will be remembered, and after a successful login you&#8217;ll be redirected to that URL.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

