javascript - Ensure data passed to API is from valid mobile application -


i'm building phonegap mobile application in want users able check locations. can users location , post api , of that's working. i'm looking way prevent spoofing call api.

my current thinking have shared private key in mobile app , on server. hash(?) users location key client side, post that, , use same key server side restore data.

it's difficult secure piece of software must run on end users device if have full access device.

usually primary concern security securing end user external threats.

ensure using ssl/https, slow down either type attacker. ensure server wont respond on plain http.

you can harden https implementation keeping hash of certificate , having strategy when changes. eg. if trying mitm on own network view protocol, or rather mundanely if certificate expiring , renewed it.

with channels of communication "secured", , no way prevent attacker full access source code , encryption keys; way left obfustication.

basically, set 1 or 2 layers of protection (depending on how critial is), , build detection mechanism in api endpoint alert hacking attempts.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -