-
Notifications
You must be signed in to change notification settings - Fork 1
IAB: Public/private keys for app should be distributed together with app #8
Comments
I propose we use an external service to retrieve the public key for a certain app store. It can be just a simple text file in json format that holds information of how to retrieve the public key from each store: Signed with a master private key that perhaps one person at Yandex and one backup person at another party (like Appland) has access to. This key is not distributed and must not be compromised. If so, an SDK update is needed. To identify each store (name above) it is possible to use the method getStoreName() that is a part of SDK. Advantages:
The main problem with distributed the public/private keys together with the app is if the private key is compromised in any store the developers of the app must release a new version of the app with a new public key and add that to all stores. This problem does not exist in this proposal for two reasons:
Example of a stores.json signed with the master private key:
|
Or better:
If the key is compromised, the store generates a new key pair and the public key will be signed by the OpenIAB master private key and added to the list. |
It should work. Only issue I see here is need to change developer's habit. Stores provide publicKey in developer console. It's typical to take publicKey and put in code side by side with Google Play publicKey. Some developers don't even put publicKey in Android code and keep everything on backend. With 3rd party keystore and auto-loading of publickKeys developer lose control on publicKey |
Do you have another solution where the developer does not need to change habit and still be able to compile once? |
Another suggestion: Process purchase in Distributor store, but sign receipts on Source store by server-to-server call. Source store doesn't need to share private key. Distributor and Source stores both have to maintain highload backends and have to communicate to each other to share purchases and other data. Source backend is responsible for keep private key not compromised. Source and Distributor stores can agree on any security level of connection between each other. And if private key is compromised Source store is responsible to notify developer and ask him to submit another build as it happens right now |
Or generate and keep private/public keys on 3rd party service and sign receipt there, but such service should be independent and technically reliable. But I'm not sure onepf.org could bring good enough backend soon |
I think Henlew suggestion is best here, True as your say it will need to be a change in the developers habits. Else I think use of a global key-server that store all keys and handle sign of punchers is the second best as this will remove complexity for the appstore. As an appstore can have open IAB apps from more then 1 source and in this case need to hold track of witch store this apps is from and maby also need to implement some different authentication methods. |
Perhaps we can just add both keys together with the list of products, in AppDF or outside. |
Then collaborating app stores can just send the apps to each other using AppDF and OpenAEP. |
It looks like just sharing keys is only suitable option for now. I suggest to share public/private keys by additional server-2-server request. Last part is about OpenIAB: Thoughts? |
Yes, This is a very hard problem without a simple solution, and as point out, for now each store must have a public/private key to be enable to process download. I think we for now want to skip the parts a user manual will export/import public/private keys between stores. As your say, for get it work (correct me if I misunderstand your) the flow will be as follow:
As also point out for get it work, we must change the Open IAB Java Lib parts to support a "Appstore" also can work as behalf of for one or more Appstores. |
Hi! |
Morozstepan, in this case my case above will have change in step nr 1 that Appland do not get public/private key from Yandex. Example to protocol:
Obvious is also some user permissions can be add. |
Stepan: There will be lots of singing requests going between our servers, e g when an app may download its purchase history every time it starts up. For every item, a signing request will need to be exchanged between our servers. This will be a lot of communication and of course the latency will rise for the end users. I think the exchange of the keys is the only plausible solution. |
If distributorstore doesn't use the same key as sourcestore for signing receipts, OpenIAB will fail reciept verification
The text was updated successfully, but these errors were encountered: