Skip to content

Document expanded scoped API key permissions - #751

Open
sjmiller609 wants to merge 24 commits into
mainfrom
hypeship/expand-scoped-key-docs
Open

sjmiller609 wants to merge 24 commits into
mainfrom
hypeship/expand-scoped-key-docs

Conversation

@sjmiller609

@sjmiller609 sjmiller609 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Expand the scoping reference to cover the public API permissions and add paired TypeScript and Python policies for common workloads. Document which actions must be granted together and when callers need access to resources referenced by another object.

  • Distinguish renaming a key (api_keys:write) from replacing its policy and IP conditions in place (api_keys:set_policy). Cover delegation, expiry, rotation and revocation without changing the workload identity guidance.
  • Correct native OAuth consent: a person chooses permissions and one project or all projects. Native tokens cannot manage API keys; service accounts have additional restrictions.
  • Explain what scoped deployers and invokers must grant. A deployment stores its runtime policy, defaults to callback-only access for scoped deployers, and issues a fresh 65-minute key per invocation independent of the deploying key’s lifetime. Existing shared-key deployments are unchanged.

Publishing

Merge these docs only after kernel/kernel#5724 and kernel/kernel#5749 (action wildcards) have deployed to production. They describe scoped deployments without a rollout flag; unrestricted callers that omit runtime_policy still use shared keys.

Experimental validation

Ran in production with short-lived, policy-scoped project keys; each check used narrower keys to confirm omitted actions return 403.

  • Apps: deployed with and without runtime_policy; two invocations read their own invocation with the injected credential. Invoking without covering the runtime policy returned 403.
  • Keys: project selection by ID and name, child-key issuance and expiry limits, rename vs policy replacement, invalid policies (400), and deletion.
  • Resources: browsers, profiles, pools, proxies, extensions, vaults, credentials, auth connections, tasks/reports, and config registry behaved as documented.
  • Reference: all eight policy examples were accepted with their stated allow/deny behavior; 23 endpoint-to-action mappings and 11 list filters matched.
  • Not exercised: action wildcards (API change not yet deployed), external telemetry delivery, real logins, wallet operations, and organization administration.
  • CLI flags checked against the released client. Mintlify validation and broken-link checks passed.

Validation

  • All 84 public action names in the reference match the API registry after excluding internal Search actions.
  • Executed all eight TypeScript/Python policy example pairs and compared the resulting documents; each pair matched.
  • mint validate and mint broken-links passed at 734927d.

Note

Low Risk
Docs-only change with no runtime code; reviewers should still verify alignment with shipped API behavior before merge, since misdocumented auth rules could cause production misconfiguration.

Overview
Documentation expands how scoped API keys, policies, and app runtime interact across deploy, telemetry, projects, and the CLI.

A new info/api-key-policy-examples page (wired into docs.json) adds TypeScript/Python policy snippets for common workloads. info/api-key-permissions is reworked into a fuller reference: selector shapes, resource kinds, action wildcards, per-domain action tables, and multi-action prerequisites for browsers, pools, auth, apps, and API key delegation.

info/api-keys replaces the old deployment-key story with app runtime policy (runtime_policy on POST /deployments, default callback-only invocations:write for scoped deployers, invoker/deployer grants). It also documents api_keys:set_policy, child-key delegation, api_keys:issue_beyond_expiry, and stricter expiry/rotation rules.

Related touchpoints: apps/deploy (scoped deploy + reserved KERNEL_API_KEY), browsers/telemetry/export (org vs project scope and telemetry policy actions), info/projects / reference/cli/* (X-Kernel-Project, OAuth consent, CLI --policy and list filters), and info/authentication link updates.

Reviewed by Cursor Bugbot for commit 0071f0a. Bugbot is set up for automated code reviews on this repo. Configure here.

@mintlify

mintlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Kernel 🟢 Ready View Preview Nov 25, 2026, 12:56 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread info/api-key-policy-examples.mdx Resolved
Comment thread apps/deploy.mdx Resolved
Comment thread apps/deploy.mdx Resolved
Comment thread apps/deploy.mdx Resolved
Comment thread apps/deploy.mdx Resolved
Comment thread browsers/telemetry/export.mdx Resolved
Comment thread info/api-keys.mdx Resolved

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread info/api-keys.mdx Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 37f82be. Configure here.

Comment thread info/api-keys.mdx Resolved

This branch was successfully deployed

1 active deployment
staging — 0071f0a4 Deployed Nov 25, 2026 by mintlify[bot]
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