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.  We would like to transform any non HTTP 200 status code into JSON.

    Posted 01/19/24 02:01 PM

    We would like to transform any non HTTP 200 status code into JSON. In the format of: "errorReasonCode": "","errorReasonDesc":""}

    Is there any possibility we can do in ISVA?



    ------------------------------
    Venugopal Peram
    ------------------------------


  • 2.  RE: We would like to transform any non HTTP 200 status code into JSON.

    Posted 01/21/24 03:59 PM

    Venuogopal,

     

    Are you talking about changing any non-200 response which is streamed back from a junctioned Web server, or any WebSEAL generated response? 

     

    If you are talking about a WebSEAL generated response, WebSEAL currently supports JSON generated responses.  You just need to create the appropriate template pages (with a .json extension), and then ensure that the HTTP 'accept' header has been set to application/json (see https://www.ibm.com/docs/en/sva/10.0.7?topic=configuration-content-aware-server-responses). 

     

    If you are talking about streamed junction responses you can do this using HTTP transformation rules – although I would recommend using the newer Lua transformation rules instead of the older XSLT format.

     

    I hope that this helps.

     

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">

     

     

     






  • 3.  RE: We would like to transform any non HTTP 200 status code into JSON.

    Posted 01/22/24 10:27 AM

    Hi Scott,

    Thanks for the Info. Yes, I am talking about junctioned Web server. If you are talking about creating JSON pages.

    Also when you say we need to create a JSON page, you means for all error codes we need to create JSON pages under Managment/C pages?

    How can we add  "errorReasonCode": "","errorReasonDesc":""} in to JSON?

    {
        "error_code"    : "%ERROR_CODE%",
        "error_message" : "%ERROR_TEXT%"
    }



    ------------------------------
    Venugopal Peram
    ------------------------------



  • 4.  RE: We would like to transform any non HTTP 200 status code into JSON.

    Posted 01/22/24 03:32 PM

    Venugopal,

     

    You won't need to create custom error pages for every error.  You can just create a 'default.json' page.  The documentation explains how WebSEAL attempts to locate a page to return.

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">