Closed bernardoaraujor closed 4 years ago
Description: Alice (device owner) delegates access to Bob for certain amount of IOTA tokens which are transferred from Bob wallet to the device.
Steps:
@vlad-ns + @oopsmonk I have a question:
should Bob transfer tokens to the Device wallet, or to Alice's wallet? 🤔
@vlad-ns + @oopsmonk I have a question:
should Bob transfer tokens to the Device wallet, or to Alice's wallet? 🤔
IMO, Bob sends tokens to device wallet then gives the hash (could be transaction or bundle hash) to the device. PDP will validate the policy when the transaction is confirmed. @vlad-ns But I don't know how PDP check the policy payment from PIP.
@oopsmonk how does Alice collects her token later? Assuming device's seed is stored in Secure Element, so Alice doesn't know the device's seed.
Bob sends tokens to device wallet then gives the hash (could be transaction or bundle hash) to the device.
I agree with this. I see it as step 5 on @vlad-ns list.
But my question above is still challenging me. I can think of two alternatives:
Last alternative would be making Bob send transaction to Alice and make Policy for device access behave accordingly.
Token collection is not covered in the scenario above. as the owner, he/she doesn't need to receive tokens on each deal but issues a policy for token collection to the device at anytime as preference.
@vlad-ns + @oopsmonk I have a question: should Bob transfer tokens to the Device wallet, or to Alice's wallet? 🤔
IMO, Bob sends tokens to device wallet then gives the hash (could be transaction or bundle hash) to the device. PDP will validate the policy when the transaction is confirmed. @vlad-ns But I don't know how PDP check the policy payment from PIP.
This is related to step number 6. If possible wallet should provide callback to PIP when transaction is confirmed. PDP will calculate the decision based on the request.isPayed information from PIP: Policy should contain:
"operation": "eq", "attribute_list": [ { "type": "request.isPayed.type", "value": "request.isPayed.value" }, { "type": "boolean", "value": "true" } ]
@vlad-ns + @oopsmonk I have a question:
should Bob transfer tokens to the Device wallet, or to Alice's wallet? 🤔
Both ideas are valid @bernardoaraujor. Device owner is also owner of the device wallet. Having a wallet on the device is interesting for solving autonomous vehicles problems like paying for fuel or toll.
Summary This issue is particularly crucial because this is what actually turns FROST into IOTA Access, and this integration is the backbone of the project.
Description Code under
iota/token-store
is all TypeScript. It performs the role of Token Store on the Cloud with IOTA Hub.On the Embedded side,
embedded/bc/bc_daemon.c
communicates with this service. It does it mainly via cURL.If the IOTA Token/Seed/PrivKey is the main piece of information that identifies each device, it is important that it is embedded in the device itself (ideally on a secure, tamper-proof storage).
Communcation with the node must be done via CClient calls.
JIRA: AXS-39