<?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: Custom Authentication Schemes with Grails and JSecurity</title>
	<atom:link href="http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/</link>
	<description>Ninja Coding Monkey goes Canada</description>
	<lastBuildDate>Fri, 19 Feb 2010 10:58:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alex</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-12</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 14 Aug 2008 14:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-12</guid>
		<description>Your blog is interesting! 
 
Keep up the good work!</description>
		<content:encoded><![CDATA[<p>Your blog is interesting! </p>
<p>Keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ламинат</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-11</link>
		<dc:creator>ламинат</dc:creator>
		<pubDate>Wed, 13 Aug 2008 17:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-11</guid>
		<description>asc Een plaatje zegt alles, toch ? cjb  Het volledige rapport is hier te vinden. Lees natuurlijk o  de blogposting. t u 
Thanks for interesting post! fat 
[url=http://skuper.ru]ламинат купить[/url] 7w</description>
		<content:encoded><![CDATA[<p>asc Een plaatje zegt alles, toch ? cjb  Het volledige rapport is hier te vinden. Lees natuurlijk o  de blogposting. t u<br />
Thanks for interesting post! fat<br />
[url=http://skuper.ru]ламинат купить[/url] 7w</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les Hazlewood</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-9</link>
		<dc:creator>Les Hazlewood</dc:creator>
		<pubDate>Thu, 07 Aug 2008 13:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-9</guid>
		<description>Hi Kapil,

Good write-up!  Thanks for taking the time to do it.

If you get a chance, please feel free to take what you&#039;ve written and add it to the Grails wiki - it depends on nice folks like you to help make Grails life better for everyone ;) 

Best regards,

Les</description>
		<content:encoded><![CDATA[<p>Hi Kapil,</p>
<p>Good write-up!  Thanks for taking the time to do it.</p>
<p>If you get a chance, please feel free to take what you&#8217;ve written and add it to the Grails wiki &#8211; it depends on nice folks like you to help make Grails life better for everyone <img src='http://www.jakusys.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p>Best regards,</p>
<p>Les</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web 2.0 Announcer</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-8</link>
		<dc:creator>Web 2.0 Announcer</dc:creator>
		<pubDate>Thu, 07 Aug 2008 09:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-8</guid>
		<description>&lt;strong&gt;Custom Authentication Schemes with Grails and JSecurity...&lt;/strong&gt;

[...]In my current software project a requirement is an authentication scheme consisting not of the usual user name an password, but user name, password and a store number. Each user name should be unique in for a store but could occur multiple times f...</description>
		<content:encoded><![CDATA[<p><strong>Custom Authentication Schemes with Grails and JSecurity&#8230;</strong></p>
<p>[...]In my current software project a requirement is an authentication scheme consisting not of the usual user name an password, but user name, password and a store number. Each user name should be unique in for a store but could occur multiple times f&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kapil</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-7</link>
		<dc:creator>Kapil</dc:creator>
		<pubDate>Wed, 06 Aug 2008 14:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-7</guid>
		<description>Never mind I found out that there is Grails-Plugins project and this is where I would post. Thanks</description>
		<content:encoded><![CDATA[<p>Never mind I found out that there is Grails-Plugins project and this is where I would post. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kapil</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-6</link>
		<dc:creator>Kapil</dc:creator>
		<pubDate>Wed, 06 Aug 2008 14:37:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-6</guid>
		<description>Hi Peter,

I am very new to Grails (3 days) and do not yet know where exactly to submit the issues etc. Will it be http://jira.codehaus.org/browse/GRAILS ? or you have some issue tracker of your own for jsecurity. Pardon my lack of awareness.

Regards
Kapil</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I am very new to Grails (3 days) and do not yet know where exactly to submit the issues etc. Will it be <a href="http://jira.codehaus.org/browse/GRAILS" rel="nofollow">http://jira.codehaus.org/browse/GRAILS</a> ? or you have some issue tracker of your own for jsecurity. Pardon my lack of awareness.</p>
<p>Regards<br />
Kapil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Ledbrook</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-5</link>
		<dc:creator>Peter Ledbrook</dc:creator>
		<pubDate>Wed, 06 Aug 2008 10:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-5</guid>
		<description>Hi,

First, nice post Jakob! Note that you could have the username and store number as separate  principals, or combine the two into a single principal as you have already done. The principal can be any class.

Recently the JSecurity API has changed a fair bit around this area, so there is now a PrincipalCollection class. I think the latest plugin has this since it uses a beta version of 0.9.0. I also need to update the plugin for the 0.9.0 RC1 release.

Kapil, that looks like a bug. If a realm does not support a particular authentication token, it should not be queried during authentication. If you can, please raise an issue and attach an example project.

Cheers,

Peter</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>First, nice post Jakob! Note that you could have the username and store number as separate  principals, or combine the two into a single principal as you have already done. The principal can be any class.</p>
<p>Recently the JSecurity API has changed a fair bit around this area, so there is now a PrincipalCollection class. I think the latest plugin has this since it uses a beta version of 0.9.0. I also need to update the plugin for the 0.9.0 RC1 release.</p>
<p>Kapil, that looks like a bug. If a realm does not support a particular authentication token, it should not be queried during authentication. If you can, please raise an issue and attach an example project.</p>
<p>Cheers,</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jakob.kuelzer</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-4</link>
		<dc:creator>jakob.kuelzer</dc:creator>
		<pubDate>Wed, 06 Aug 2008 08:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-4</guid>
		<description>Hey Kapil,
I think you are right about the token being passed around to all realms; I think they are trying to mimic PAM style authentication. 
I&#039;m not sure about multiple realms, my understanding is that all realms in grails-app/realms get registered at application startup and are queried for authentication tokens. So if you have different AuthenticationTokens, you&#039;ll need different Realms that are responsible for them and perhaps a CredentialsMatcher. 

If i find some time, I&#039;ll write another post about this stuff. 

Cheers,
Jakob</description>
		<content:encoded><![CDATA[<p>Hey Kapil,<br />
I think you are right about the token being passed around to all realms; I think they are trying to mimic PAM style authentication.<br />
I&#8217;m not sure about multiple realms, my understanding is that all realms in grails-app/realms get registered at application startup and are queried for authentication tokens. So if you have different AuthenticationTokens, you&#8217;ll need different Realms that are responsible for them and perhaps a CredentialsMatcher. </p>
<p>If i find some time, I&#8217;ll write another post about this stuff. </p>
<p>Cheers,<br />
Jakob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kapil</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-3</link>
		<dc:creator>Kapil</dc:creator>
		<pubDate>Wed, 06 Aug 2008 08:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-3</guid>
		<description>I got it working. It seems like the default authentication strategy is that the token would be passed to all realms and all should succeed (which means token should be same). 

In the my config I specified 

jsecurity.authentication.strategy = new org.jsecurity.authc.pam.AtLeastOneSuccessfulModularAuthenticationStrategy()

and this made it work. This means that the multiple token types and realms does not work.</description>
		<content:encoded><![CDATA[<p>I got it working. It seems like the default authentication strategy is that the token would be passed to all realms and all should succeed (which means token should be same). </p>
<p>In the my config I specified </p>
<p>jsecurity.authentication.strategy = new org.jsecurity.authc.pam.AtLeastOneSuccessfulModularAuthenticationStrategy()</p>
<p>and this made it work. This means that the multiple token types and realms does not work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kapil</title>
		<link>http://www.jakusys.de/blog/2008/08/custom-authentication-schemes-with-grails-and-jsecurity/comment-page-1/#comment-2</link>
		<dc:creator>Kapil</dc:creator>
		<pubDate>Wed, 06 Aug 2008 07:35:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=118#comment-2</guid>
		<description>Thanks for this tip. I create a custom authentication token and a realm. The configuration I am looking for (and was thinking would work) is that I can have multiple tokens and multiple realms for e.g.

JsecDbRealm has a token UsernameToken
JsecMyRealm has a token MyauthToken

Now in the AuthController, UsernameToken is constructed and passed to the jsecSecurityManager.login() method. I was hoping that only JsecDbRealm will be called but I get an AuthenticationException and do not see code entering neither in JsecDbRealm or JsecMyRealm

Would appreciate if you could guide what I may be doing wrong. In brief I would like to support multiple tokens and multiple relams. One token type for one realm.

Thanks
Kapil</description>
		<content:encoded><![CDATA[<p>Thanks for this tip. I create a custom authentication token and a realm. The configuration I am looking for (and was thinking would work) is that I can have multiple tokens and multiple realms for e.g.</p>
<p>JsecDbRealm has a token UsernameToken<br />
JsecMyRealm has a token MyauthToken</p>
<p>Now in the AuthController, UsernameToken is constructed and passed to the jsecSecurityManager.login() method. I was hoping that only JsecDbRealm will be called but I get an AuthenticationException and do not see code entering neither in JsecDbRealm or JsecMyRealm</p>
<p>Would appreciate if you could guide what I may be doing wrong. In brief I would like to support multiple tokens and multiple relams. One token type for one realm.</p>
<p>Thanks<br />
Kapil</p>
]]></content:encoded>
	</item>
</channel>
</rss>
