Best practice for storing database password

前端 未结 3 1381
小鲜肉
小鲜肉 2021-01-31 11:21

I am developing a custom server application that will access a database. I need to decide where I will store the credentials (and to address) to that server.

A common so

3条回答
  •  灰色年华
    2021-01-31 12:10

    I don't think you're missing something simple. Either the server in question can connect to the database without your help, in which case it has to have the credentials; or it cannot connect without your supplying them. You can take various steps like the ones you've listed to make it harder for a compromised server to reveal the credentials to the database, but at the end of the day, if it has to have those credentials and supply them to the DB server to connect, they'll have to be stored on it somewhere — or at least, it will have to have some means of getting them, and so will be hackable in that sense.

    Your best bet is to focus on finding out about intrusions (compromised servers) as quickly as possible, keeping good off-site, off-line backups for the worst case, putting up lots of barriers to intrusion in the first place, etc.

提交回复
热议问题