keshav kashyap
keshav kashyap

Reputation: 133

Need to encrypt the password using Jmeter

I am making Db connections in my Jmeter script using "JDBC Connection Configuration"(Using both Oracle and MySQL DB), but the DB Password is Visible in the Jmeter Console and in Log File and this a serious security issue as far as my client is concerned

Is there any way to encrypt the password before if password get logged into the Jmeter console/Logfile ?

enter image description here

Upvotes: 1

Views: 2130

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

Don't keep sensitive information like passwords in the .jmx test scripts, if you need to supply a password for a JDBC Connection - use __P() function like:

${__P(password,)}

Once done you can set the password by passing it via -J command-line argument like:

jmeter -Jpassword=my-secret-password -n -t test.jmx -l result.jtl

In this case you will get only ${__P(password,)} in logs even if you have the most verbose level so it will be more or less secure.

More information: Apache JMeter Properties Customization Guide

Upvotes: 1

Related Questions