Use the existing EntityAttributesPredicate class and wire it in as a custom object to run where you need to evaluate the rule in your script. See [1], RelyingPartiesByTag example for how to adapt it into a PRC-based predicate. -- Scott [1] https://wiki.shibboleth.net/confluence/display/IDP4/ActivationConditions