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

hideHeaders feasibility #209

Open
ASaiAnudeep opened this issue Sep 27, 2022 Discussed in #208 · 2 comments
Open

hideHeaders feasibility #209

ASaiAnudeep opened this issue Sep 27, 2022 Discussed in #208 · 2 comments
Labels
enhancement New feature or request

Comments

@ASaiAnudeep
Copy link
Member

Discussed in #208

Originally posted by samuelvinay91 September 27, 2022
Is there any way we can hide the headers in reporting or as part of logs something similar to RestAssured 'blacklistheaders'

@ASaiAnudeep ASaiAnudeep added the enhancement New feature or request label Sep 27, 2022
@akhil7000
Copy link
Contributor

Thinking of implementing this by:

  1. Adding a variable set - blackListedHeaders in the constructor of logger
  2. Adding a method - addBlackListHeader & removeBlackListHeader isHeaderBlacklisted which would accept a string to add/remove/check blacklisted headers.
  3. sanitizeHeaders - which would check the object if it has headers && if the headers has any of the added blackListedHeaders -> and sanitise the object with [BLACKLISTED] value
  4. use sanitizeHeaders in all the log methods - trace, debug, info, warn, error

@leelaprasadv
Copy link
Member

@akhil7000 thanks for restarting the conversation, we have been thinking about implementing a Redaction logic for some time now.

I had to pause it because of other priorities. We are considering to push the changes with an optimised solution in the next release this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants