How praann07/az-kerberos works
AZ-Kerberos adds asynchronous, per-principal risk scoring and ticket-policy enforcement to stock MIT Kerberos. The main workflow parses KDC log events, extracts sliding-window features, scores and maps risk levels, then publishes a binary table for the KDC policy plugin to apply as ticket caps or denials. The engine also records risk and publication events in a signed, hash-chained audit log. The README documents the live-KDC loop; source excerpts show key Python and plugin behavior. Some runtime wiring is unsampled, so unsupported links are omitted. The simulator and demo are shown only as a synthetic pipeline branch.
Main entry points: demo.py Synthetic Pipeline Demo · engine.py Async Risk Engine · kdcpolicy_azk.c KDC Policy Plugin · logparse.py Log Parser
Components 13
Log Analysis
- Log Parser
src/azk/logparse.py - Feature Extractor
src/azk/features.py - Scoring and Levels
src/azk/scorer.py
Risk Policy
- Async Risk Engine
src/azk/engine.py - Risk Table Writer
src/azk/risktable.py - Binary Risk Table
src/azk/risktable.py
KDC Enforcement
- KDC Policy Plugin
plugin/kdcpolicy_azk.c - KDC Database API
plugin/kdb.h
Audit and Simulation
- Signed Audit Log
src/azk/audit.py - Synthetic Log Generator
src/azk/simulator.py - Synthetic Pipeline Demo
src/azk/demo.py
Other components
- MIT Kerberos KDC
- KDC Log Stream
Connections 19
- MIT Kerberos KDC → KDC Log Stream: writes events
README.md - KDC Log Stream → Log Parser: parses lines
README.md - Log Parser → Feature Extractor: creates events
src/azk/features.py - Feature Extractor → Log Parser: uses event types
src/azk/features.py - Async Risk Engine → Feature Extractor: updates features
src/azk/engine.py - Async Risk Engine → Scoring and Levels: scores features
src/azk/engine.py - Async Risk Engine → Risk Table Writer: publishes entries
src/azk/engine.py - Async Risk Engine → Signed Audit Log: appends records
src/azk/engine.py - Risk Table Writer → Binary Risk Table: writes atomically
src/azk/risktable.py - KDC Policy Plugin → Binary Risk Table: reads mapped table
plugin/kdcpolicy_azk.c - KDC Policy Plugin → KDC Database API: uses declarations
plugin/kdcpolicy_azk.c - MIT Kerberos KDC → KDC Policy Plugin: requests policy
README.md - KDC Policy Plugin → MIT Kerberos KDC: caps or denies
README.md - Synthetic Log Generator → Synthetic Pipeline Demo: generates logs
src/azk/demo.py - Synthetic Pipeline Demo → Log Parser: parses synthetic lines
src/azk/demo.py - Synthetic Pipeline Demo → Async Risk Engine: feeds events
src/azk/demo.py - Synthetic Pipeline Demo → Scoring and Levels: trains and calibrates
src/azk/demo.py - Synthetic Pipeline Demo → Signed Audit Log: verifies log
src/azk/demo.py - Synthetic Pipeline Demo → Risk Table Writer: checks table
src/azk/demo.py