This is a simple implementation of
PolicyFinderModule
that supports retrieval based on context, and is designed for use with a run-time configuration. Its constructor accepts a
List
of
String
s that represent URLs or files, and these are resolved to policies when the module is initialized. Beyond this, there is no modifying or re-loading the policies represented by this class. This class will optionally wrap multiple applicable policies into a dynamic PolicySet.
Note that this class is designed to complement StaticRefPolicyFinderModule
. It would be easy to support both kinds of policy retrieval in a single class, but the functionality is instead split between two classes. The reason is that when you define a configuration for your PDP, it's easier to specify the two sets of policies by using two different finder modules. Typically, there aren't many policies that exist in both sets, so loading the sets separately isn't a problem. If this is a concern to you, simply create your own class and merge the two existing classes.
This module is provided as an example, but is still fully functional, and should be useful for many simple applications. This is provided in the support
package rather than the core codebase because it implements non-standard behavior.
@since 2.0
@author Seth Proctor