Query Permissions Do Not Apply to Validators
Query permissions do not apply to validators and validators can choose to leak data arbitrarily if they are evil or compromised.
Iroha2 trying to follow permission ideology for ISI execution and queries.
Execution of every ISI passes through consensus and it ensures expected permissions execution while consensus is not broked.
Queries do not pass through consensus. It makes it possible to change Iroha2 codebase on one node and makes it possible to execute queries with unexpected rights for other network nodes. Other network nodes will just not know about such executions.
The motivation for such an attack:
It is possible to reduce trust and discredits the network security performing such an attack because any user will have the possibility to get previously permission data.
This attack makes it possible to get private data secured by-laws that may cause the penalty for the company responsible for the network.
@Yuriy Vinogradov by the following:
you mean that if we have malicious Peer which has another codebase it will provide an ability to get data from the blockchain without checking permissions? If so - than yes, any modifications in the code of the Trusted peer will provide an ability to get the whole blockchain stored information.
To secure data it should be end to end encrypted and even trusted peers should not have an ability to decrypt it.
Consensus does not relate to Iroha Special Instructions or Iroha Queries - it is about voting on the block addition to the ledger's blockchain. Modifications to the trusted Peer code can provide an ability to execute illegal instructions on behalf of that peer, changing it's local blockchain state and attempting to vote for these changes in consensus. Even more - if someone will deploy a lot of such a peers and make "non malicious" peers struggle from network problems it can place illegal data on the chain.
So I do not see any Query specific flaws here. Correct me if I'm wrong.