storyprotocol / protocol-core-v1

core protocol repo for mainnet launch
Other
70 stars 52 forks source link

Introduce ACL to IP Graph Precompile #230

Open kingster-will opened 4 months ago

kingster-will commented 4 months ago

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:

Acceptance Criteria

Ramarti commented 2 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.

jdubpark commented 2 months ago

Shouldn't this be in the geth repo, not here in protocol core, as it requires changes in the precompile?