daust / JasperReportsIntegration

JasperReportsIntegration provides an interface to use the JasperReports reporting engine in an Oracle database application, specifically with Oracle Application Express (Oracle APEX).
BSD 3-Clause "New" or "Revised" License
55 stars 23 forks source link

encrypt database passwords in application.properties file #67

Closed andyxchow closed 3 years ago

andyxchow commented 3 years ago

I was able to following the instruction and bug fix article to encrypt the database passwords in the application.properties file. However, how can I let JasperReportsIntegration know that the passwords are all encrypted. Is there any parameter that I need to create in any configuration file to indicate that the database passwords are all encrypted in the application.properties file?

daust commented 3 years ago

I don't quite understand, there is nothing else to do.

My file looks like this: image

The 1: at the beginning indicates the encryption. The integration should decrypt it and use it. That's it.

Do you get any error message?

andyxchow commented 3 years ago

It finally worked. Somehow I had to run the encryptPasswords.cmd windows utility to encrypt the application.properties file in the server in which Tomcat is running. I tried to run it in my own PC but those encrypted passwords didn't work. Is it because the Java version in my PC is different than the one used by the Tomcat server? Anyway, the encrypted passwords generated in the Tomcat server works. Thanks.

daust commented 3 years ago

Yes. That is true. For security reasons I use the server identity in the encryption algorithm as a salt. Thus it will only work locally on the server.