Encrypt/decrypt support in Confluence for sensitive information like passwords

Need an option to store add-on specific encryption key or any out-of-the-box option to encrypt/decrypt values.

  1. I have a form in Confluence page where I want to use password field.
  2. I want to encrypt the password value and send it to Server.
  3. Is there any option in Confluence API to encrypt and decrypt values?
  4. If not and if I want to encrypt using Java code, where should I store the key? What is the best place to store encryption key for specific add-on?

Please let me know if you have any solution for this.

1 Like

I am not aware of any built-in methods, but you can use for example bcrypt to do that. As for key storing, you can use a keystore e.g. http://tutorials.jenkov.com/java-cryptography/keystore.html just be sure it wont be publicly accessible

Thanks @Panos for your reply. I am just looking for out of the box solution for this as it will be tedious process to maintain keys ourself. In my requirement, I have to encrypt the value in Javascript using public key and decrypt the same in Java using Private key, storing them in Java keystore might not be suitable here.