Repository navigation
feat(den): disable managed Models for DPA organizations - #4626
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
Test evidence — team-admin-grants-are-live-scoped-protected-and-cleared-across-scim-lifecycles — ✅ passedSHA 5157a5c · engine v1 ✅ passed · 4 expectations passed · 0 failed · 0 pending
verdict passed · 0 user observations · 0 probes · steps 0/0 ℹ️ ASSERTION — 1. Live team grants preserve direct roles and other grantsThe original bearer gains and loses Admin without re-login; stored member role remains member, a second team survives the first removal, direct Admin survives team revocation, and control stays unprivileged.
ℹ️ ASSERTION — 2. Admin-team invitation and raw route bypasses are deniedA direct Admin cannot refresh or cancel the privileged pending invitation; raw team/invitation writes and leaving an Admin team through organization leave return 403. Server-only addMember is not exposed over HTTP (404).
ℹ️ ASSERTION — 3. SCIM controls membership but never derives roles from group namesAn IdP group named super-admin grants nothing until approved, then only Admin. PATCH/PUT removals revoke immediately. Mapping disable/re-enable, group deletion, and provider removal clear designation; retained teams and direct roles do not retain inherited authority.
ℹ️ ASSERTION — 4. Workflow automation admission resolves current team authorityThe live Automation API reaches version validation for inherited Admin; clearing the team grant makes the next request forbidden. Direct Admin still reaches version validation without a team grant. No Automation is created.
Test run created 2026-09-08T19:01:36.459Z · Source: |
Test evidence — an-integration-authenticates-and-manages-teams-with-the-generated-den-sdk — ✅ passedSHA 5157a5c · engine v1 ✅ passed · 7 expectations passed · 0 failed · 0 pending
verdict passed · 0 user observations · 0 probes · steps 0/0 ℹ️ ASSERTION — 1. Public health and protected identityHealth succeeds without credentials; identity returns 401 with no data.
ℹ️ ASSERTION — 2. Default URL and custom transportThe default HTTPS health URL is passed to the custom fetch, which reaches the isolated Den successfully.
ℹ️ ASSERTION — 3. Session organization context and request overridesWith a different default organization, the configured orgId places a team in the selected organization. An unscoped client creates a distinct team in the default organization; a per-request override selects that organization without changing the client default.
ℹ️ ASSERTION — 4. Session and API-key authenticationBoth credentials resolve to the issuing user; an invalid key rejects.
ℹ️ ASSERTION — 5. Typed query parametersThe numeric limit becomes ?limit=1 and Den accepts the request.
ℹ️ ASSERTION — 6. Typed body, path, and request overridesA team is created in the selected org and renamed by ID; an invalid per-request key rejects the mutation.
ℹ️ ASSERTION — 7. Deletion and error responsesThe deleted team cannot be updated: HTTP 404 and no success data.
Test run created 2026-09-08T19:01:12.414Z · Source: |
Test evidence — dpa-policy-blocks-warm-managed-keys-without-revoking-customer-owned-models-or-an — ✅ passedSHA 5157a5c · engine v1 ✅ passed · 18 expectations passed · 0 failed · 0 pending
[world] den(local) · [seed] api GET /v1/org · [seed] api PATCH /v1/inference ℹ️ ASSERTION — 1. Absent DPA flag permits real managed inferenceA pre-issued DB-backed key returned HTTP 200 and the independent upstream saw exactly one authenticated managed request.
ℹ️ ASSERTION — 2. Only allowlisted platform administrators may record DPA decisionsWorkspace admin and foreign admin received 403, anonymous caller 401, invalid payloads 400; independent storage still had no flag or audit events.
ℹ️ ASSERTION — 3. Warm-key denial is organization-bound and cannot be spoofed or retried aroundSame process, key, bearer and session: completion and models are 403, body/header scope spoofing, fallback payloads and retries add zero upstream calls. Same user in a second organization still completes with its own key; foreign membership does not confer access.
ℹ️ ASSERTION — 4. Managed denial follows source, not display nameName-only public PATCH is rejected with 400. A datastore-arranged rename preserves source=openwork; lists still hide it, direct connect stays redacted, and the warm inference key returns 403 with no upstream call. This does not claim public rename support.
ℹ️ ASSERTION — 5. Managed inventory and purchase admission are disabled without breaking connect syncUsable/manageable lists and resource snapshot hide managed providers. Direct connect stays 200 with null credentials and no models. Enable and both checkout forms return policy 403 without new keys or external HTTP attempts.
ℹ️ ASSERTION — 6. GET repair cannot restore missing managed member accessAfter arranging a missing member provider and revoked member key, both members' inference/list GETs returned 200 without changing stored keys/providers; the owner's pre-issued key remains 403.
ℹ️ ASSERTION — 7. New member acceptance does not provision managed access under DPAAn existing foreign account accepted a real invitation as an ordinary member; its scoped list is empty and independent storage contains no managed key or provider for that new membership.
ℹ️ ASSERTION — 8. Customer-owned providers survive branding overlap and route with delivered credentialsOwner and member list/connect the custom OpenRouter/OpenWork-branded provider, then use its delivered endpoint, model and credential for real HTTP completions witnessed as authenticated BYOK. Managed key stays blocked. This is a delivered-config client, not an OpenCode runtime claim.
ℹ️ ASSERTION — 9. Ordinary and raw BetterAuth metadata writes cannot set or erase the flagStrict Den writes rejected extra metadata/flag with 400; raw BetterAuth replacement and creation attempts returned 403. Flag remains true with exactly one approved audit event.
ℹ️ ASSERTION — 10. Approved unset restores the original key and records the transitionThe warm key returned 200 with explicit false; datastore audit identifies the approving actor, previous true, new false and reason.
ℹ️ ASSERTION — 11. Generated SDK carries the DPA body and preserves admin authorizationGenerated typed set/unset calls send the flag and reason and return the declared success body, verified against persisted metadata and audit transitions. A workspace admin using the same generated method receives 403 with no mutation or new audit.
ℹ️ ASSERTION — 12. Audit insertion and DPA mutation are atomicA real audit column outage caused admin PATCH 500; after storage recovery no event was added and the flag stayed false with the original key usable.
ℹ️ ASSERTION — 13. Concurrent ordinary/admin metadata changes preserve DPA and unrelated nested dataThree concurrent rounds of branding, capability and DPA updates all returned 200, preserved nested fixture metadata and all requested changes, added one audit each, and kept inference blocked.
ℹ️ ASSERTION — 14. Policy parsing and unavailable storage fail closedSerialized object true returns 403; malformed JSON, array, scalar, non-boolean flags and real missing metadata column return 503 with zero upstream calls. Restoring absent flag permits the original key.
ℹ️ ASSERTION — 15. Policy is re-read immediately before dispatchIndependent SQL processlist proved a request had passed initial admission and was blocked on limits. An approved policy change committed before releasing that lock. Same in-flight request returned 403 with zero upstream calls; unset restored 200.
ℹ️ ASSERTION — 16. Delayed checkout sync records purchase history without reactivationA real SDK checkout retrieval was held over the approved DPA transition. Release returned sync 200 and persisted active purchase quantity 7 plus checkout event ID. Revoked keys, absent managed providers and disabled inference metadata stayed unchanged; zero inference calls.
ℹ️ ASSERTION — 17. Signed delayed Stripe webhooks retain history without managed reactivationInvalid HMAC was rejected with 400 before any SDK read or history change. Real signature verification accepted completed and async-payment-success events, including repeated deliveries, with event IDs persisted. Keys/providers and disabled inference remained unchanged; no inference upstream calls.
ℹ️ ASSERTION — 18. Synthetic providers onlyDen/inference child environments blank real provider, Stripe and telemetry credentials. Stripe uses only a fixture key and loopback SDK transport. Preload refuses non-loopback HTTP; zero external attempts were recorded and every provider request carried the expected synthetic credential.
Test run created 2026-09-08T19:00:43.387Z · Source: |
|
SDK follow-up pushed in 5157a5c. Reproduced the generated-sdk stale-output failure, regenerated the SDK, and corrected the DPA route contract so its generated method carries dpaSigned/reason and typed success/error responses. Regeneration also includes team-admin fields already present in the route schemas. Passed on this head: pnpm sdk:check (fresh generation comparison + SDK typecheck), pnpm sdk:build, Den typecheck, and the DPA / generated-SDK / organization-admin boundary journeys (1 passed each, no failures or skips). DPA proof now includes 18 assertion groups, including generated SDK set/unset and denied non-platform-admin mutation. All three PR-head evidence sections are published below/above. An isolated local schema-export database was used and removed afterward; no production actions were performed. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (5157a5c3406994e458245b0a891a9d038ad7c0ce). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Summary
dpaSignedin existing organization metadata, with an audited allowlisted-platform-admin set/unset operation and reserved-key protection.Verification
Passed on PR head
d85ed4b4fafter rebasing onto current dev:pnpm evals:pr specs/managed-models-dpa.test.ts: 1 passed, 0 failed/skipped; 17 observable assertion groups. Placement: local (testkit resolvePlace; isolated app-less Den and inference). Independent upstream witness proves denied requests dispatch nothing; synthetic-only transport records zero external HTTP attempts.pnpm evals:pr specs/team-organization-admin.test.ts: 1 passed, 0 failed/skipped.Per-test testkit evidence is published in the PR comments. See
docs/pr-proof/dpa-opt-out.mdfor the initial verification record and clean-control diagnosis of existing broader eval typecheck/ratchet failures.Scope and operational limits
docs/features/managed-models-dpa.md.