如何从Karate日志中隐藏密码和秘钥。

huangapple go评论71阅读模式
英文:

How to hide the password and secret key from karate log

问题

只是检查是否有办法隐藏Karate日志中的用户名、密码和密钥,我正在使用它来生成令牌。如果已经有答案,我道歉。

英文:

Just checking if there is any way we can hide the username password and secret key from karate log, which I am using to generate the bearer token. Apology if this has already been answered如何从Karate日志中隐藏密码和秘钥。

答案1

得分: 1

https://github.com/karatelabs/karate#log-masking
您可以使用Java代码来遮蔽特定信息。请参考上述链接以获取示例。

https://github.com/karatelabs/karate/issues/699 这也应该很有用。

您还可以通过更改日志级别或完全禁用它来调整您的logback.xml文件。上述问题中有相关信息。

希望这对您有帮助。

英文:

https://github.com/karatelabs/karate#log-masking
You can use java code to mask the specific info. Refer above link for example.

https://github.com/karatelabs/karate/issues/699 This should be useful as well.

You can tweak your logback.xml file as well by changing the log level or completely disabling it. Above issue has info around that.

Hope this is helpful.

huangapple
  • 本文由 发表于 2023年8月4日 21:44:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76836521.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定