How do I avoid having the database password stored in plaintext in sourcecode?

前端 未结 6 1592
情书的邮戳
情书的邮戳 2021-01-01 12:17

In the web-application I\'m developing I currently use a naive solution when connecting to the database:

Connection c = DriverManager.getConnection(\"url\",          


        
6条回答
  •  隐瞒了意图╮
    2021-01-01 12:27

    I can recommend these techniques for .NET programmers:

    • Encrypt password\connection string in config file
    • Setup trusted connection between client and server (i.e. use windows auth, etc)

    Here is useful articles from CodeProject:

    • Encrypt and Decrypt of ConnectionString in app.config and/or web.config

提交回复
热议问题