Repository navigation
Add OidcTokenBinding types for oidc_tokens bindings - #8739
Conversation
An oidc_tokens binding issues OpenID Connect tokens for the Worker's own identity, for the audience set in its config. Its getToken() returns a newly signed JWT, valid for 5 minutes, with a new jti on each call. The generated snapshots were updated by hand: Bazel couldn't fetch its registry here, so CI's snapshot check verifies them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
This pull request's reviews are posted as pull request reviews: see the review of |
|
I have read the CLA Document and I hereby sign the CLA |
|
clanky review |
edevil
left a comment
There was a problem hiding this comment.
The types match the agreed spec, and the doc comments match what oidc-binding does (5-minute exp, a new jti per call). Two small wording suggestions inline.
There was a problem hiding this comment.
⚠️ Out of date: this review is ofd81134b0; the pull request is now atf6c1a445. Someone with write access can commentclanky review(orclanker reviewor@clanky-the-clanker review) to review the new commits.
✅ Approved — A type-only addition that follows the repository's conventions for defines. The only open points are two doc-comment wording nits that are already raised in the discussion.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
The interface name has the product prefix, the snapshots match the define at the alphabetical insertion point, and the .ts/.d.ts forms match the entries around them. The open binding-name wording point is covered in the summary.
📝 Documentation: ✅ LGTM
The doc comments describe the current behaviour: one audience per binding, a 5-minute validity and a new jti per call. The suggestions to mention the Durable Object namespace subject and the singular binding name are covered in the summary.
Reviewed commit: d81134b0
Co-authored-by: André Cruz <andre@cabine.org>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8739 +/- ##
==========================================
- Coverage 67.44% 67.40% -0.05%
==========================================
Files 835 836 +1
Lines 213242 213602 +360
Branches 32469 32470 +1
==========================================
+ Hits 143825 143976 +151
- Misses 50327 50537 +210
+ Partials 19090 19089 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds the
OidcTokenBindinginterface for the newoidc_tokensbinding. The binding issues OpenID Connect tokens for the Worker's own identity, for the one audience set in its config.getToken()returns a newly signed JWT, valid for 5 minutes, with a newjtion each call.The binding is implemented by a Cloudflare-internal JSRPC entrypoint, so this PR adds only the type:
types/defines/oidc-token.d.ts, plus the matching entries in the generated snapshots.I updated the four
types/generated-snapshotfiles by hand, inserting the define where the alphabetical concatenation puts it, because Bazel couldn't fetch its registry on my machine. CI's snapshot check verifies them.Wrangler emits
OidcTokenBindinginwrangler typesoutput, in a companion workers-sdk PR, so it would be good to land this one first.🤖 Generated with Claude Code