Layer7 API Management

 View Only
  • 1.  Converting siteminder response string into a json

    Posted Jan 07, 2020 02:10 PM
    Hi All,
    We are trying to convert a siteminder response (siteminder.smcontext.attributes) into a proper json.
    As the string like this will not be a proper way to send it to consumer of our API.

    (ATTR_AUTH_DIR_NAME,ud_dnp_ee_login_gotham), (ATTR_AUTH_DIR_NAMESPACE,ODBC:), (ATTR_AUTH_DIR_OID,0e-424e7d65-4577-1001-a826-843bdb4e0000), (ATTR_AUTH_DIR_SERVER,ds_dnpgt_any_webservices_test), (ATTR_CLIENTIP,), (ATTR_SESSIONDRIFT,-1), (ATTR_USERDN,thelma1@ee.com), (ATTR_USERNAME,thelma1@ee.com), (ATTR_USERUNIVERSALID,2002070335), (SM_EECONKID,c990722847bf46cf8f854dde928ee2), (SM_Email_Id,Gisselle_Stroman16@hotmail.com), (SM_FName,Maia), (SM_LName,Monahan), (SM_ORGANISATION_NAME,EEConsumer), (ATTR_SESSIONID,1B9FKpjuBRX1EMGx4ppyW7r6740=), (ATTR_SESSIONSPEC,fqf4rW8twco/xV5cz0v9QriuZQivkMTO3dR10kAnV0gVofazivQdqexdXMx0EaK3E8hatFqXJl99kBiY0FttQ1MWdbsBeEGcBVV0gqTn+V5Px1IqXEmXJmG60WhfrkNvSYCJoE3kE9/7BA0ukeh8D6omIZGEl3nI8tgWr2rNcCCADufM3V/XDqCbS//c99gJk5Aw0VBBM1wFcbDM5g99gYXooDZ5Wm5YPrDEjAoca/zyNMlhMD48f6+SLK/fe4KRFt3YCavNMKOSFXProWVMcZn6qaRvFf3LA4BEzmP71JsqEK8DuAbXRkWYvC3a0kUVpRdnsjkh3yhKnh5x8F9VNucl0ZGWndOzJvAH7Al8LFxhUaUP33C7LQ1ah/7TZJl3N21EnAUTk5cwbJwLez2GTft0u/Sgw+6W6XHqJ3/zq2k=), (ATTR_STARTSESSIONTIME,1578050015), (ATTR_LASTSESSIONTIME,1578050015), (ATTR_MAXSESSIONTIMEOUT,600), (ATTR_IDLESESSIONTIMEOUT,60), (ATTR_CURRENTSERVERTIME,1578050015)

    Is there any way that we can get these attributes in a proper json format?

    Please help:)



  • 2.  RE: Converting siteminder response string into a json
    Best Answer

    Broadcom Employee
    Posted Jan 07, 2020 03:35 PM
    Hi,

    There is no out of the box way to accomplish this.  You can probably look to accomplish this via policy with regular expression manipulations.

    I believe there was a similar communities post not that long ago with a similar request which you can take a look at and use as a reference.

    https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?GroupId=1255&MessageKey=417be054-5933-4f1f-b237-b3bca4570ae0&CommunityKey=0f580f5f-30a4-41de-a75c-e5f433325a18&tab=digestviewer&ReturnUrl=%2fenterprisesoftware%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3d0f580f5f-30a4-41de-a75c-e5f433325a18%26tab%3ddigestviewer


    Hopefully that will enable you to move forward.


    Daren