Layer7 API Management

 View Only
  • 1.  CA API Print the base64decoded value in logs

    Posted Jun 20, 2018 06:00 AM

    Our Customer is expecting a soap msg which contain password created with combination of nonce,createddate and fixed password string. it contain various steps involving base64encode/decode, sha1 . 

    They are comparing the output by applying the same value in python script , but our output generated via ca api is not matching with python output 

     

    Our requirement to compare the value at each step in caapi with python. but after base64decode of nonce value we are not getting readable text in logs to compare the value with python output. caapi output in logs in coming as rectangles. so is there a way to print the base64encode value in log

     

    python code

    base64_nonce1 = "1P8awx9YBMRV9Q0gOvoEjQ=="

    print(b64decode(base64_nonce1))

     

    output->\xd4\xff\x1a\xc3\x1fX\x04\xc4U\xf5\r :\xfa\x04\x8d' 

     

    Steps in caapi

    1) Extracted Nonce value from the XML
    2) Applied the Base64 Decode on Nonce and storing the result in cv_ExtractNonceDecoded

    3) Log the variable cv_ExtractNonceDecoded

     

    So how do we compare output from both?



  • 2.  Re: CA API Print the base64decoded value in logs

    Broadcom Employee
    Posted Jun 20, 2018 11:17 AM

    In your Decode Data assertion what is the Dat type you specified for the output Target? 

     

    string or message if all you need if a string choose string if using message you need to reference as ${cv_ExtractNonceDecoded.mainpart}