Sui.

Post

Share your knowledge.

DuAn.
Jan 24, 2025
Expert Q&A

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
1
1
Share
Comments
.

Answers

1
farshad.
Jan 25 2025, 03:41

To 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.

1
Comments
.

Do you know the answer?

Please log in and share it.

We use cookies to ensure you get the best experience on our website.
More info