I've got a server that handles requests from a client to a sql database. The server accepts requests and gives responses in json. I have written the code for the server and the client, and everything is working. While this is for an internal tool only, I have concerns that some people may try to bypass the client and send their own json messages to the server to potentially manipulate data on the sql database.
I'm not a security guru, so here's my question. What would be the proper method to go about ensuring that the server only accepts requests from the client I wrote, regardless of the machine or IP it's running on?
My initial thought is that I should be encrypting messages between the server and client, so if someone tries to spoof the connection with an unauthorized client they won't have the proper encryption. I also realize I should put authentication on the server side, but that means passing around credentials so the messages should be encrypted anyway. If there is a more accepted way of doing this, I would love to know. If not, links to tutorials would be appreciated.
As the tags state, this is on linux in c++. While I'm sure there's probably some open source library out there that does exactly what I want in all things, I'm pretty restricted as to what libraries I can actually use.
Thanks!