|
On this page: Required DependenciesThe HERAS-AF XACML Core component needs the following direct dependencies (and their sub-dependencies) to run
Using Maven2 it is very easy to obtain the HERAS-AF dependencies by adding the following repository to your Maven2 pom.xml: Creating a simple PDPFor the creation of a simple PDP the SimplePDPFactory is provided. By calling the Method getSimplePDP() the factory returns a simple PDP instance.
In cases where it is required to use custom implementations of the combining algorithm, policy repository and/or the PIP, different variants of the method getSimplePDP(...) are provided in the SimplePDPFactory. The following code snippet shows how such issues can be solved. Custom InitializersIf it is required to use custom initializers these can be provided to the factory. Deployment of policiesThe following code snippet shows how policies can be deployed on the policy repository. When an ordered combining algorithm is used, the policies can be deployed by additionally specifying their position. The following code snippet shows how this can be done. Undeployment of policiesThe following code snippet shows how policies can be undeployed on the policy repository. Evaluating a requestOn the following code snippet a request is evaluated and the response from the PDP is retrieved. Marshalling policies / requests / responsesA policy can be marshalled to different targets.
The following list describes the possible marshalling targets:
The code snippet below shows how a policy is marshalled to an OutputStream.
The code example below shows how an InputStream is unmarshalled to a RequestCtx. The usage of the ResponseCtxFactory and the PolicyConverter ist equal to RequestCtxFactory. Configuration of Logging MDCMDC (Mapped Diagnostic Context) is an intstrument for distinguishing interleaved log output from different sources. Interleaved log output appears typically in cases where a server handles multiple client requests nearly simultaneous. The following keys are used in the configuration:
The code below shows an example configuration using LogBack: |