Package com.sun.identity.xacml.plugins
Class FMResourceMapper
- java.lang.Object
-
- com.sun.identity.xacml.plugins.FMResourceMapper
-
- All Implemented Interfaces:
ResourceMapper
public class FMResourceMapper extends Object implements ResourceMapper
This class implements ResourceMapper to map between XACML context Resource and FM native resource This mapper would recognise only the following XACML definedattributeIdurn:oasis:names:tc:xacml:1.0:resource:resource-id
The attribtue is required to have dataTypehttp://www.w3.org/2001/XMLSchema#string
Attribute resource-id is mapped to OpenAM Policy resource name. This mapper also recognises only additional attributeIdurn:opensso:names:xacml:2.0:resource:target-service
The attribtue is required to have dataTypehttp://www.w3.org/2001/XMLSchema#string
Attribute target-service is mapped to OpenAM Policy service type name If the attribute is not specified in the request a default value ofiPlanetAMWebAgentServicewould be used. This is the service name for policies that protect URLs.
-
-
Constructor Summary
Constructors Constructor Description FMResourceMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(String pdpEntityId, String pepEntityId, Map properties)Initializes the mapper implementation.String[]mapToNativeResource(Resource xacmlContextResource)Returns native resource and service nameResourcemapToXACMLResoure(String resourceName, String serviceName)Returns XACML context Resource
-
-
-
Method Detail
-
initialize
public void initialize(String pdpEntityId, String pepEntityId, Map properties) throws XACMLException
Initializes the mapper implementation. This would be called immediately after constructing an instance of the implementation.- Specified by:
initializein interfaceResourceMapper- Parameters:
pdpEntityId- EntityID of PDPpepEntityId- EntityID of PEPproperties- configuration properties- Throws:
XACMLException- if can not initialize
-
mapToNativeResource
public String[] mapToNativeResource(Resource xacmlContextResource) throws XACMLException
Returns native resource and service name- Specified by:
mapToNativeResourcein interfaceResourceMapper- Parameters:
xacmlContextResource- XACML context Resource- Returns:
- native resource and service name. Returned object is an array of String objects. First element would be resource name. Second element would be service name.
- Throws:
XACMLException- if can not map to native resource and service name
-
mapToXACMLResoure
public Resource mapToXACMLResoure(String resourceName, String serviceName) throws XACMLException
Returns XACML context Resource- Specified by:
mapToXACMLResourein interfaceResourceMapper- Parameters:
resourceName- native resource nameserviceName- native service name the requested resource belongs to- Returns:
- XACML context Resource
- Throws:
XACMLException- if can not map to XACML context Resource
-
-