Repository navigation
feat: resolve telemetry endpoint from JWT aud claim (v0.22.2) - #95
Conversation
The tenant's meter URL comes from the standard JWT `aud` (audience) claim instead of the custom `telemetry_endpoint` claim — the token's intended recipient is the tenant's meter host, so `aud` is the semantically correct, standards-based place for it. - getEndpointFromTokenAllowExpired reads `aud` only (string or array per RFC 7519, first http(s) URL wins); no legacy fallback - SKILLMETER_BACKEND_URL override unchanged - tests cover aud-string / aud-array / no-aud-url / legacy-ignored Backend dependency: the activation Lambda must mint the meter URL into `aud`. Since license JWTs are short-lived (~15 min), any in-flight `telemetry_endpoint` tokens age out quickly; deploy the issuer change alongside this. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoEUHYQTz1Tx61FcteE979
Release the JWT `aud` endpoint-resolution change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoEUHYQTz1Tx61FcteE979
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR changes JWT-based telemetry endpoint resolution from reading a ChangesJWT aud-based endpoint resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Switch the tenant meter-endpoint resolution to the standard JWT
aud(audience) claim instead of the customtelemetry_endpointclaim. The token's intended recipient is the tenant's meter host, soaudis the semantically correct, standards-based place for it.Changes
getEndpointFromTokenAllowExpiredreadsaudonly (string or array per RFC 7519; firsthttp(s)URL wins). No legacy fallback.telemetry_endpointclaim is ignored.SKILLMETER_BACKEND_URLoverride unchanged; single resolution point injwt.js(transfer.js consumers untouched).The activation Lambda must mint the meter URL into
aud. It currently mintstelemetry_endpoint; with this change a token lacking anaudURL resolves tonull→ upload is skipped and the payload stays queued (safe, no data loss). License JWTs are ~15 min TTL, so once the issuer emitsaud, resolution converges quickly.Verification
node --test→ 55/55 passclaude plugin validate skillmeter✔🤖 Generated with Claude Code
Summary by CodeRabbit