Data Index
As outlined in the Core Concepts, the IDataIndex
interface defines functions to manage access control for Data Managers and their associated Data Points within Data Objects. It extends the IIDManager
interface.
In this section, we'll explain the minimalistic implementation of the Data Index.
The implementation follows the standard interface and is divided into two parts: methods for managing permissions and forwarding operations. This implementation includes an access control mechanism, and IDataIndex
supports Data Index IDs per the IDManager
standard interface.
To store and manage permissions for Data Managers allowed to write to specific Data Points, you'll find:
Modifiers
The modifiers are crucial for organizing access control and restricting access to certain methods:
1. onlyDPOwner()
The Data Point structure holds key information about the processing chain and registry. The Nexera Standard ensures interoperability, storing the source chain ID. We retrieve the chain ID to confirm the correct destination chain and check the registry address to verify if the sender is a Data Point admin, ensuring only trusted users can modify its storage.
2. onlyApprovedDM()
Only whitelisted Data Managers can transact through the Data Index to Data Points. We verify if the message sender is an authorized Data Manager.
The reference implementation for managing permissions and forwarding operations includes four main methods: isApprovedDataManager()
, allowDataManager()
, read()
, and write()
. Additionally, the IDManager interface is used to generate user identifiers and retrieve user information.
The methods inherited from IIDManager
provide ownership details for the DataIndex or generate user IDs: