As I was testing the cause can be in the IniConfiguration class.

method createSecurityManagerForSection - line 184

It creates the default securityManager instance and puts into default under
'securityManager' and 'sm'.
As the configuration is read - I have only 'securityManager' defined. So
only that map entry is updated.
The 'sm' stays the default.

In the iterator where it pulls the realm factories it first pulls
'securityManager' - the overridden one - then 'sm' - so we are back to the
default settings.

If I change my ini - to have 'sm' insteadof 'securityManager' - all is fine.
But probably that is not what was intended.

Perhaps 'sm' should be put into the map after the iteration?
Jira?


Les Hazlewood-2 wrote:
> 
> I'm confused.  Your log output below does indeed show the
> AtLeastOneSuccessfulModularAuthenticationStrategy being injected. :/
> 
> On Thu, Feb 5, 2009 at 4:48 PM, Csaba Nemeth <[email protected]>
> wrote:
> 
>>
>> using the following configuration in web.xml inline ini, I cannot get
>> AtLeastOneSuccessful to work.
>> Debugging the application always shows the use of AllSuccessful
>>
>> Is this ini configuration wrong?
>>
>>
>> [main]
>>
>> securityManager = org.jsecurity.web.DefaultWebSecurityManager
>> securityManager.sessionMode = http
>>
>> cacheManager = org.jsecurity.cache.ehcache.EhCacheManager
>> securityManager.cacheManager = $cacheManager
>>
>> mra = org.jsecurity.authc.pam.ModularRealmAuthenticator
>> mrstrat =
>> org.jsecurity.authc.pam.AtLeastOneSuccessfulModularAuthenticationStrategy
>> mra.modularAuthenticationStrategy = $mrstrat
>> securityManager.authenticator = $mra
>>
>>
>> Log shows:
>>
>> DEBUG [org.jsecurity.config.ReflectionBuilder]: Encountered object
>> reference
>> [$mrstrat].  Looking up object with id [mrstrat]
>> TRACE [org.jsecurity.config.ReflectionBuilder]: Applying property
>> [modularAuthenticationStrategy] value
>>
>> [org.jsecurity.authc.pam.atleastonesuccessfulmodularauthenticationstrat...@a87e7b
>> ]
>> on object of type [org.jsecurity.authc.pam.ModularRealmAuthenticator]
>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/ModularAuthenticationStrategy-configuration-in-ini-tp2277507p2277507.html
>> Sent from the JSecurity User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/ModularAuthenticationStrategy-configuration-in-ini-tp2277507p2284638.html
Sent from the JSecurity User mailing list archive at Nabble.com.

Reply via email to