0

Since one has to provide the C++ code with the SQL-database information such as the username and password before one can insert information to the database, I want to know how one can do so in a way the application user can not reverse-engineer it and get my database credentials.

In my specific case I want to make an application that asks the user for feedback. The user can provide 1 to 5 stars, aswell as a comment. I want to be able to store this feedback in a SQL-database ... ... how can I do this safely with C++ ?

Jonas
  • 1
  • 2
  • Why do you want to protect the credentials? Are you distributing the app? If that's the case, the distributed app should NOT connect to the database, but to a server (probably a server API) that connects to the database. – The Impaler Feb 10 '20 at 20:54
  • Correct, I want to distribute the application. Which server API would you suggest is able to handle this? – Jonas Feb 10 '20 at 20:57
  • Can you expose a REST API on the server? The app can connect to it, and submit the data (including the user credentials). The server API will receive the data and credentials, will validate them, and will perform the database change. They key missing point in your design are the "user credentials". – The Impaler Feb 10 '20 at 21:05

0 Answers0