How to authenticate client application for trust of messages sent from it

后端 未结 3 373
忘了有多久
忘了有多久 2020-12-10 22:03

The basic question
How do I know that it is my publicly accessible (client) application that is sending my service messages? How do I know that it is j

相关标签:
3条回答
  • 2020-12-10 22:19

    Impossible.

    You can authenticate users, but not the application.

    Let's say you decide to digitally sign the application. This signature is then read at runtime by your client application checking its own executable binaries against this signature. There is nothing that prevents the adversary from simply removing this check from your application.

    Even if you make it close to impossible to reverse engineer your application, the adversary could always look at the communication channel and write an imposter that looks indistinguishable from your client to your server.

    The only thing you can do is validate the actions on the server against a user identity.

    0 讨论(0)
  • 2020-12-10 22:35

    Presumably, your server is creating the web page that the Silverlight application sits in. You could create a short-lived temporary "key" that only that web page contains. When the Silverlight app starts up, it reads this key and uses it. Because the server itself has a constantly changing, very short list of allowed keys, you can be more sure that only your app is accessing your services.

    0 讨论(0)
  • 2020-12-10 22:36

    The best advice for you in this matter is to hire a security expert to help you. This is not a unique or unusual problem -- consider any game (like WoW for example) that is attempting to determine if it is speaking to a true client or a fraudulent client. Even with a massive amount of effort (look up Blizzard Warden, I'm not going to link it here), they still have issues. The problem boils down to exactly how much time and effort your attacker is going to invest in thwarting your attempts to make thing hard on him. Just be sure to validate everything on the server-side. :)

    0 讨论(0)
提交回复
热议问题