Java Connection MySql and FTP

-3

My question is not about how to make a connection to ftp or mysql, as I'm not getting it.

I make the connection using the parameters like host, port, user and password. My source code stores this information. Thinking about the security issue, how is a connection implemented without this information being in the source code? I thought of creating a table in a database with the user and password and my app query this table, but in the connection I use the user and password of that database as a parameter.

    
asked by anonymous 25.07.2016 / 19:07

1 answer

0

I do not know if it's the best way, but one that I've used and worked: - for each user of the system, create a user in the database, then the user will login to the system with a login of the database, this way, there would be no information about user and password stored in the system codes. p>

Bonus: In addition to connection data that does not stay in the system codes, you can also set permissions on the database per user, thus generating extra security (not excluding permissions managed by the system).

I hope I have helped!

    
26.07.2016 / 21:36