Brief introduction of what I am trying to accomplish. I am attempting to use the Resource Owner Password Credentials Grant. The reasoning being that I do not want any limited experience to the end user for our applications. They must have a full in-app experience without interruption.
My concerns:
Using dynamic registration seems to be worthless. If a public end user can register any user any time they want if they get the username and password, then the registration stopped nothing. The whole point of client registration is so that only that client may have access.
My solution:
1) A resource owner downloads the application
2) The resource owner enters their username and password credentials into the client form
3) The username and password are kept only in memory during the following process and is dropped when the registration is complete
4) The phone application is compiled with a registration identifier. This is used in registration requests as a mechanism to prevent public registrations.
5) Registration is made against an endpoint over SSL passing the registration identifier, resource owner username and password.
6) The client receives a client_id and client_secret. The client_id is the username, and the client_secret is a cryptography random key locked to the username (client_id).
6a) If a client_secret exists for this user, it will be returned, no new key will be generated.
7) Registration is complete, from here on out it is standard resource owner password credentials
Notes
The client_secret will be stored in a cryptography keystore local on the phone. New devices added for that user will have the same.
The whole point of this is to prevent public registrations, such as if someone makes a wanna-be phone app that looks like ours.
Is it even important to prevent public registrations? I am just very weary about supporting dynamic registration, I would prefer a single website where people register for API use out-of-band. But since mobile apps are easily rootable, this is my attempt to close some gaps.
Questions? Comments? All input, good, bad, or neutral are welcome.