IBM Security Verify

 View Only
  • 1.  Access policy show error

    Posted Thu September 10, 2020 02:12 AM
    Hello All

    I followed the https://www.ibm.com/support/knowledgecenter/SSPREK_9.0.7/com.ibm.isam.doc/config/concept/access_policies_SAML_protocol_context.html, where policy says if partner id is not so and so then deny the SAML access.

    Snippet mentioned below: 
    importClass(Packages.com.ibm.security.access.policy.decision.Decision);
    importClass(Packages.com.ibm.security.access.policy.decision.HtmlPageDenyDecisionHandler);

    var protocolContext = context.getProtocolContext();

    if (protocolContext.getPartnerName() != "SP Company"){
    var decision = Decision.allow();
    context.setDecision(decision);
    }
    else{
    var handler = new HtmlPageDenyDecisionHandler();
    handler.setMacro("@MESSAGE@", "Sorry "+protocolContext.getPartnerName()+ " is not allowed
    to run a successful Single Sign on flow");
    var decision = Decision.deny(handler);
    context.setDecision(decision);
    }

    I am getting below error:

    System Error

    FBTRBA451E The JavaScript access policy that you submitted is not valid. The JavaScript validator reported a syntax error at line 12 and column 96 with the message: unterminated string literal.

    Please advise if you can help me



    ------------------------------
    Anant Aggarwal
    ------------------------------


  • 2.  RE: Access policy show error

    Posted Thu September 10, 2020 03:24 AM
    Hey 
    It is resolved..
    There is large space in 
    handler.setMacro("@MESSAGE@", "Sorry "+protocolContext.getPartnerName()+ " is not allowed
    to run a successful Single Sign on flow");

    ------------------------------
    Anant Aggarwal
    ------------------------------