For example, let's say my backend address is api.xyz.com
, and I have a mobile application. This application sends requests to api.xyz.com
. The application employs SSL pinning, where it pins the certificate it easily obtained from api.xyz.com. Is this really secure? If someone notices that my application is making requests to api.xyz.com
, they could obtain the site's certificate just like I did, either through a web browser or via different websites.
What's the magical thing that prevents a malicious actor from obtaining the certificate from api.xyz.com
?
Thanks(@dave_thompson_085, @ThoriumBR) for valuable answers. I needed to add questions based on yours.
My expectation was as follows:
Let's consider that our server (api.xyz.com
) has an API endpoint at api.xyz.com/DoSomethingImportant
, and our mobile application sends requests to this endpoint. The mobile app pins the certificate for security, ensuring that no one can intercept the data exchanged in the requests and responses. As a result, only I can consume the resources behind the DoSomethingImportant
function on our server.
At this point, what is the role of the 'private key'? Do I need to use it within the mobile application?