Open kingster-will opened 4 months ago
Great writeup. We could implement this in 2 phases, the first one a simple hard coded maping to remove the vector, then we can make it more flexible to not require hard forks. It could be tied to Module Registry, but not to all modules. There could be an extra property 'writesIPGraph' that the precompile checks.
Shouldn't this be in the geth repo, not here in protocol core, as it requires changes in the precompile?
Description and context
We propose to introduce an Access Control List (ACL) mechanism to the IP Graph precompile contracts to enhance security and control over write operations. This ACL will ensure that only addresses/accounts that are whitelisted can access and execute write functions, such as
addParents()
. The primary goal is to restrict state-changing operations to valid contracts, like the "LicensingModule", thereby preventing unauthorized modifications to the IP Graph.Details
Currently, the IP Graph precompile contracts do not have an explicit access control mechanism for write operations. This lack of access control could potentially expose the system to unauthorized state changes, leading to security vulnerabilities. By implementing an ACL, we can ensure that only whitelisted addresses, which are recognized and authorized by the system, can perform write operations.
Key Features to Implement:
addParents()
) to include checks that ensure the caller's address is in the whitelist before executing any state-changing logic.Acceptance Criteria