Skip to content

docs: EP-1270 Authorization (access control) design proposal#2075

Open
davidkarlsen wants to merge 2 commits into
kagent-dev:mainfrom
davidkarlsen:feat/ep-authz
Open

docs: EP-1270 Authorization (access control) design proposal#2075
davidkarlsen wants to merge 2 commits into
kagent-dev:mainfrom
davidkarlsen:feat/ep-authz

Conversation

@davidkarlsen

Copy link
Copy Markdown
Contributor

Summary

Adds an Enhancement Proposal for authorization (access control) in KAgent — issue #1270.

Today the controller ships with NoopAuthorizer, so once a user is authenticated they can list, invoke, edit and delete every Agent, ModelConfig and ToolServer across every namespace. Enabling OIDC (#1293) gives authentication but no access control. This EP proposes the fine-grained authorization that EP-476 explicitly deferred.

Approach

The earlier #1270 discussion stalled on a design tension: an opinionated in-process RBAC engine vs. a pluggable extension point. The EP proposes CEL as the resolution — it's both:

  • In-process default, no new SPOF (cel-go is already in our module graph), and
  • Not a hard-coded RBAC model — policy is an expression over claims/verb/resource, so groups are one option among many and the project isn't married to one engine.

The auth.Authorizer interface stays the seam, so an external/OPA authorizer (#1370) remains pluggable. Per-resource policy lives on the Agent CR, compiled via reconciliation (cached, validated onto status.conditions), enforced centrally. Builds on the stalled prototypes in #1766 (per-agent annotation + list filtering + A2A gating) and #1370 (external authorizer interface) rather than starting over.

Design comment that led here: #1270 (comment)

Status

provisional — following the "merge early and iterate" guidance in the EP template. High-level direction is the goal; details (per-resource carrier, policy-combining semantics, default-deny behavior) are flagged as Open Questions / UNRESOLVED for discussion.

Looking for a maintainer sponsor and a directional 👍 on "CEL as the default, behind the existing interface."

/cc @EItanya @peterj

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 23, 2026 10:57
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement-proposal Indicates that this PR is for an enhancement proposal labels Jun 23, 2026
@davidkarlsen

Copy link
Copy Markdown
Contributor Author

@EItanya @peterj PTAL

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Enhancement Proposal (EP-1270) documenting a design for introducing fine-grained authorization (access control) in KAgent, centered on CEL-based policy evaluation while preserving the existing auth.Authorizer seam for pluggable implementations.

Changes:

  • Introduces EP-1270 documenting current authorization gaps and the proposed CEL-based default authorizer.
  • Specifies a policy model, decision context, and rollout strategy (opt-in, fail-closed, cached compilation).
  • Outlines operational considerations (list filtering, A2A gating) and an initial test plan.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread design/EP-1270-Authorization.md Outdated
davidkarlsen and others added 2 commits June 23, 2026 15:28
Proposes a real Authorizer to replace the open-by-default NoopAuthorizer:
CEL-based, in-process, behind the existing auth.Authorizer interface, with
per-resource policy on the Agent CR compiled via reconciliation and a
default-deny model. Builds on the stalled prototypes in kagent-dev#1766 and kagent-dev#1370.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
Address PR review: ProxyAuthenticator only populates Principal.Claims for
direct user calls; the agent-call path (X-Agent-Name) sets User/Agent but not
Claims. Qualify the Background statement and strengthen Open Question kagent-dev#5 — a
claims-only fail-closed policy would deny internal agent/M2M traffic, so the
model needs an agent-identity match or a separate M2M lane.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
@davidkarlsen

Copy link
Copy Markdown
Contributor Author

@dimetron PTAL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement-proposal Indicates that this PR is for an enhancement proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants