product = WebSphere Application Server 8.5.5.9 Liberty Profile
有谁知道如何在IBM WebSpere Liberty日志文件中隐藏密码?我想将当前的日志记录详细信息保留在AUDIT级别,但不希望在日志文件中显示密码值。
以下是我在日志文件中看到的内容。
[8/27/16 8:22:04:581 EDT] 00002603 SystemOut O url参数client_id = ro_app1& validator_id = CorpDirectory& username = user_id& password = my_password& grant_type = password
[8/27/16 8:22:05:299 EDT] 00002603 SystemOut O发布参数:client_id = ro_app1& validator_id = CorpDirectory& username = user_id& password = my_password& grant_type = password
my_password - 表示实际的用户密码。
以下是我记录属性的内容:
com.ibm.ws.logging.max.file.size=5
com.ibm.ws.logging.hideMessage=password
com.ibm.ws.logging.max.files=20
com.ibm.ws.logging.console.log.level=AUDIT
com.ibm.ws.logging.message.file.name=loggingMessages.log
提前感谢您提出任何建议。
答案 0 :(得分:3)
com.ibm.ws.logging.hideMessage
属性只能用于隐藏官方IBM消息密钥(例如SRVE0255E
)。这不能用于隐藏日志中的任何字符串,因为这样做会严重影响性能。
此外,这些日志消息来自应用程序代码中的System.out.print语句。如果您不想打印密码,请不要在应用程序代码中打印出整个网址。
此外,在您的日志中显示的密码不是您首先将明文密码作为HTTP GET参数传递的事实
答案 1 :(得分:0)