incubator-shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Skowronek" <tskowro...@wi.rr.com>
Subject RE: [grails-user] JSecurity Plugin, AbstractLdapRealm and Caching
Date Mon, 13 Oct 2008 20:25:50 GMT
To provide additional information, I have a no-arg constructor in my realm.
After calling super(), I just added a call to init() in it to see if I could
get the additional output you mentioned.  The log output follows.  It looks
like the default cache manager is created after the realm.

Should the security manager initialize the realm or should the realm
initialize itself?


[com.jud.realm.AdamRealm] AdamRealm created
[org.jsecurity.realm.AuthorizingRealm] Initializing authorization cache.
[org.jsecurity.realm.AuthorizingRealm] No cache implementation set.
Checking cacheManager...
[org.jsecurity.realm.AuthorizingRealm] No cache or cacheManager properties
have been set.  Authorization caching is disabled.
[com.jud.realm.AdamRealm] AdamRealm initialized
[com.jud.realm.AdamRealm] Realm Name: com.palmharbor.jud.realm.AdamRealm_0
[org.jsecurity.mgt.CachingSecurityManager] Attempting to initialize default
CacheManager using EhCache...
[org.jsecurity.cache.ehcache.EhCacheManager] cacheManager property not set.
Constructing CacheManager instance... 
[org.jsecurity.io.ResourceUtils] Opening resource from class path
[org/jsecurity/cache/ehcache/ehcache.xml]...
[org.jsecurity.cache.ehcache.EhCacheManager] instantiated Ehcache
CacheManager instance.
[org.jsecurity.cache.ehcache.EhCacheManager] implicit cacheManager created
successfully.
[org.jsecurity.web.DefaultWebSecurityManager] http mode - enabling
ServletContainerSessionManager (Http Sessions)

-----Original Message-----
From: Thomas Skowronek [mailto:tskowronek@wi.rr.com] 
Sent: Monday, October 13, 2008 2:17 PM
To: jsecurity-dev@incubator.apache.org
Cc: user@grails.codehaus.org
Subject: RE: [grails-user] JSecurity Plugin, AbstractLdapRealm and Caching

My apologies for the slow response.  Vacation.

With trace enabled, the only output that I get from AuthorizingRealm is the
following in getAuthorizationInfo().

2008-10-13 13:33:26,896 TRACE [org.jsecurity.realm.AuthorizingRealm]
Retrieving AuthorizationInfo for principals
[org.jsecurity.subject.SimplePrincipalCollection@396e7520]

There is no output from initAuthorizationCache().


Thomas

-----Original Message-----
From: Les Hazlewood [mailto:lhazlewood@apache.org] 
Sent: Tuesday, October 07, 2008 6:08 PM
To: jsecurity-dev@incubator.apache.org
Cc: user@grails.codehaus.org
Subject: Re: [grails-user] JSecurity Plugin, AbstractLdapRealm and Caching

You are indeed correct that it should be caching the AuthorizationInfo
lookup for role/permission checks - at least that is what the code
'says'.

There are a few trace/debug/info log messages in AuthorizingRealm that
are printed when an authorization check occurs, particularly in the
initAuthorizationCache() and getAuthorizationInfo() methods .  Do you
have that output?

- Les



Mime
View raw message