JAVA how to store mysql login details -
environment
i have java
application going need access mysql
database load , save data , load/save cannot occur writing disk, has through database.
i reading jndi
i'm not sure because every example i've seen has been java servlet
, goal use in java
standalone application.
questions
what best way store
mysql
username , password clients can access database still protecting login information program not decompiled , usesmysql
login drop tables?what guys recommend? i'd secure possible , i'm open suggestions.
only handful of statements executed on database , hard coded strings used in prepared statements think secure or no?
but main issue protecting database login information.
you have several options:
- use credentials minimum possible permissions. means user able insert not drop or delete
- separate program , code writes database creating webservice (or other remoting techniques)
- use procedures , functions contact database , grant them user. doing have login database not allowed except calling procedures , functions.
Comments
Post a Comment