Skip to main content

Delete a Policy

Policies can be deleted by the Key Owner.

Process Overview

  1. Submit Request: The user creates a request payload containing the key_id and expected_authorization_epoch, the key's current authorization epoch.
  2. Sign Request: The request is signed by the Key Owner (User) to ensure authenticity.
  3. Node Validation & Deletion: The Node validates the signature and authorizes the deletion. Then, it removes the policy and its MAC from the database.

Upon receiving the request, the Node performs the following:

  • Authentication: Authenticates the request using the provided signatures (e.g. user_sig, WPBE_sig).
  • Epoch Check: Requires expected_authorization_epoch = current epoch.
  • Deletion: The Policy and its MAC are permanently removed from storage, and the epoch advances.

Delete Policy in Silent Network

Example

Follow this instruction to setup your Wallet Backend

curl -X POST "http://<YOUR_WALLET_BACKEND_ENDPOINT>/v2/rest/deletePolicy" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"key_id": "YOUR_KEY_ID_HERE",
"expected_authorization_epoch": 1
},
"userSignatures": { ... } # Key Owner authentication
}'

Response:

{
"status": "success",
"authorization_epoch": 2
}

The key now has no policy at epoch 2. A later policy mutation must use epoch: 3.