So far you haven't actually done anything with Jaas, so this is sort
of off-topic for the thread. The problem you have is actually due to
your configuration of the InMemoryDaoImpl. If you look at the stack
trace you'll see that the UsernameNotFoundException is being thrown
because "Not granted any authorities". If you look at your
configuration of the InMemoryDaoImpl, you'll see that the user
'jagadeesh' has no roles. Every user must be granted at least one
Authority or role. Even if it's just ROLE_AUTHENTICATED or something
meaningless like that.
Take a look at the contacts sample...
<bean id="inMemoryDaoImpl"
class="net.sf.acegisecurity.providers.dao.memory.InMemoryDaoImpl">
<property name="userMap">
<value>
marissa=koala,ROLE_TELLER,ROLE_SUPERVISOR
dianne=emu,ROLE_TELLER
scott=wombat,ROLE_TELLER
peter=opal,disabled,ROLE_TELLER
</value>
</property>
</bean>
-Ray
On 27 Sep 2005 07:31:02 -0000, jagadish g <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all,
>
> I am working on Authentication with JAAS using Acegisecurity.
>
> I am getting this following error:
> 2005-09-27 12:38:59,281 INFO
> [net.sf.acegisecurity.adapters.jboss.JbossAcegiLoginModule] Successfully
> started JbossSpringLoginModule
> 2005-09-27 12:38:59,281 DEBUG
> [net.sf.acegisecurity.adapters.jboss.JbossAcegiLoginModule] checking identity
> 2005-09-27 12:38:59,281 DEBUG
> [net.sf.acegisecurity.adapters.jboss.JbossAcegiLoginModule] creating
> usernamepassword token
> 2005-09-27 12:38:59,296 DEBUG
> [net.sf.acegisecurity.adapters.jboss.JbossAcegiLoginModule] attempting
> authentication
> 2005-09-27 12:38:59,296 DEBUG
> [net.sf.acegisecurity.providers.ProviderManager] Authentication attempt using
> net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider
> 2005-09-27 12:38:59,296 DEBUG
> [org.springframework.context.support.ClassPathXmlApplicationContext]
> Publishing event in context
> [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=25336204]:
> [EMAIL PROTECTED]: Username: jagadeesh; Password: [PROTECTED];
> Authenticated: false; Details: null; Not granted any authorities]
>
> and my applicationcontext.xml is look like this
>
> <bean id="authenticationManager"
> class="net.sf.acegisecurity.providers.ProviderManager">
> <property name="providers">
> <list>
> <ref local="daoAuthenticationProvider"/>
> </list>
> </property>
> </bean>
>
> <bean id="daoAuthenticationProvider"
> class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
> <property name="authenticationDao" ref="inMemoryDaoImpl"/>
> <!--<property name="authenticationDao" ref="jdbcDaoImpl"/>-->
> </bean>
> <bean id="inMemoryDaoImpl"
> class="net.sf.acegisecurity.providers.dao.memory.InMemoryDaoImpl">
>
> <property name="userMap">
> <value>
> jagadeesh=jagadeesh
> spring=spring
> </value>
> </property>
>
> </bean>
>
> I didnt mention any roles for this..
> Please help to solve this..
>
> thanks,
> jagadeesh.
>
> On Mon, 26 Sep 2005 Ray Krueger wrote :
>
> >The login.config.url proprety was being set by getFile().toString().
> >Definitely a bug, it is now getUrl().toString().
> >
> >Also, a new property called 'useSystemProperty' has been added to the
> >JaasAuthenticationProvider to enable or disable the use of the
> >java.security.auth.login.config system property. The useSystemProperty
> >option is true by default so that the JaasAuthenticationProvider acts
> >as it did before. Set useSystemProperty to false and the
> >JaasAuthenticationProvider will use the login.config.url loop.
> >
> >-Ray
> >
> >
> >
> >
> >
> >On 9/24/05, Ben Alex <[EMAIL PROTECTED]> wrote:
> > > Eric Hedström wrote:
> > >
> > > > So is there ever a reason to set the system property, rather than
> > > > allowing each webapp to add a login.config.url? Am I doing something
> > > > horribly wrong, or shall I open a Jira ticket or two?
> > >
> > > Hi Eric
> > >
> > > Ray wrote the JAAS provider, so he's probably best to answer. Would you
> > > please log a JIRA ticket so we ensure this gets looked at...
> > >
> > > Thanks
> > > Ben
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is sponsored by:
> > > Tame your development challenges with Apache's Geronimo App Server.
> > > Download it for free - -and be entered to win a 42" plasma tv or your
> very
> > > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> > > _______________________________________________
> > > Home: http://acegisecurity.sourceforge.net
> > > Acegisecurity-developer mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
> > >
> >
> >
> >-------------------------------------------------------
> >SF.Net email is sponsored by:
> >Tame your development challenges with Apache's Geronimo App Server.
> >Download it for free - -and be entered to win a 42" plasma tv or your very
> >own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> >_______________________________________________
> >Home: http://acegisecurity.sourceforge.net
> >Acegisecurity-developer mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
>
>
>
>
>
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer