Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring extensions for password encryption

Most of our extensions support password encryption. To use this service, please follow these steps exactly as specified.

NOTE | Once done, you will have to uncomment the encryptionKey and encryptedPassword and update them with the ones that you generate in the config.yml file.

When you complete these steps, your extension will be ready for password encryption.


  1. Generate the encrypted password
  2. Configure config.yml with the encrypted password


STEP 1. How do I generate the encrypted password?

In this case, we will take Cassandra Monitoring Extension as an example. 

  1. Navigate to your Machine Agent installation folder, then head to the “monitors” folder.



  1. Now enter your Extension folder, or in our case, “CassandraMonitor” and copy the name of the jar file (here, “cassandra-monitoring-extension.jar”)

  2. Open your terminal and navigate to the CassandraMonitor folder.

    machine Agent_CassandraMonitor-example.png

  3. In the folder within terminal, make sure the jar file is present  (i.e., cassandra-monitoring-extension.jar).

  4. Once you’ve verified all the details, run the following command. This command will give you your encrypted password.

    java -cp "cassandra-monitoring-extension.jar" com.appdynamics.extensions.crypto.Encryptor myKey myPassword

    The “myKey” in the command can be any random key that you'd like to use to encrypt the password. The “myPassword” is the plaintext password that you normally use to log in to your product. This is the password that you are trying to encrypt.

NOTE | If you have special characters in your plaintext password or your encryption key, you need to escape the special characters with a backslash (\) in the above command. 
For example, if the plaintext password is myPa$$word, the encryption command should look like this:
java -cp "cassandra-monitoring-extension.jar" com.appdynamics.extensions.crypto.Encryptor myKey myPa\$\$word

  1. Once you run the command, here is how the encrypted password will be generated:

    The value under “Encrypted String” above corresponds to your encrypted password.

  1. Save the values for your encryptionKey and Encrypted String in a text editor so that you don’t lose them.


STEP 2. Configuring config.yml with the encrypted password:

  1. In the config.yml of the extension, insert the encryptionKey and Encrypted String.

  2. The value forencryptionKey field is the random encryption key that was used in the command. For example, in the example above we used myKey as the encryption key.

The value of encryptedPassword is the result of the above command.


Once you complete all the steps in this article, your extension will be ready to use the newly generated encrypted password.

AppDynamics Team



I see that the tags include 4.3, 4.4 and 4.5. Can anyone confirm if password encryption is compatible with the machine agent?




Hi Todd,

This does work with older versions of the Machine Agent as well.




Hahaha not sure how I missed it - perhaps it wansn't in the particular extension doc before (it is now) but found the clues in the source code of ext :)


So I assume this applies to all "AppDynamics supported" extensions?

Do you have plans to make implementation of encryption mandatory for "vendor supported" as well?

AppDynamics Team (Retired)

Hi Konrad,


As of now, we don't have any plans to enforce encryption. But yes, since it is going to be part of our library, vendors can always use it. 




What do you do with the regular password field (where we provide clear text password)?


Do we comment/remove it from config.yml file or set it to empty/null/""


password: ""




remove it altogether.

AppDynamics Team (Retired)

Hi Manoj,


You can just comment it out if you have the encryptedPassword defined. 



AppDynamics Team

If someone faces the error below when encrypting,

Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder


Please use JRE bundled with the machine agent.


Is there a documented procedure for 

Please use JRE bundled with the machine agent.

AppDynamics Team

No, but it just means instead of using JRE installed on the machine,

~/Desktop/MA/monitors/KafkaMonitor$ java -cp "kafka-monitoring-extension.jar" com.appdynamics.extensions.crypto.Encryptor myKey mypass
Exception in thread "main" java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
 at com.appdynamics.extensions.crypto.Encryptor.encrypt(
 at com.appdynamics.extensions.crypto.Encryptor.main(
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder
 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
 at java.base/java.lang.ClassLoader.loadClass(
 ... 2 more

 using bundled JRE

~/Desktop/MA/monitors/KafkaMonitor$ ../../jre/bin/java -cp "kafka-monitoring-extension.jar" com.appdynamics.extensions.crypto.Encryptor myKey mypass
****************************Encrypted Text**************************


AppDynamics Team (Retired)

Thanks for expanding the conversation, @Barry.Harwood  and @Yusuke.Miyahara! Your contribution makes a difference.

Claudia Landivar

Community Manager & Editor 


If I had multiple encrypted passwords to add, what would the encryption key syntax look like assuming I would need multiple keys in the config file.

AppDynamics Team

Screenshot 2024-04-04 at 11.46.40 AM.png

Hi Jared, 

If you are configuring something like above, extension will use same "encryptionKey" to decrypt the encrypted passwords. So you will have to encrypt all the passwords with same key too.






Thank you Satish, very helpful. My problem is sorted.

Version history
Last update:
‎01-09-2023 09:28 AM
Updated by: