Search code examples
kotlinblockchainrpccordadata-access-layer

Is there a way to restrict the transaction data the Corda RPC users can view within their node's vault?


I understand that there can be more than one RPC users defined within a node and that all of the transactions that are stored in the node's vault is visible to all RPC users by vault query. Is there a way to change this behavior/limit what the users are able to see within the vault because I may not want a user to see all of the transactions that are not relevant to them.

Here's the context: Say I have a node with 3 RPC users, each of them are independent of each other and they are grouped together within the same node because they are of the same user type. Say these 3 users each made a separate transaction with other node and these separate transactions will essentially be updated to the same vault. How can I ensure the privacy of each user is maintained since a vault data is visible to its users? How can I ensure that the users are not able to view the transaction made by other users of the same node?

Is there a way to setup this access layer? Or is the current version of Corda already allowing this? How can this access layer be implemented? For example, if I have to add an extra attribute to tag the transaction or is there other better ways to do this?


Solution

  • Use the accounts sdk (https://github.com/corda/accounts) or implement the logic yourself.

    Separating data between users is not the platforms concern per se, you need to implement a layer between the data and the users. This layer would provide access to data that is relevant to them. Thus working in the same way as data access in any web platform where you can only access your data.