How To Guides

How to deactivate an access policy

Learn how to deactivate access policies in your ledger using the Minka CLI

How to deactivate an access policy

This guide explains how to deactivate access policies in your ledger using the Minka CLI. Activating a policy makes it enforceable and allows it to control access permissions within your ledger.

Overview

Access policies in ledger can have different statuses:

  • created - Policy exists but is not inactive
  • active - Policy is enforced and controls access
  • inactive - Policy is temporarily disabled

Only policies with the access schema can be activated or deactivated using the CLI commands.

Prerequisites

Before deactivating an access policy, ensure you have:

  1. Minka CLI installed and configured
  2. Active ledger connection with appropriate permissions
  3. Signer access to add proofs to a policy (action: create, record: policy-proof)
  4. Existing access policy to deactivate

Step-by-Step Process

1. Connect to your server and ledger

First, ensure you're connected to the correct ledger:

# Connect to your server
minka server connect <server-url>

# Select the target ledger
minka ledger select <ledger-handle>

2. Login with appropriate permissions

Make sure you're authenticated with a signer that has policy management permissions:

# Login to the ledger
minka ledger login

3. List available policies

Before deactivating, check which policies are available and their current status:

# List all policies
minka policy list

# Show specific policy details
minka policy show <policy-handle> --verbose

4. Deactivate the policy

Use the deactivate command to make the policy inactive:

# Deactivate a specific policy
minka policy deactivate <policy-handle>
? Signer: <your-signer>
? Signer password for: <your-signer>

 Policy deactivated successfully

For example:

# Deactivate a policy named "team-access"
minka policy deactivate team-access

5. Confirm deactivation

The CLI will:

  1. Check the policy exists and has the correct schema
  2. Verify current status to ensure it's not already inactive
  3. Prompt for signer selection if multiple signers are available
  4. Submit the activation request to the ledger
  5. Display confirmation once successful

6. Verify the policy status

After deactivation, verify the policy is now inactive:

# Check the policy status
minka policy show <policy-handle>

Look for the status field in the output to confirm it shows inactive.

For more information on policy management, see: