IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Access policy show error

    Posted 09/10/20 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 09/10/20 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
    ------------------------------