Skip to content

feat(agentos): CAS API-key capability checks, obs group/actor filters…#27

Merged
abhi-bhat-lyzr merged 1 commit into
deployfrom
feat/agentos-auth-rbac-refresh
Jun 6, 2026
Merged

feat(agentos): CAS API-key capability checks, obs group/actor filters…#27
abhi-bhat-lyzr merged 1 commit into
deployfrom
feat/agentos-auth-rbac-refresh

Conversation

@abhi-bhat-lyzr
Copy link
Copy Markdown
Collaborator

…, group-claim fallback

API-key capability enforcement (ComputerAgent server):

  • introspection now resolves a key's roleIds -> effective permissions (keys-introspect.ts, via exported resolveEffectivePermissions); the CAS verifier captures them and gates each route (GET -> agents:read, execute/mutate -> agents:run), returning 403 on an under-privileged key (e.g. a viewer key hitting /run). Basic-auth (the agentos loopback) stays full-trust since agentos already enforced RBAC + ownership. Back-compat: a response with no permissions field (old AgentOS) is allowed and logged once, so a rolling upgrade doesn't lock keys out.

Observability group + actor filters:

  • new Group + Actor dropdowns beside Agent, built on a reusable, RBAC-scoped FieldValueFilter (AgentFilter is now a thin wrapper). Applied to the Traces explorer (implicit group_id/actor_id eq-filters on the filters[] array) and the Dashboard (group/actor params on /dashboard, both ClickHouse + NRQL).
  • obs-fields bypasses the otel_field_values materialized view for the non-materialized identity fields (group_id/owner_id/actor_id) so admins get values; group_id/owner_id/actor_id registered as query fields front + back.

Group-claim fallback + agent card refresh:

  • when the OIDC access token carries no groups claim, fall back to the Keycloak Admin API (listUserGroups / withGroups) so group-scoped RBAC still works. Best-effort; leaves groups empty on failure.
  • AgentCard shows model + owner-group chips and a live-status pill; registry grid spacing tweaked.

Summary

Type of change

  • Bug fix (no API change)
  • New feature (additive — opt-in or new export, no existing-behavior change)
  • Breaking change (requires major version bump on affected packages)
  • Docs / CI / tooling only

Verification

  • pnpm -r build clean
  • pnpm -r typecheck clean
  • pnpm -r test clean (note any flaky tests in the comment)
  • If a plug-in: runConformanceSuite() passes (paste report below)

Versioning

  • pnpm changeset was run for any change to a published package
  • N/A — internal-only change

Notes for the reviewer

…, group-claim fallback

API-key capability enforcement (ComputerAgent server):
- introspection now resolves a key's roleIds -> effective permissions
  (keys-introspect.ts, via exported resolveEffectivePermissions); the CAS
  verifier captures them and gates each route (GET -> agents:read,
  execute/mutate -> agents:run), returning 403 on an under-privileged key
  (e.g. a viewer key hitting /run). Basic-auth (the agentos loopback) stays
  full-trust since agentos already enforced RBAC + ownership. Back-compat:
  a response with no `permissions` field (old AgentOS) is allowed and logged
  once, so a rolling upgrade doesn't lock keys out.

Observability group + actor filters:
- new Group + Actor dropdowns beside Agent, built on a reusable, RBAC-scoped
  FieldValueFilter (AgentFilter is now a thin wrapper). Applied to the Traces
  explorer (implicit group_id/actor_id eq-filters on the filters[] array) and
  the Dashboard (group/actor params on /dashboard, both ClickHouse + NRQL).
- obs-fields bypasses the otel_field_values materialized view for the
  non-materialized identity fields (group_id/owner_id/actor_id) so admins get
  values; group_id/owner_id/actor_id registered as query fields front + back.

Group-claim fallback + agent card refresh:
- when the OIDC access token carries no `groups` claim, fall back to the
  Keycloak Admin API (listUserGroups / withGroups) so group-scoped RBAC still
  works. Best-effort; leaves groups empty on failure.
- AgentCard shows model + owner-group chips and a live-status pill; registry
  grid spacing tweaked.
@abhi-bhat-lyzr abhi-bhat-lyzr merged commit 5080733 into deploy Jun 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant