Forum Discussion

Intermountain_H_3's avatar
15 years ago

Redacting / replacing info in HTTP Log

As part of the service testing, we are doing SAML authentication, which requires supplying login credentials. These credentials are written out to the HTTP log and the Soap Response.

I've been able to redact / replace the login credentials in the response by placing the code below into the SubmitListener.afterSubmit event. How can this be done to the HTTP Log? I've poured through the API doc, and have come up empty. (http://www.soapui.org/apidocs/)


if( submit.response == null )
return


def content = submit.response.responseLog

content = content.replaceAll("username", "*******" )
content = content.replaceAll("password", "*******" )

submit.response.responseContent = content
  • Hi!

    Unfortunately I think your only option here is to disable the http-log in the UI by right-clicking it and unchecking the "Enable" option. Should we add a global setting for this?

    regards!

    /Ole
    eviware.com
  • That would be great. While you're at it, can you make it accessible via a Load Script? The SoapUI file will be available to multiple members on the team, and it would be fantastic to be able to turn the logging off via script, so we don't have to worry about every member having the correct settings.

    Once completed, if you could supply the code needed to turn off logging, that would be fantastic.

    Thanks!