Skip to content

feat: mask the payload with sensitive info in console logs #2786

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

Merged
merged 2 commits into from
Jan 29, 2021

Conversation

kobenguyent
Copy link
Collaborator

@kobenguyent kobenguyent commented Jan 28, 2021

Motivation/Description of the PR

  • Sometimes the payload of API tests for POST/PUT contain sensitive info and you don’t want those info are showing in console logs when running tests with --verbose. So taking the advantage of Secret class, now we can mask the payload and you're feeling good to see no sensitive info are showing in console logs.
...
      I send post request "customers/login", *****, {"x-component":"google"}
      › [Request] {"baseURL":"https://thisisatest/customers/login","method":"POST","data":"*****","headers":{"x-component":"google"}}
...

Applicable helpers:

  • REST

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

fix: check if the payload is string
@kobenguyent kobenguyent merged commit 30a7956 into 3.x Jan 29, 2021
@kobenguyent kobenguyent deleted the feat/mask-payload-REST branch May 30, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants