I need to protect the server API against usage from any client excepting the app I'm creating.
There are no "users", so I thought I can use SSL with hardcoded login / pass.
After quick investigation I figured out that hardcoding even encrypted login & pass into the app is a bad idea - there is always a way for intruders to analyze the decompiled code and find actual login and pass even from encrypted storage.
Then I started digging in the direction of the authentication with Certificates. It turned out that nowadays standard SSL authentication with certs is not secure, and it's better to use SSL Pinning technique.
SSL Pinning implies attaching a copy of the server's cert to the app bundle, to secure the cert verification step.
But I cannot understand whether the SSL Pinning could be implemented in a reverse way, that is to store the client's cert on the server and perform the cert check on the server side to make sure the connecting client is my app. It looks like the cert attached to the app also could be extracted and used externally to authenticate other clients.