A: 

I would think that, if the application contains medical records, you would want to have the user authenticate every time they use the application or, at least, have some way of pushing down a disable message that renders the app useless in the case where it is lost or stolen. The 4-6 character password (pin) would also concern me with respect to HIPAA, if it applies.

You might want to treat it as a standard web app from the server perspective and do session-based authentication and access with a session that times out, perhaps after a long period, and re-authentication on timeout.

tvanfosson
Agree. This is why I don't want to do something like just rely on HTTP Auth using that 4-6 digit Pin. I'd like to do something based on that pin + something else which would be saved on the iPhone and not really known to user. I. That something else should be established when the iPhone (or application) is registered to communicate with the service. Then if the device is ever lost, I could simply disable the device by removing it from the configuration on the server.
jr
A: 

You could use SSL with client authentication. If a device gets lost, you can remove the certificate on the server. There are some obstacles though:

  • It is not entirely clear if/how you can do client authenticated SSL on the iPhone Unfortunately, there is not much documentation about it. Have a look at Certificate, Key, and Trust Services Reference
  • You have to create a private key for every device
  • You also have to figure out a secure way to transfer the private key to the device
Daniel Hepper
I thought of this, but kind of ruled it out due to the complexity of managing the client certificates, etc. I think I am going to do some type of user pin + device identifier as a password. The user will need to supply the 'pin' and the phone or client will supply the 'device identifier'. I may do something like sha-1 the device identifier with a separate pre-shared secret so that it is not just the device identifier, but I think this is no better then just a longer password. The problem is I want a short PIN, but want more security then that provides. Security is always about tradeoffs
jr