Class FMActionMapper

  • All Implemented Interfaces:
    ActionMapper

    public class FMActionMapper
    extends Object
    implements ActionMapper
    This class implements ActionMapper to map between XACML context action and FM native action. This mapper would recognise only the following XACML defined attributeId
     urn:oasis:names:tc:xacml:1.0:action:action-id
     
    This attribute would be mapped to an action name in OpenAM Policy. This mapper requires that the dataType of the attribute is
     http://www.w3.org/2001/XMLSchema#string
     
    • Constructor Detail

      • FMActionMapper

        public FMActionMapper()
    • 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:
        initialize in interface ActionMapper
        Parameters:
        pdpEntityId - EntityID of PDP
        pepEntityId - EntityID of PEP
        properties - configuration properties
        Throws:
        XACMLException - if can not initialize
      • mapToNativeAction

        public String mapToNativeAction​(Action xacmlContextAction,
                                        String serviceName)
                                 throws XACMLException
        Returns native action name
        Specified by:
        mapToNativeAction in interface ActionMapper
        Parameters:
        xacmlContextAction - XACML context Action
        serviceName - native service name the requested resource belongs to
        Returns:
        native action name
        Throws:
        XACMLException - if can not map to native action name
      • mapToXACMLAction

        public Action mapToXACMLAction​(String nativeActionName,
                                       String serviceName)
                                throws XACMLException
        Returns XACML context Action
        Specified by:
        mapToXACMLAction in interface ActionMapper
        Parameters:
        nativeActionName - native action name
        serviceName - native service name the requested resource belongs to
        Returns:
        XACML context Action
        Throws:
        XACMLException - if can not map to XACML context Action
      • mapToXACMLActionEffect

        public String mapToXACMLActionEffect​(String nativeActionEffect,
                                             String serviceName)
                                      throws XACMLException
        Returns XACML context decision effect
        Specified by:
        mapToXACMLActionEffect in interface ActionMapper
        Parameters:
        nativeActionEffect - native action effect
        serviceName - native service name the requested resource belongs to
        Throws:
        XACMLException - if can not map to XACML context Action