corda / accounts

Accounts on Corda
Other
36 stars 38 forks source link

Share data between accounts on same node #78

Closed mrpuri closed 4 years ago

mrpuri commented 4 years ago

I have created four accounts, two on each node. I sent a message from one account say account1 on node 1 to account2 on node 2 and I also have an account - account3, present on node 2. Is there any method through which I can view the data shared to account2 from account3?

roger-that-dev commented 4 years ago

Accounts dont permission states at the vault level. So, by default, anything shared with node 2 will be viewable by all account holders on node 2. You can also query by account if you only want to return states for a particular account. See the API docs for VaultQueryCriteria.

mrpuri commented 4 years ago

Thanks a lot for clearing that Roger. Is there any way to implement privacy among accounts on the same node?

roger-that-dev commented 4 years ago

Sadly, there's no isolation at the node level but you can add application level controls to provide authorisation on a per account basis. This functionality would be baked into your CorDapp and the RPC client associated with it.