PolicyEvaluationException

Hi,

I'm currently working on a project which requires Custom Conditions, which you can plug in, in AM (version 7).

Recently we made a Custom Condition and noticed that it was only consulted one time, at login time. After that, the Policy Decisions were cached. Since the requirement states that the Condition needs to kick in as the user selected another working data set, I've set the 'Subjects Result Time to Live' to '0' (Service Config->Policy Configuration).

After this, everything seemed to works fine, that is, locally. On local pc I have installed an agent which is linked to the AMDomain, no problem.

Now, when I'm testing on a unix domain, with his own agent, connecting to the same AMDomain, same source, same everything, I receive following exception:

com.sun.identity.policy.remote.PolicyEvaluationException: Received expired policy decision from serverfor resourceName=...

at com.sun.identity.policy.client.ResourceResultCache.getPolicyDecision(

ResourceResultCache.java:235)

at com.sun.identity.policy.client.PolicyEvaluator.getPolicyDecision(Poli

cyEvaluator.java:371)

at com.sun.identity.agents.policy.AmWebPolicy.checkPolicyForResource(AmW

ebPolicy.java:98)

at com.sun.identity.agents.filter.URLPolicyTaskHandler.process(URLPolicy

TaskHandler.java:105)

at com.sun.identity.agents.filter.AmFilter.processTaskHandlers(AmFilter.

java:185)

at com.sun.identity.agents.filter.AmFilter.isAccessAllowed(AmFilter.java

:152)

at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBase

Filter.java:38)

....

Normally, if I would consult the PolicyEvaluator within my own code I would catch this exception and somehow try to deal with it. Now it seems that the agent filter itself is throwing this exception, which makes it more complex...

Does anyone have experience with this? I would be very grateful.

Many thanks in advance.

Regards,

Philip

[2064 byte] By [Phil_Nollet] at [2007-11-26 10:30:49]
# 1
One more thing, does anyone know if enabling 'polling' in the AMConfig file could maybe solve this problem?Once again thanks,Philip
Phil_Nollet at 2007-7-7 2:37:42 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2
This may be wide off the mark, but are the clocks on different hosts in sync? Significant time differences across clocks can sometimes give interesting (but weird) results.
ankushkapoor at 2007-7-7 2:37:42 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3

Hi,

the system dates on the various unix domains are in sync. Related to this topic, the AMAgentFilter now throws a "session already invalidated" exception:

ERROR: AmFilter: Error while delegating to inbound handler: J2EE Local Auth Task Handler, access will be denied

java.lang.IllegalStateException: invalidate: Session already invalidated

at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:125 8)

at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFac ade.java:164)

at com.sun.identity.agents.filter.LocalAuthTaskHandler.doLocalAuthWithSessionBindi ng(LocalAuthTaskHandler.java:289)

at com.sun.identity.agents.filter.LocalAuthTaskHandler.authenticate(LocalAuthTaskH andler.java:159)

at com.sun.identity.agents.filter.LocalAuthTaskHandler.process(LocalAuthTaskHandle r.java:106)

at com.sun.identity.agents.filter.AmFilter.processTaskHandlers(AmFilter.java:185)

at com.sun.identity.agents.filter.AmFilter.isAccessAllowed

This does not happen in development. Would it be possible that this is related to using a cluster?

Thx for your advice,

Philip

Phil_Nollet at 2007-7-7 2:37:42 > top of Java-index,Web & Directory Servers,Directory Servers...