Class FMSubjectMapper

  • All Implemented Interfaces:
    SubjectMapper

    public class FMSubjectMapper
    extends Object
    implements SubjectMapper
    This class implements SubjectMapper to map between XACML context Subject and native subject This mapper recognises only the following XACML specification defined attributeId
     urn:oasis:names:tc:xacml:1.0:subject:subject-id
     
    Only following dataTypes would be understood for subject-id
     urn:oasis:names:tc:xacml:1.0:data-type:x500Name
     urn:sun:names:xacml:2.0:data-type:opensso-session-id
     urn:sun:names:xacml:2.0:data-type:openfm-sp-nameid
     
    Only following value would be accepted for subject-category attribute of Subject
     urn:oasis:names:tc:xacml:1.0:subject-category:access-subject
     
    If the attribute or the value is not specified in the request, it would default to this value. The Subject would map to null if a different value has been specified in error condition.
    • Constructor Detail

      • FMSubjectMapper

        public FMSubjectMapper()
    • 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 SubjectMapper
        Parameters:
        pdpEntityId - EntityID of PDP
        pepEntityId - EntityID of PEP
        properties - configuration properties
        Throws:
        XACMLException - if can not initialize
      • mapToNativeSubject

        public Object mapToNativeSubject​(List xacmlContextSubjects)
                                  throws XACMLException
        Returns native subject, OpenAM SSOToken
        Specified by:
        mapToNativeSubject in interface SubjectMapper
        Parameters:
        xacmlContextSubjects - XACML context Subject(s) from the xacml-context:Request
        Returns:
        native subject, OpenAM SSOToken, returns null if Subject did not match
        Throws:
        XACMLException - if can not map to native subject