Repository navigation
Description
Feature Description
Goal
Produce the architecture definition for the AIAC (AI-based Access Control) Kagenti platform extension
before any implementation begins. Architecture definition is complete when all component
boundaries, interfaces, data flows, and deployment topology are documented and reviewed.
Background
AIAC is a Kagenti platform extension that automates RBAC/ABAC policy enforcement for AI
agents running on Kubernetes. A LangGraph-based AI agent continuously translates a
natural-language access control policy — stored in a vector knowledge base — into concrete
permission configurations in the active Policy Decision Point (PDP), eliminating manual
policy administration and preventing policy drift as services and roles evolve.
Proposed Solution
AIAC introduces a strict three-layer model that cleanly separates policy concerns:
| Layer | Component | Responsibility |
|---|---|---|
| Policy Management | AIAC Agent | Translates natural-language policy into PDP configuration on every trigger |
| Policy Decision (PDP) | Keycloak (Phase 1) / OPA (Phase 2) | Evaluates caller entitlements; issues scoped tokens |
| Policy Enforcement (PEP) | AuthBridge | Intercepts traffic; exchanges tokens; carries no policy knowledge |
The AIAC Agent subscribes to an event stream (NATS JetStream) and reacts to entity lifecycle
events — new services, role changes, policy updates — by retrieving the current policy from a RAG
knowledge base, querying live PDP state, and applying the minimal required diff via a dedicated
PDP Policy Service. AuthBridge performs RFC 8693 token exchanges sending only the target
audience; the PDP resolves entitlements from the composite role mappings AIAC maintains.
Policy intent lives entirely in the PDP, not in per-pod configuration.
The plan is to target Keycloak as the PDP back-end first, then in a second phase replace only the
policy-write layer with OPA/Rego while leaving all other components unchanged.
Major Use-Cases
UC-1 · Continuous Access Reconciliation (On-boarding / Off-boarding)
Trigger: A Realm Role or Keycloak Client is created, updated, or removed.
The Keycloak SPI listener publishes a scoped event to the Event Broker. The AIAC Agent retrieves
relevant context from the RAG store, reads the current composite role
state from the PDP, and asks the LLM to compute the minimal permission diff scoped to the affected
entity. The diff is validated by a second LLM pass and applied to Keycloak. Supports both
auto-apply (fully automated, least-privilege) and recommendation + human review modes.
Two-phase implementation — trigger, RAG retrieval, LLM reasoning, and validation are identical in both phases; only the policy-write target differs:
- Phase 1 (current): diff applied as Keycloak composite role mappings (realm role → service permissions)
- Phase 2 (planned): diff applied as LLM-generated Rego rules written to OPA; PDP Policy container image swap only — no other component changes
UC-2 · Policy Update Reconciliation
Trigger: An operator ingests updated documents into the RAG store.
After ingestion the RAG Ingest Service publishes a build event. The AIAC Agent retrieves all
relevant context, computes a full composite role diff against current PDP state, and applies the
delta. A rebuild variant (operator-only, direct HTTP) first clears all composite mappings before
recomputing from scratch — used when policy changes are too broad for incremental diff.
UC-3 · Entitlements Review
Trigger: Operator request (on-demand or scheduled).
The agent evaluates all current Keycloak composite mappings — including manually added ones that
AIAC did not create — against the policy. It reports compliant, non-compliant, and
policy-agnostic entitlements, enabling audit and remediation workflows.
UC-4 · Access Request
Trigger: User request via chatbot.
A user requests an entitlement grant. The agent verifies the request against the policy
(permissive approach) and either auto-grants or routes to a human approver (man-in-the-loop).
Manually granted entitlements are flagged as policy-agnostic and surfaced during UC-3 reviews.
Deliverables
- Architecture summary —
problem statement, solution model, component overview, use cases, interface surface,
call flows, and Phase 1 / Phase 2 scope boundary
Review Criteria
- Component boundaries and responsibilities are unambiguous
- Key inter-component interfaces are identified and their purpose is clear
- Phase 1 / Phase 2 scope boundary is clear: PDP Policy Service is the only component
that changes between phases (container image swap only) - Deployment topology (pod grouping, ClusterIP routing, external access points) is documented
Out of Scope
- PRD and per-component specifications — tracked as a separate follow-up issue (TBD)
- Access Control modeling — tracked as a separate follow-up issue (TBD)
- Implementation — tracked in a follow-on epic (TBD)
Parent Epic: rossoctl/rossoctl#790
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
araujof commentedon Jun 11, 2026
Hi @oblinder I'd be happy to help shaping these requirements. We have work on security policy enforcement and automation that could be useful here.
oblinder commentedon Jul 7, 2026
Superseded by epic #643 (AI-based Access Control — end-to-end delivery) and its sub-issues #644–#647. Closing as not planned; assignees have been carried over to the new issues.