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
I am sharing, the way I had solved this.
But, honestly the only thing this did was over complicate simple things. After that, I created several users to the database, with different privileges.
Like
guest can only to SELECTmod can only CREATE, INSERT, UPDATE, DELETEetc and switched the user, whenever authenticated users appeared.
With the combination of users and session, I have been able to escape the threats so far. But ofcourse the code vulnerability have to be tested thoroughly.