Skip to content

feat: mount the admin API at the router root by default - #318

Merged
rsharath merged 2 commits into
mainfrom
feat/admin-root-mount
Sep 4, 2026
Merged

feat: mount the admin API at the router root by default#318
rsharath merged 2 commits into
mainfrom
feat/admin-root-mount

Conversation

@rsharath

@rsharath rsharath commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

BREAKING: DefaultAdminPathPrefix changes from "/api/v1" to "" — admin routes now serve at the server root.

The current highflame SDKs (Python and TypeScript, ≥0.3.23) address admin routes at the server root, matching the SaaS deployment shape — so against a stock OSS deployment every admin call 404ed, and the repo was frozen on 0.3.17 pins throughout CI. Nothing inside the org consumes /api/v1, so rather than adding a path knob to two SDKs, this aligns the OSS default with the shape the SDKs already speak: pip install highflame / npm install @highflame/sdk now work against a stock deployment with zero config.

Deployments that scripted against /api/v1 keep the old shape with one line: server.admin_path_prefix: "/api/v1" (or ZEROID_ADMIN_PATH_PREFIX).

Changes

  • server: root-mounted admin huma instances register speclessly — a spec-carrying instance at the root shadowed the canonical /openapi.json behind the agent-auth 401 middleware (caught by TestOAuthFormCompatOpenAPIAdvertisesFormContentType)
  • CI: all SDK pins 0.3.17 → 0.3.23 (Python smoke, TypeScript smoke, notebook check)
  • CLI: @highflame/sdk ^0.3.9 → ^0.3.23; tokens.issueissueApiKey; CIBA --admin-prefix default now matches the server; test mocks moved to root paths plus a mint handler for the SDK's admin-token exchange (0.3.23 authenticates admin calls when constructed with an apiKey)
  • CLI test isolation: profile reads/writes now honor ZID_CONFIG_DIR — the init tests were silently writing profiles into the developer's real ~/.config/zeroid
  • quickstart: tokens.revoke requires RFC 7009 client authentication in 0.3.23 — the notebook now passes the OAuth client credentials
  • docs: attestation.md / dpop-and-dcr.md examples use root admin paths

Verification

  • go vet; 497 unit + 680 integration tests with -race (integration tests derive paths from DefaultAdminPathPrefix, so they exercised the new mount)
  • 110/110 CLI tests on SDK 0.3.23
  • Quickstart notebook executed end-to-end (nbmake) against a fresh compose build with highflame==0.3.23
  • Both SDK client modes verified live against a root-mounted server: unauthenticated dev mode and api_key= (admin-bearer mint + authenticated identities.list)

Follow-up

PR #317's ODIS notebooks/README still document 0.3.17 + /api/v1; once this merges I'll rebase #317, migrate its raw-HTTP paths, and re-execute both notebooks.

🤖 Generated with Claude Code

BREAKING: DefaultAdminPathPrefix changes from "/api/v1" to "" — admin
routes (identities, agents, credential-policies, signals, attestation,
oauth/clients, delegations) now serve at the server root, matching the
SaaS deployment shape and what the highflame SDKs expect from 0.3.23
(both the Python and TypeScript SDKs address admin routes at the root,
so they 404ed against a stock deployment). Deployments that scripted
against /api/v1 set server.admin_path_prefix: "/api/v1" (or
ZEROID_ADMIN_PATH_PREFIX) to keep the old shape.

- server: when the admin group shares the router root, register its huma
  instances speclessly — a spec-carrying instance there shadowed the
  canonical /openapi.json behind the agent-auth 401 middleware
  (TestOAuthFormCompatOpenAPIAdvertisesFormContentType caught it)
- CI: bump SDK pins to 0.3.23 (python smoke, TS smoke, notebook check)
- CLI: bump @highflame/sdk ^0.3.9 → ^0.3.23; tokens.issue → issueApiKey;
  CIBA admin-prefix default "" to match the server; test mocks moved to
  root paths and given a mint handler for the SDK's admin-token exchange
  (0.3.23 authenticates admin calls when constructed with an apiKey)
- CLI tests: isolate profile reads/writes via ZID_CONFIG_DIR — init tests
  were writing profiles into the developer's real ~/.config/zeroid
- quickstart: tokens.revoke now requires RFC 7009 client auth in 0.3.23;
  pass the OAuth client credentials (verified end-to-end via nbmake
  against a fresh compose build; ipynb re-normalized by nbformat)
- docs: attestation.md / dpop-and-dcr.md examples use root admin paths

Verified: go vet, 497 unit + 680 integration tests (race), 110 CLI tests,
quickstart notebook executed against the rebuilt compose stack with
highflame==0.3.23.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​highflame/​sdk@​0.3.9 ⏵ 0.3.2378 +11009997 +3100

View full report

@rsharath
rsharath requested a review from saucam September 4, 2026 01:15
sdk-integration.yml still pinned 0.3.17 (missed alongside pr-check.yml),
and both smoke suites called tokens.revoke without client credentials,
which 0.3.23 refuses client-side per RFC 7009.

- token-lifecycle tests: deactivate the agent instead (the SDK's own
  guidance for clientless revocation) and assert introspection dies
- Python delegation test: authenticate the revoke with the confidential
  client the flow already creates
- TS delegation test: the TS SDK's tokens.revoke cannot carry client
  credentials yet (body is just {token}) — deactivate the subject
  identity instead; SDK gap noted inline

Verified locally against a root-mount server build: Python smoke 8/8,
TypeScript smoke 8/8 (testcontainers, SDK 0.3.23).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rsharath
rsharath merged commit d2531cd into main Sep 4, 2026
11 checks passed
rsharath added a commit that referenced this pull request Sep 4, 2026
…3.23

Follows #318 (admin API at the router root by default; SDK pins at
0.3.23). The raw-HTTP walkthrough's admin calls drop the /api/v1 prefix,
the SDK walkthrough pins highflame==0.3.23 (which speaks the root-mounted
admin plane natively), and the statement re-pins its evidence commit to
current main (d2531cd: #304's require_dpop/attestation/CIBA fixes plus
#318's root mount). The L1-09 caveat stands — 0.3.23 still cannot
construct DPoP proofs (sdk#105). Both notebooks re-executed against a
fresh compose build of this branch; committed outputs real, secrets lint
clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants