android - Authenticating mobile device -
i'm developing client-server application, client applications run on mobile devices (android, ios) , communicate server via http protocol. mobile applications available free @ market , multiple users using same application instance on same device.
i need authenticate each request server , i need authenticate device, not user , practically in possession of device.
i've worked arround solution:
after installing application:
let's presume done on secure network:
- an administrator (not regular user) runs application on given device , uses app's authentication form once (filling login , password).
- server authenticates administrator , sends secret device key , "public" device id specific device.
- server stores device key , device id.
- device stores device key in secure storage , device id wherever.
now device has own "credentials".
with each client request:
- client requests request key. request contains device id.
- server genenerates request key, stores along device id , sends client.
- client sends request data device id , hash of (the data + request key + device key) , signs request.
- server checks hash. server invalidates request key.
my questions:
presuming secure storage exists: how secure approach be?
is there secure storage nobody (but application) can read in ios , android? provide links study (especially android). depend on rooting device?
some notes:
i believe request key, client needs prove knowledge of secret device key (without request key hacker send again intercepted data). since device key sent on secure network, can not intercepted , since stored in secure storage can not stolen device.
however expect there no 100% secure storage (minimally on android) , if device rooted secret device key can stolen. storing encrypted makes harder hacker - need decompile client application , find how decrypt it.
edit: little change in suggested approach (there security gap), added notes , other minor details.
http://developer.android.com/reference/android/accounts/accountmanager.html think know this. keytool , self signed certificates? didn't much.
Comments
Post a Comment