Skip to content

feat(mecak8s): expose opt-in Cedar authority policies for caller-scoped tool restrictions #1368

Description

@jhrozek

Problem

Mecatl includes an opt-in Cedar-backed AuthorityEvaluator, but mecak8s does not expose the composition settings needed to select it. mecated provides --authority-evaluator=cedar and --cedar-authority-policy, while mecak8s has neither flag nor corresponding app.Config wiring.

This prevents a Kubernetes deployment from applying caller-identity-aware policy to built-in tools. For example, an OIDC-authenticated bot account should be denied WebSearch while other authenticated callers retain it.

Desired outcome

Make the Cedar authority evaluator available to mecak8s through operator-controlled deployment configuration.

Acceptance criteria

  • mecak8s exposes an explicit evaluator selection and static Cedar-policy source equivalent to mecated's --authority-evaluator and --cedar-authority-policy.
  • The settings are passed to app.Config.AuthorityEvaluator and app.Config.CedarAuthorityPolicy.
  • The Helm chart provides an operator-safe way to supply the policy file (for example, a mounted ConfigMap or Secret) and the corresponding command arguments.
  • Cedar remains opt-in; the existing local evaluator remains the default.
  • Selecting Cedar without a readable/valid policy fails startup rather than weakening enforcement.
  • With OIDC enabled, a Cedar policy can deny Tool::"WebSearch" for one exact (issuer, subject) bot principal, without denying it for another authenticated principal.
  • Add offline coverage for CLI/config-to-composition wiring and the bot-specific denial path; update the owning user/deployment documentation.

Notes

This is distinct from --permission-config: permission rules govern approval behavior generally, whereas Cedar is the identity-aware execution authority layer. Cedar is tightening-only: it may deny a carried capability but cannot grant a tool the session does not already carry.

Relevant code:

  • cmd/mecated/main.go — existing Cedar flags
  • cmd/mecak8s/flags.go — missing equivalent flags/config mapping
  • internal/app/root_authority.go — evaluator selection
  • internal/adapter/cedarauthority/cedar.go — policy evaluation and owner requirements
  • docs/adr/0234-authority-evaluator-port.md — authority-evaluator decision

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions