Skip to content

feat(codemode): scope OpenAPI OAuth by caller - #703

Merged
jmagar merged 2 commits into
mainfrom
feat/user-scoped-openapi-20260919
Sep 20, 2026
Merged

jmagar merged 2 commits into
mainfrom
feat/user-scoped-openapi-20260919

Conversation

@jmagar

@jmagar jmagar commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add oauth_upstream to Code Mode OpenAPI specs for caller-subject-scoped OAuth
  • resolve bearer tokens at dispatch time from the authenticated caller subject using the existing upstream OAuth store and refresh path
  • keep static credentials admin/trusted-local only and fail closed for missing subject, scoped routes, conflicting auth, and missing caller credentials
  • update canonical Code Mode, OAuth, runtime config, and crate docs

Security properties

  • user tokens never enter the OpenAPI registry or JavaScript sandbox
  • no fallback from a user subject to another subject or shared operator credential
  • subject-scoped operations require an authenticated unscoped executor
  • lower-level OpenAPI dispatch rejects subject-scoped calls without an injected caller credential

Verification

  • cargo test -p labby-openapi: 29 passed; 1 network smoke intentionally ignored
  • subject-scoped Code Mode authorization regression: passed
  • OpenAPI OAuth config regressions: 3 passed
  • strict Clippy on affected crates/all features/all targets with -D warnings: passed
  • cargo fmt --all -- --check and git diff --check: passed
  • just docs-check: 17 generated artifacts fresh, 611 links verified, 125 canonical docs validated, 5 contract tests passed

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 20, 2026
@jmagar
jmagar force-pushed the feat/user-scoped-openapi-20260919 branch from dc28c95 to a6842f5 Compare September 20, 2026 04:38
@jmagar
jmagar requested a lite review from Copilot September 20, 2026 04:43

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jmagar
jmagar force-pushed the feat/user-scoped-openapi-20260919 branch from a6842f5 to 41b0791 Compare September 20, 2026 05:43
@jmagar
jmagar force-pushed the feat/user-scoped-openapi-20260919 branch from 41b0791 to 3d835f1 Compare September 20, 2026 05:52
@jmagar
jmagar merged commit e530772 into main Sep 20, 2026
70 checks passed
@jmagar
jmagar deleted the feat/user-scoped-openapi-20260919 branch September 20, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants