Class PersonalProfile


  • public class PersonalProfile
    extends Object
    This class PersonalProfile is an implementation of LibertyDataService. The default implementation of Personal Profile leverages the XPATH technology for the queries. Inorder to make sense for the XPath expressions, the user profile needs to be in XML blob. The current approach is to parse the select expression, build a container level XML blob instead of the entire user profile. A WSC credential may not have enough priveleges to write or read the user profile data since the policy evaluation is driven through Webservices POLICY component rather than through ACI driven. So, currently, we use admin token for both queries and updates, but the authorization check will be done for a WSC credential.
    • Constructor Detail

      • PersonalProfile

        public PersonalProfile()
        Default constructor for personal profile.
    • Method Detail

      • queryData

        public Map queryData​(Object credential,
                             String resourceID,
                             List dstQueryItems,
                             Map interactedData,
                             Document request)
                      throws IDPPException
        Queries for the data for a specific resourceID.
        Parameters:
        credential - credentials of the requesting WSC.
        dstQueryItems - list of DSTQueryItems.
        request - query DOM request.
        interactedData - map for interacted data. This map will have the key as the PP DS attribute, and the value as it's value.
        Returns:
        Map map of processed query items and the correspoding list of results.
        Throws:
        IDPPException
      • modifyData

        public boolean modifyData​(Object credential,
                                  String resourceID,
                                  List dstModifications,
                                  Map interactedData,
                                  Document request)
                           throws IDPPException
        Processes modify request and update new data.
        Parameters:
        credential - credential of a WSC.
        resourceID - resource id string
        dstModifications - list of DSTModification objects.
        interactedData - map for interacted data. This map will have the key as the PP DS attribute, and the value as it's value.
        request - a Document object
        Returns:
        true if successful in modifying the data.
        Throws:
        IDPPException
      • isSelectDataSupported

        public boolean isSelectDataSupported​(String select)
        Checks if the select data is supported by the PP service.
        Parameters:
        select - Select expression.
        Returns:
        true if supported.
      • isResourceIDValid

        public boolean isResourceIDValid​(String resourceID)
        Checks if the resource id is valid.
        Parameters:
        resourceID - resource id.
        Returns:
        true if the resource id is valid.
      • getAuthZAction

        public String getAuthZAction​(Object credential,
                                     String action,
                                     String select,
                                     Map env)
                              throws IDPPException
        Gets Authorization map for the list of select expressions.
        Parameters:
        credential - credential object.
        action - request action query or modify
        select - resource being accessed
        env - Environment map that the policy could use
        Returns:
        Authorization decision action.
        Throws:
        IDPPException
      • getUserDN

        public String getUserDN​(String resourceID)
        Gets the user dn for a specified resource id.
        Parameters:
        resourceID - resource id
        Returns:
        String userDN.