IBM Security Verify

 View Only
  • 1.  ISAM - Not able to read Requests data in infoMap

    Posted Tue November 17, 2020 08:40 AM
    Hello Team,

    I'm creating infoMap to createUser. but facing an issue i.e, not able to read data from the incoming request.

    infoMap code for reference:

    importPackage(Packages.com.ibm.security.access.scimclient);
    importClass(Packages.com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils);

    var userid = context.get(Scope.REQUEST, "urn:ibm:security:asf:request:parameter", "userid");
    var firstName = context.get(Scope.REQUEST, "urn:ibm:security:asf:request:parameter", "firstName");
    var lastName = context.get(Scope.REQUEST, "urn:ibm:security:asf:request:parameter", "lastName");

    but the values of all variables are null.

    sample request data:

    headers: { "Content-Type":"application/json", "Accept":"application/json" }
    request body:
    {
    "userid":"demo",
    "firstName":"demo",
    "lastName":"demo",
    "operation":"verify"
    }

    can anyone help me with the same?

    ------------------------------
    Mukesh
    ------------------------------


  • 2.  RE: ISAM - Not able to read Requests data in infoMap

    Posted Tue November 17, 2020 08:51 AM
    Hi Mukesh,

    Just to confirm, are you accessing the Authentication Policy via the .../sps/apiauthsvc endpoint?  I think you'd need to use this endpoint (and NOT .../sps/authsvc) to be trigger the decoding of JSON body.

    Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 3.  RE: ISAM - Not able to read Requests data in infoMap

    Posted Tue November 17, 2020 08:59 AM
    Hi Jon,

    I'm using the below URL to initiate the execution of the policy

    https://<hostname>/mga/sps/apiauthsvc?PolicyId=urn:ibm:security:authentication:asf:createuser



    ------------------------------
    Mukesh
    ------------------------------



  • 4.  RE: ISAM - Not able to read Requests data in infoMap

    Posted Tue November 17, 2020 12:46 PM

    Hi Mukesh,

    I'm not 100% sure on this but I think that the body of your POST to .../sps/apiauthsvc will need to be a raw JSON body containing something of format:

    {
    "userid":"demo",
    "firstName":"demo",
    "lastName":"demo",
    "operation":"verify"
    }

    Is that what you're sending?   I wasn't sure based on the request you showed above.

    Jon.



    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------