Post
Share your knowledge.
Securing shared objects for specific package interaction
We are developing a package that interacts with another package using a shared object. This shared object can be updated by any module, which might open it up to security risks. How can we restrict edits so that only a specific package can update it?
- Sui
Answers
1To ensure that only a specific package can update a shared object, you can use patterns like sender or capability gating. One way is to implement a capability pattern, where you allow updates based on ownership of an object. Alternatively, you can create an Access Control List (ACL) to allow only certain addresses to interact with your package's methods. These methods are detailed in resources like the capability pattern documentation and the denylist rule, which can be seen here and here.
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.