How zahanturel/adtp works
ADTP is a Go daemon and protocol for issuing scoped, signed agent credentials, delegating them through attributable chains, verifying invocations, and revoking credentials and descendants. The main flow runs from an API client through the HTTP API to credential storage and delegation, then through chain reconstruction and verification to an authorization result; revocation state is checked during verification. The graph also includes agent identity, lifecycle, audit, OIDC, and optional SIEM export. Some subsystem links are documented or interface-based because their wiring was not fully shown in the excerpts.
Main entry points: handlers.go HTTP API · main.go Daemon · verifier.go Verification Engine · steps.go Verification Steps
Components 19
Daemon and API
- Daemon
cmd/adtpd/main.go - Configuration
config/config.go - HTTP API
api/v1/handlers.go - OIDC Auth
api/v1/oidc.go - Agent Lifecycle
internal/lifecycle/lifecycle.go
Credential Chain
- Credential Format
internal/credential/ucan.go - Chain Builder
internal/delegation/chain.go - Delegation Issuer
internal/delegation/delegate.go
Verification and Revocation
- Verification Engine
internal/verify/verifier.go - Verification Steps
internal/verify/steps.go - Revocation State
internal/revocation
Persistence and Audit
- Memory Store
store/memory/store.go - PostgreSQL Store
store/postgres/store.go - Audit Log
internal/audit/audit.go
Identity and Export
- Agent Identity
internal/identity/keystore.go - Signing
internal/signing/sign.go - SIEM Exporter
internal/siem/siem.go
Other components
- API Client
- SIEM Webhook
Connections 31
- API Client → HTTP API: calls
README.md - Daemon → Configuration: loads
cmd/adtpd/main.go - Daemon → HTTP API: serves
cmd/adtpd/main.go - Daemon → Memory Store: selects backend
cmd/adtpd/main.go - Daemon → PostgreSQL Store: selects backend
cmd/adtpd/main.go - Daemon → Agent Identity: initializes
cmd/adtpd/main.go - Daemon → SIEM Exporter: starts optionally
cmd/adtpd/main.go - HTTP API → OIDC Auth: authenticates
api/v1/oidc.go - HTTP API → Credential Format: issues
api/v1/handlers.go - HTTP API → Delegation Issuer: delegates
api/v1/handlers.go - HTTP API → Memory Store: reads and writes
api/v1/handlers.go - HTTP API → PostgreSQL Store: reads and writes
api/v1/handlers.go - HTTP API → Verification Engine: verifies
api/v1/handlers.go - HTTP API → Revocation State: revokes and queries
api/v1/handlers.go - HTTP API → Agent Identity: uses keys
api/v1/handlers.go - HTTP API → Agent Lifecycle: manages agents
api/v1/handlers.go - HTTP API → Audit Log: records events
api/v1/handlers.go - Delegation Issuer → Credential Format: builds blocks
internal/delegation/delegate.go - Chain Builder → Credential Format: parses proofs
internal/delegation/chain.go - Verification Engine → Chain Builder: builds chain
internal/verify/verifier.go - Verification Engine → Verification Steps: runs checks
internal/verify/verifier.go - Verification Steps → Revocation State: checks status
internal/verify/steps.go - Verification Steps → Agent Identity: resolves issuer
internal/verify/steps.go - Verification Steps → Credential Format: checks capabilities
internal/verify/steps.go - Verification Engine → Audit Log: records denials
internal/verify/verifier.go - Memory Store → Revocation State: stores state
store/memory/store.go - PostgreSQL Store → Revocation State: stores state
store/postgres/store.go - PostgreSQL Store → Audit Log: persists log
store/postgres/store.go - Audit Log → Signing: uses canonicalization
internal/audit/audit.go - SIEM Exporter → SIEM Webhook: posts batches
internal/siem/siem.go - HTTP API → SIEM Exporter: exports audit