How To Guides

How to activate an access policy

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

How to activate an access policy

This guide explains how to activate 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 active
  • 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 activating 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 activate

Step-by-Step Process

1. Connect to Your 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 activating, 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. Activate the policy

Use the activate command to make the policy active:

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

 Policy activated successfully

For example:

# Activate a policy named "team-access"
minka policy activate team-access

5. Confirm activation

The CLI will:

  1. Check the policy exists and has the correct schema
  2. Verify current status to ensure it's not already active
  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 activation, verify the policy is now active:

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

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

For more information on policy management, see: