<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ron on software &#187; Grails</title>
	<atom:link href="http://rpstechnologies.net/ron/blog/tag/grails/feed/" rel="self" type="application/rss+xml" />
	<link>http://rpstechnologies.net/ron/blog</link>
	<description>Thoughts on software development</description>
	<lastBuildDate>Thu, 23 Jun 2011 23:02:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Grails security</title>
		<link>http://rpstechnologies.net/ron/blog/2009/06/grails-security/</link>
		<comments>http://rpstechnologies.net/ron/blog/2009/06/grails-security/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 02:03:10 +0000</pubDate>
		<dc:creator>ron</dc:creator>
				<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://rpstechnologies.net/ron/blog/2009/06/grails-security/</guid>
		<description><![CDATA[I&#8217;m working an a Grails-based project which requires security, as pretty much every web application does. My high level requirements are: Role-based access control Database-based authentication (passwords stored in database) Simple to use Good documentation Ability to model permissions for &#8230; <a href="http://rpstechnologies.net/ron/blog/2009/06/grails-security/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working an a Grails-based project which requires security, as pretty much every web application does. My high level requirements are:</p>
<ul>
<li>Role-based access control</li>
<li>Database-based authentication (passwords stored in database)</li>
<li>Simple to use</li>
<li>Good documentation</li>
<li>Ability to model permissions for finer granularity authorization than role (nice to have)</li>
<li>Captcha support (nice to have)</li>
<li>OpenID support (nice to have)</li>
<li>Facebook Connect support (nice to have)</li>
</ul>
<p>From browsing the list of Grails plugins, it looks like there are two that fit the bill, each based on well-established Java security frameworks. Here are my notes on each:</p>
<p><strong><a href="http://www.grails.org/plugin/jsecurity">JSecurity plugin</a></strong></p>
<ul>
<li>Based on <a href="http://www.jsecurity.org/">JSecurity</a> framework (now <a href="http://incubator.apache.org/ki/">Apache Ki</a>)</li>
<li>API includes classes for user, roles, and permissions.</li>
<li>Support for role and permission-based authorization, which I prefer to use<a href="http://www.grails.org/JSecurity+Plugin+-+Quick+Start"></a></li>
<li><a href="http://www.grails.org/JSecurity+Plugin+-+Quick+Start">Quick Start Guide</a> has example of users and roles being created</li>
<li>Access control is declaratively configured, pointing to the controller &amp; action</li>
<li>AuthController is responsible for common auth functions (logout, login) &amp; login page-</li>
<li>Different authentication schemes (e.g. LDAP, database based auth) supported via realms</li>
<li>Supports database-based authentication (passwords stored in database)</li>
<li>OpenID support : not directly supported in JSecurity yet, but people have gotten it working at Grails level by integrating with OpenID plugin</li>
<li>Documentation looks good, but not as much available as the Spring Security plugin</li>
</ul>
<p><strong><a href="http://www.grails.org/plugin/acegi">Spring Security plugin</a></strong></p>
<ul>
<li>Based on <a href="http://static.springframework.org/spring-security/site/index.html">Spring Security</a> (Acegi security) framework</li>
<li>Supports database-based authentication (passwords stored in database)</li>
<li>Supports OpenID and Facebook connect for authentication</li>
<li>Also supports LDAP, Kerberos, CAS, NTLM for authentication</li>
<li>Support for role-based authorization</li>
<li>User and Role Groovy classes are generated. These may be customized after generation (e.g. to add attributes).</li>
<li>Generates a simple registration page with password confirmation and CAPTCHA support</li>
<li>Pages and actions security mappings (which pages/actions should be access controlled) can be stored in database, as annotations in the Controller, or using the standard URL string mapping supported by Spring security</li>
<li>Good <a href="http://www.grails.org/AcegiSecurity+Plugin">documentation</a></li>
</ul>
<p>Both plugins look very capable and meet my core requirements. Support for OpenID is a big plus for me so I went with Spring Security. I&#8217;ve been using it for about a week now. I may jot down some notes on it in a future post.</p>
<p>BTW, this to me is one of the huge advantages of dynamic language frameworks on the JVM; the ability to tap into mature, very full-featured existing Java frameworks, libraries, and drivers. This is particularly true for Grails, since it so heavily leverages existing frameworks (e.g. Spring, Hibernate).</p>
]]></content:encoded>
			<wfw:commentRss>http://rpstechnologies.net/ron/blog/2009/06/grails-security/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Idea 8.1 &amp; Grails 1.1</title>
		<link>http://rpstechnologies.net/ron/blog/2009/05/idea-81-grails-11/</link>
		<comments>http://rpstechnologies.net/ron/blog/2009/05/idea-81-grails-11/#comments</comments>
		<pubDate>Fri, 01 May 2009 04:41:13 +0000</pubDate>
		<dc:creator>ron</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://rpstechnologies.net/ron/blog/2009/07/idea-81-grails-11/</guid>
		<description><![CDATA[I&#8217;ve been working with Grails again lately after not using it for a while. Last time I was using Grails was a pre-1.0 release about a year ago. Even then it was an extremely productive framework, but it was rough &#8230; <a href="http://rpstechnologies.net/ron/blog/2009/05/idea-81-grails-11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with Grails again lately after not using it for a while. Last time I was using Grails was a pre-1.0 release about a year ago. Even then it was an extremely productive framework, but it was rough around the edges.</p>
<p>The main obstacle I saw was that exception messages and stack traces were not descriptive of the root problem. It wasn&#8217;t that the error messages were poorly written, but the error that was reported wasn&#8217;t near the root cause of the problem. The reported error was a far-removed side effect of the actual problem. If you had messed up the definition of your GORM domain class, the application may start up fine and complain that some dynamic save method was undefined for the domain class when you tried to use it. You then had to do a good deal of trial and error until you isolated what change caused the problem. Having a robust set of unit tests for your application helped, but it still took a while to diagnose the problem.</p>
<p>I&#8217;ve been using Grails 1.1 betas lately, and it looks like the error reporting has gotten much better. When I&#8217;ve gotten errors, it was usually pretty clear what the cause was.</p>
<p>Officially, IDEA only supports Grails 1.0, but it&#8217;s working fine for me with some tweaks. Here&#8217;s what I did:</p>
<ul>
<li>Created the Grails 1.1 project outside of IDEA, using the grails command (not MVN plugin)</li>
<li>Redefine GROOVY and GRAILS global libraries in IDEA to point to the latest versions of each</li>
<li>Imported the existing Grails project into IDEA</li>
<li>After installing some Grails plugins (specifically, the google-chart plugin), I found that they weren&#8217;t on the classpath and the grails launcher no longer worked. Apparently Grails 1.1 moved where the plugins are stored and IDEA hasn&#8217;t been updated for this yet. To get around it, I added &lt;home dir&gt;/.grails/1.1/projects/&lt;my project&gt; to the module&#8217;s content root for my project, and added the plugin&#8217;s source directory (plugins/google-chart-0.4.8/src/groovy in my case) as a source folder within the added content root.</li>
</ul>
<p>The grails app launcher is working for me, and I&#8217;m not getting the compile problems I was getting before.</p>
]]></content:encoded>
			<wfw:commentRss>http://rpstechnologies.net/ron/blog/2009/05/idea-81-grails-11/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

