Search code examples
jbossredhat

Does Jboss Vault have a java API?


I have a spring application running on Jboss. I have passwords that I dont want to store in the DB. Those passwords are used inside the application code e.g. Email account password to send emails via Java mail API.

I would like to store the passwords in the JBoss Vault. https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/how_to_configure_server_security/securely_storing_credentials#password_vault

My question is does this tool have a java API? Can I store and retrive the password inside my application code?

I know that I can call the vault.bat from my java code, but I was checking for a better idea.


Solution

  • The Vault mechanism

    Hello, so you can use the Vault to encrypt the data that are appear on the configuration files of JBoss. You can use for example to encrypt the DB password that you use on the standalone.xml configuration. It is not an API perse.

    Application Encryption

    That vault mechanism is not appropriate to encrypt application side data, you will need to do this you can follow the answer provided by Johannes Brodwall seems very complete and the complementary answer by user1007231 will help you with the Master password.

    Credential Store

    As the Guide Suggests on 3.1 Credential Store, it is recommended to use a Credential Store.