Conversation
🦋 Changeset detectedLatest commit: e87e368 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Running ultrareview automatically — This change enforces fail-closed admission for principal-backed credentials across auth, authorization, and audit paths, and any subtle bug could break access control or allow unauthorized access, so it warrants an ultrareview.. I'll post findings when complete. |
This comment has been minimized.
This comment has been minimized.
98e4146 to
1c4eb02
Compare
There was a problem hiding this comment.
Ultrareview completed in 18m 33s
All reported issues were addressed
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
All reported issues were addressed across 14 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
3cd345e to
972317d
Compare
cdb5b55 to
8894d76
Compare
This comment has been minimized.
This comment has been minimized.
8894d76 to
e64714b
Compare
972317d to
db91a5a
Compare
4ac182e to
563d620
Compare
fec3154 to
1f0a170
Compare
563d620 to
e4cc4a4
Compare
|
deny grants on an agent principal are silently dropped. either keep blocked scopes in A or reject them at write time for agent principals.
|
|
private mcp now runs admission twice per request. side effect: a revoke that lands between the two calls comes back as a logged 500 instead of a 401. |
|
principal keys get fine to punt to a follow up since nothing mints these keys yet, but worth noting in the pr. |
|
approved pending comment handling |
|
Verified the general review comments against the current head:
The duplicate-admission 500 mapping is valid and is being fixed with regression coverage; retaining live re-admission rather than introducing a cache. |
|
Fixed the private MCP admission error mapping from this comment in 05e385b. Both callers preserve expected authentication denials and continue logging unexpected failures. Six focused regression cases pass; the denial cases were verified to fail before the fix. The standard package run was blocked by ClickHouse readiness before tests executed. Attribution is now being addressed in this PR rather than treated solely as a follow-up. Merge remains on hold. |
|
Request/MCP telemetry attribution and the server changeset are addressed in 0263442. Server-generated telemetry now carries the trusted agent actor separately from credential, authorizer, owner, and human identity; conflicting caller-supplied actor properties cannot override it. Bulk ingestion is unchanged. Focused attribution tests and commit hooks pass; infrastructure-dependent package runs remain blocked locally by ClickHouse readiness. Deployment and skill resource creator fields still have human-only contracts. Merge is held pending the choice between explicit rejection of unsupported principal writes and separate principal-creator schema/API support. This is not yet a complete resolution of resource creator attribution. |
There was a problem hiding this comment.
All reported issues were addressed across 13 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Summary
Enforces fail-closed live admission for principal-backed agent credentials by combining immutable delegated policy with the current direct agent and owner policies for every authorization check. It preserves canonical agent actor attribution in authorization telemetry, challenges, and audit writes while retaining credential, authorizer, and current-owner provenance separately.
Impact
Principal-backed API keys now deny malformed, expired, mixed, unsupported, inactive-parent, owner-ineligible, and policy-unsatisfied requests. Existing legacy API keys and human-backed transports retain their prior behavior; principal keys are admitted only on producer and consumer transport routes.
Request and MCP telemetry record the trusted principal actor separately from human identity, owner, and credential authorizer. Durable deployment and skill creator fields remain human-only; extending them to reference the generic principal is explicitly deferred to M3 — Principal-based creator identity in the Linear project (AIM-193). This deferral does not add write restrictions or relax existing human-only guards, and does not block this stack.
Technical details
Three-policy admission
A versioned delegated-policy codec validates canonical requested/effective grants and evaluates only effective grants. Admission resolves agent lifecycle, ownership, owner eligibility, direct agent policy, and current-owner policy in one read-only repeatable-read snapshot, then evaluates immutable R, live A, and live O independently for each concrete check.
Fail-closed attribution and bypass handling
Principal-backed contexts force authorization enforcement, reject explicit loaded-grant bypasses and legacy-only routes, and record
agent:<uuid>as the canonical actor in authorization telemetry, challenges, and audit writes. Unknown or retired policy entries are ignored per entry, while malformed or noncanonical profiles deny as a whole. Agent policy writes already reject deny effects and unsafe scopes rather than silently accepting unsupported exclusions.Dependency base
This PR targets
main. The authorization and credential-schema prerequisites are merged as #6055 and #6039. API-key lifecycle follows in #6071, and MCP session issuance, access, and refresh follow in #6072.