Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering sensitive data from request and response XML #664

Closed
ramontayag opened this issue Feb 23, 2015 · 2 comments
Closed

Filtering sensitive data from request and response XML #664

ramontayag opened this issue Feb 23, 2015 · 2 comments

Comments

@ramontayag
Copy link

Currently, you can get the response XML via to_xml and you can get the request XML via Operation#request (#620).

I want to be able to filter the data on these. I was thinking of creating some type of scrubber and saw that Savon already has this ability.

How about optionally scrubbing the output of the request and response like so:

response = savon_client.call(...)
response.to_xml(filter: true)
response.request.to_xml(filter: true) # currently you have to call response.request.body to get the XML body. This feature would add a new method to SOAPRequest called `to_xml`

As you could probably tell, passing filter: true would filter the XMLs returned based on the filters defined.

I can implement this feature.

@tjarratt
Copy link
Contributor

I must apologize for taking so long to respond to your issue, @ramontayag, I honestly didn't mean to wait so long to collect my thoughts here.

Thanks for your interest @ramontayag but I don't believe this functionality belongs in Savon itself. For logging, I can understand that users may want to avoid logging sensitive information (e.g.: usernames and passwords) via Savon, but I don't believe that filtering the actual response is a feature that is desirable here. More often than not, this should belong in your actual application, or some adapter that you wrap around Savon.

Hope this was helpful, and not too harsh or mean.

@ramontayag
Copy link
Author

Not at all. Good thing I asked first. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants