How akramiot/agentic-iam works
Project Type and Purpose
• This is a modular Python framework (library + service) for managing agent identities, authentication, authorization, sessions, audit/compliance, federated identity, credential management, and ML-based trust scoring.
• It exposes an HTTP API (FastAPI) and includes a dashboard component. It can be deployed via Docker/Kubernetes and integrated into larger systems.
File Structure
• Top-level containers:
• api/ (FastAPI routers: audit, authorization, intelligence, sessions)
• core/ (business logic: agentic_iam)
• dashboard/ (UI components for management)
• config/ (settings.py environment mapping)
• utils/ (shared logger)
• scripts/ (migration, metrics, security tasks)
• monitoring/ (Prometheus configuration)
• k8s/ & Dockerfile/docker-compose.yml (deployment manifests)
• main.py & api/main.py (service entrypoints)
• tests/ (unit & integration)
• Configuration: pyproject.toml, requirements.txt, pytest.ini, conftest.py.
README for Additional Insights
• Core components listed in “Architecture” section align with folder names: AgentIdentity, Authentication, Authorization, SessionManager, FederatedIdentity, CredentialManager, AgentRegistry, TransportBinding, AuditCompliance, AgentIntelligence.
• Deployment recommendations include optional backends (PostgreSQL, Redis, HSM), monitoring (Prometheus/Grafana), and federation (OIDC, SAML, DIDComm).
• API Gateway / HTTP Server (FastAPI)
• Core Service Modules
– Authentication Subsystem
– Authorization Engine
– Session Manager
– Credential Manager
– Agent Registry
– Federated Identity Adapter
– Audit & Compliance Manager
– Agent Intelligence Engine
• Dashboard UI Service
• Data Stores
– Primary DB (SQLite / PostgreSQL)
– Session Store (In-memory / Redis)
– Audit Storage (SQLite / External)
– Credential Vault (in-memory / file / HSM)
• External Identity Providers
– OIDC Provider
– SAML IdP
– Trust Brokers (DIDComm)
• Messaging / Transport
– HTTP/HTTPS
– gRPC / WebSocket / STDIO
• Monitoring Stack
– Prometheus
– (Grafana optional)
– Agents/Clients → HTTP/gRPC → API Gateway
– API Gateway → Authentication → Authorization → Session Manager
– Session Manager ↔ Session Store
– Authorized requests → Core Modules (Registry, Credential, Audit, Intelligence)
– Core Modules ↔ Data Stores
– Federated Identity ↔ External IdPs
– Audit & Compliance → Audit Storage
– Agent Intelligence ← Audit Events
– Dashboard UI ⟷ API Gateway
c. Architectural Patterns
• Modular, layered service (clear separation: transport, business logic, persistence)
• Pluggable backends via abstraction interfaces (in-memory, file, SQL, HSM)
• Async/non-blocking I/O in API and intelligence components
• Zero-trust principle: all requests authenticated and authorized
• Micro-pattern within a monolithic service (could be refactored into microservices if needed)
d. Relevant Technologies/Frameworks
• FastAPI for API
• Python asyncio for non-blocking operations
• SQLAlchemy or direct SQLite/PostgreSQL drivers
• JWT, Ed25519/RSA cryptography libraries
• Prometheus exporter
• Docker & Kubernetes manifests
• pytest for testing