hashgraph / guardian

The Guardian is an innovative open-source platform that streamlines the creation, management, and verification of digital environmental assets. It leverages a customizable Policy Workflow Engine and Web3 technology to ensure transparent and fraud-proof operations, making it a key tool for transforming sustainability practices and carbon markets.
Apache License 2.0
93 stars 120 forks source link

A method of complete data loss for any user, like a registry. #3837

Closed mattsmithies closed 16 hours ago

mattsmithies commented 4 days ago

Problem description

There is an issue when updating user's profile that will result in the complete data loss connected to a user, this can be a particular issue where the user is a registry, and that it is connected to policy data that has not been exported.

In short, it seems that the keys and did connected to a user can be updated at any point in time, and there isn't any protection against this update.

There are a number of methods that this can transpire:

Attached is a video that demos the issue: https://www.loom.com/share/7e3176665d9a407a805c3b45e78083fa

Step to reproduce

Assume an initial state where:

  1. Authenticate as the registry user
  2. Either, trigger the "DID not found screen" from #3525 or authenticate as registry through API.
  3. Complete the initial set up flow for "pushing keys, tags, and fireblock data" to "profiles/push/$username".
  4. Log in as registry on UI
  5. See no policy

Expected behavior

If keys or DID is already present on an actor/user the "initial profile update" function should validate for that state and throw a valid status code.

Screenshots

See loom video above

mattsmithies commented 4 days ago

@anvabr @prernaadev01 @justin-atwell

prernaadev01 commented 4 days ago

@mattsmithies Thank you so much for the ticket. We are looking at it asap. Will keep you posted on the progress.

anvabr commented 16 hours ago

fixed in the 2.26.1 hotfix.