Identity and Access Management (IAM) and Privileged Access Management (PAM) for AI agents
Project description
Agentic Execution Boundaries
The Problem
Current AI agents operate with over-privileged "God-mode" access, performing actions without verification, approval, or audit trails. This creates catastrophic risk in production systems: unauthorized data exfiltration, destructive operations, and zero accountability.
The Solution
CIAF-LCM Agentic Execution Boundaries provides a zero-trust framework ensuring agents only execute authorized actions with verifiable cryptographic proof. Every action is authenticated, authorized, mediated, and audited—with tamper-evident evidence chains proving what happened and who approved it.
Overview
This module implements identity and access management (IAM) and privileged access management (PAM) controls for autonomous AI agents, aligned with CIAF-LCM (Cognitive Insight Audit Framework - Lazy Capsule Materialization) principles.
Core Concepts
Execution Boundaries
An agentic execution boundary defines the complete control envelope for an AI agent:
Agent Boundary = Identity + Authorization + Context + Elevation Control + Mediation + Auditability
Control Planes
-
Identity Plane - Who is the agent?
- Unique principal IDs
- Workload credentials
- Role assignments
- Tenant and environment binding
-
Policy Plane - What can the agent do?
- Role-based access control (RBAC)
- Attribute-based access control (ABAC)
- Contextual conditions
- Resource scoping
-
Privilege Plane - When can the agent elevate?
- Just-in-time (JIT) privilege grants
- Time-bound elevation
- Approval workflows
- Purpose binding
-
Execution Plane - How are actions mediated?
- Tool wrappers
- Schema validation
- Interruptibility controls
- Output filtering
-
Evidence Plane - How is it proven?
- Cryptographic receipts
- Chain-of-custody
- Tamper detection
- Audit trail preservation
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Action Request │
│ (Agent, Action, Resource, Parameters, Justification) │
└────────────────────┬────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────────────────────────┐
│ Identity Resolution │
│ • Authenticate agent principal │
│ • Load roles and attributes │
└────────────────────┬────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────────────────────────┐
│ Policy Evaluation │
│ • Check standing IAM permissions │
│ • Evaluate boundary conditions (ABAC) │
│ • Determine if elevation required │
└────────────────────┬────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────────────────────────┐
│ Privilege Verification │
│ • Find active elevation grant (if required) │
│ • Validate grant scope and expiry │
│ • Check approver and ticket reference │
└────────────────────┬────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────────────────────────┐
│ Mediated Execution │
│ • Invoke guarded tool wrapper │
│ • Apply runtime controls │
│ • Capture execution result │
└────────────────────┬────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────────────────────────┐
│ Evidence Recording │
│ • Generate signed receipt │
│ • Chain to prior receipt │
│ • Store in tamper-evident vault │
└─────────────────────────────────────────────────────────────┘
Installation
# Navigate to the ciaf_agents directory
cd ciaf_agents
# Install the package in editable mode
pip install -e .
# Or install with development dependencies
pip install -e ".[dev]"
Quick Start
Basic IAM Setup
Here's how to initialize a simple identity and access management system:
from ciaf_agents.core import Identity, Permission, RoleDefinition
from ciaf_agents.iam import IAMStore
from ciaf_agents.policy import same_tenant_only
# Create the IAM store
iam = IAMStore()
# Define a role with specific permissions
analyst_role = RoleDefinition(
name="data_analyst",
permissions=[
Permission("read_record", "patient_record", same_tenant_only),
Permission("export_report", "report", same_tenant_only),
]
)
iam.add_role(analyst_role)
# Create an agent identity with that role
agent = Identity(
principal_id="agent-claims-001",
principal_type="agent",
display_name="Claims Analysis Agent",
roles={"data_analyst"},
attributes={"tenant": "acme-health"}
)
iam.add_identity(agent)
Full Execution with Evidence
For complete control with identity, permissions, elevation, and cryptographic audit:
from ciaf_agents.core import Identity, Resource, ActionRequest, Permission, RoleDefinition
from ciaf_agents.iam import IAMStore
from ciaf_agents.pam import PAMStore
from ciaf_agents.policy import PolicyEngine, same_tenant_only
from ciaf_agents.evidence import EvidenceVault
from ciaf_agents.execution import ToolExecutor
# Initialize all components
iam = IAMStore()
pam = PAMStore()
vault = EvidenceVault(signing_secret="your-secret-key-here")
policy = PolicyEngine(iam, pam, sensitive_actions={"approve_payment"})
executor = ToolExecutor(policy, vault, pam)
# Setup role and identity
payment_agent = Identity(
principal_id="agent-payment-001",
principal_type="agent",
display_name="Payment Approval Agent",
roles={"payment_approver"},
attributes={"tenant": "acme-health"}
)
iam.add_identity(payment_agent)
# Create an action request
payment_request = ActionRequest(
action="approve_payment",
resource=Resource(
resource_id="payment-123",
resource_type="payment",
owner_tenant="acme-health",
attributes={"amount": 50000}
),
params={"amount": 50000},
justification="Approve vendor invoice INV-2024-001",
requested_by=payment_agent
)
# Execute with full IAM/PAM/Evidence controls
result = executor.execute(payment_request)
print(f"Action allowed: {result.allowed}")
print(f"Reason: {result.reason}")
# Verify the complete cryptographic evidence chain
is_valid = vault.verify_chain()
print(f"Evidence chain valid: {is_valid}")
Run Complete Scenarios
For healthcare claims, financial payments, and infrastructure scenarios:
python examples/scenarios/healthcare_claims.py
python examples/scenarios/financial_approvals.py
python examples/scenarios/production_changes.py
Module Structure
src/
├── core/ # Core types (Identity, Resource, Request, Receipt)
├── iam/ # Identity and access management
├── pam/ # Privileged access management
├── policy/ # Policy evaluation engine
├── evidence/ # Evidence vault and receipt chain
├── execution/ # Tool executor with mediation
└── utils/ # Cryptographic and helper utilities
Examples
See the examples/ directory for complete scenarios:
Cryptographic Evidence & Receipts
Every action generates a tamper-evident receipt with complete chain-of-custody. Receipts are cryptographically signed and chained to prove what happened and prevent unauthorized modification.
Example Receipt (JSON):
{
"receipt_id": "rcpt-2024-001-abc123",
"timestamp": "2024-03-18T14:32:45.123Z",
"principal_id": "agent-payment-001",
"principal_type": "agent",
"action": "approve_payment",
"resource_id": "payment-123",
"resource_type": "payment",
"correlation_id": "corr-2024-001",
"decision": true,
"reason": "Allowed by IAM and runtime boundary policy",
"elevation_grant_id": "grant-2024-xyz789",
"approved_by": "manager-hr-001",
"params_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"policy_obligations": ["two_person_review", "heightened_logging"],
"prior_receipt_hash": "sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3",
"signature": "hmac-sha256:8d74e34d2c5b6f8a9e1c3d5f7b2a4c6e8f0a1b3d5f7a9b1c3e5d7f9a1b3c5"
}
Verify receipts programmatically:
# Check a single receipt
is_valid = vault.verify_receipt(receipt)
# Verify entire chain (detects tampering)
chain_valid = vault.verify_chain()
# Get all receipts for an agent
receipts = vault.get_receipts_by_principal("agent-payment-001")
# Get denied actions
denied = vault.get_denied_receipts()
Documentation
- Whitepaper: Agentic Execution Boundaries - Theory and concepts
- Architecture Details - Technical design
- Implementation Guide - Step-by-step walkthrough
- API Reference - Complete API documentation with examples
- Troubleshooting Guide - Common issues and solutions
- Contributing Guidelines - How to contribute
- Changelog - Version history and changes
Configuration
Configuration files are in config/:
example_config.yaml- System configuration templatepolicies/default_policies.yaml- Default policy rules (tenant isolation, data classification, payment thresholds, etc.)policies/sensitive_actions.yaml- High-risk action definitions (financial operations, infrastructure changes, data exports)policies/schema.json- JSON Schema for policy validation
Security Considerations
- Credential Management: Never hardcode signing secrets or credentials. Use environment variables or secure vaults.
- Grant Expiry: Always set reasonable expiration times for elevation grants (15-120 minutes recommended).
- Receipt Storage: Store receipts in WORM (write-once-read-many) or immutable storage to prevent tampering.
- Chain Verification: Regularly verify receipt chain integrity to detect any modifications or gaps.
- Audit Review: Implement automated detection of anomalous patterns in authorization decisions.
License
Business Source License 1.1 (BUSL-1.1)
This project is licensed under the Business Source License 1.1 with eventual conversion to an Open Source license.
What this means:
- ✅ Use in development and testing environments
- ✅ Use in non-production systems
- ⚠️ Production use requires evaluation (see LICENSE.md for specifics)
- 📜 Source code is available for inspection and modification
- 🔄 License converts to Open Source after a specified period
See LICENSE.md for complete details.
Questions? Open an issue on GitHub or review the Troubleshooting Guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ciaf_agents-1.0.0.tar.gz.
File metadata
- Download URL: ciaf_agents-1.0.0.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fe3ba253ff42a835c21cd38b86ae14eea87b08aadf05f0fcca91308ba22fd49
|
|
| MD5 |
e9c1041bca8f60f4b707b432d2980b4c
|
|
| BLAKE2b-256 |
c31abc3ad719de51f0c366fb597d6640f09f45920e3188c5341d5d65a34f6117
|
Provenance
The following attestation bundles were made for ciaf_agents-1.0.0.tar.gz:
Publisher:
workflow.yml on DenzilGreenwood/ciaf_agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciaf_agents-1.0.0.tar.gz -
Subject digest:
9fe3ba253ff42a835c21cd38b86ae14eea87b08aadf05f0fcca91308ba22fd49 - Sigstore transparency entry: 1126787341
- Sigstore integration time:
-
Permalink:
DenzilGreenwood/ciaf_agents@89ec93a175997b8926d31048f9e3fe5994777edf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DenzilGreenwood
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@89ec93a175997b8926d31048f9e3fe5994777edf -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ciaf_agents-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ciaf_agents-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c67a954612914a85f716a75af5ebb104305cee458f58321ee1810e79f30af2
|
|
| MD5 |
94793036a261eeab0a7e306df6e14636
|
|
| BLAKE2b-256 |
6d036ccefa46d9d6e2df7847058544223feeb8ea0361bba653f0853af8696226
|
Provenance
The following attestation bundles were made for ciaf_agents-1.0.0-py3-none-any.whl:
Publisher:
workflow.yml on DenzilGreenwood/ciaf_agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciaf_agents-1.0.0-py3-none-any.whl -
Subject digest:
b4c67a954612914a85f716a75af5ebb104305cee458f58321ee1810e79f30af2 - Sigstore transparency entry: 1126787398
- Sigstore integration time:
-
Permalink:
DenzilGreenwood/ciaf_agents@89ec93a175997b8926d31048f9e3fe5994777edf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DenzilGreenwood
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@89ec93a175997b8926d31048f9e3fe5994777edf -
Trigger Event:
workflow_dispatch
-
Statement type: