From abbf6ac55e030aefdc90f5422fa7b9481b90c9ea Mon Sep 17 00:00:00 2001 From: pieroviano Date: Sun, 13 Sep 2026 07:32:54 +0300 Subject: [PATCH] Track P12 JWT introspection in the parity plan and report --- docs/plans/duende-parity-plan.md | 14 +++++++++++++- docs/reports/duende-parity-report.md | 18 +++++++++--------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/docs/plans/duende-parity-plan.md b/docs/plans/duende-parity-plan.md index 7249c7bc..6f72dc79 100644 --- a/docs/plans/duende-parity-plan.md +++ b/docs/plans/duende-parity-plan.md @@ -32,7 +32,8 @@ Baseline `dev@dd0d5d7d` (8.0.0-preview.5, fork of upstream). **Plan only — do | P8b CIBA client | ✅ | `b67cf1f3` | `OpenIddictClientService.ChallengeUsingBackchannelAsync` / `AuthenticateWithBackchannelAsync` | | P10 key management | ✅ | `4d19d539` | RSA-2048 sig (RS256) + enc (RSA-OAEP) keys. Key entity in EF Core/EF6/MongoDB. `OpenIddictServerKeyRing` resolves credentials per transaction (`Transaction.Credentials`). Protector: `IOpenIddictServerKeyProtector` (in `OpenIddict.Server`, default via `UseDataProtection()`). Quartz pruning is opt-in (`EnableKeyPruning`). | | P5 DPoP | ✅ server + validation + client | `0dae3a9d`, `0a732595`, `dbc144f5` | Opt-in (`EnableDPoPSupport`, `EnableDPoPTokenBinding`). Shared helper `shared/OpenIddict.Extensions/IdentityModel/OpenIddictDPoPHelpers.cs`. Server replay: redeemed token entry (reference id = `jkt.jti`). Nonces: signed JWT (server keys), server only. Validation replay: optional `IDistributedCache`. See deviations below. | -| P12, P11.x | ⏳ | — | — | +| P12 JWT introspection | ✅ server + client + validation | `f1ff44d8`, `811b913a`, `a2c44c5a`, `9d913f9a`, `0152298e` | Opt-in (`EnableJsonWebTokenIntrospectionResponses`, `RequireJsonWebTokenIntrospectionResponses`). Token generated through `GenerateTokenContext` (`TokenTypeIdentifiers.Private.IntrospectionResponse`), signed with the first asymmetric key from `OpenIddictServerKeyRing.ResolveCredentialsAsync`. See deviations below. | +| P11.x | ⏳ | — | — | **P5 deviations** @@ -47,6 +48,17 @@ Baseline `dev@dd0d5d7d` (8.0.0-preview.5, fork of upstream). **Plan only — do | Client retry | `use_dpop_nonce` retry resends the same `client_assertion`; servers with assertion `jti` replay checks reject it | | Review fixes | Proof key resolved from a minimal JWK (`x5c` key substitution); `alg` must match `kty`/`crv` | +**P12 deviations** + +| Item | Behaviour | +|---|---| +| Opt-in | No per-client permission; any authenticated confidential client sending `Accept: application/token-introspection+jwt` gets a JWT when the option is on | +| JSON fallback | Errors, anonymous callers (no `client_id`) and public clients (non-degraded mode) get plain JSON | +| Encryption | Only when the client JWKS has an RSA `use: enc` key (`alg` absent or `RSA-OAEP`); fixed RSA-OAEP / A256CBC-HS512; no `introspection_encrypted_response_*` client metadata; not in degraded mode | +| Claims | `iss`, `aud`, `iat`, `token_introspection` only (no `exp`/`jti`) | +| Accept parsing | Explicit media type only (`*/*` ignored, `q=0` honoured) | +| Client/validation | Decryption uses the client/validation encryption credentials; `Accept` is replaced (not appended); JSON error responses still accepted | + ## 0. Blocking — verify before coding | # | Verify | How | diff --git a/docs/reports/duende-parity-report.md b/docs/reports/duende-parity-report.md index 9d685e59..d846ffe2 100644 --- a/docs/reports/duende-parity-report.md +++ b/docs/reports/duende-parity-report.md @@ -4,7 +4,7 @@ |---|---| | Date | 2026-09-13 | | OpenIddict baseline | 8.0.0-preview.5 (`dd0d5d7d`, identical to upstream `dev`) | -| Fork state | Linear stack on `dev`, not pushed: `docs/duende-parity-plan` → `feature/jar` → `feature/ciba` → `feature/ciba-client` → `feature/key-management` → `feature/dpop` | +| Fork state | Linear stack on `dev`, not pushed: `docs/duende-parity-plan` → `feature/jar` → `feature/ciba` → `feature/ciba-client` → `feature/key-management` → `feature/dpop` → `feature/jwt-introspection` | | Duende reference | IdentityServer 8.0.7 (June 2026) | | Detailed plan | [`docs/plans/duende-parity-plan.md`](../plans/duende-parity-plan.md) | @@ -13,7 +13,7 @@ Legend: ✅ available · 🟢 implemented in this fork (not upstream) · ⚠️ ## 1. Summary - **Protocol core is already at parity:** authorization code + PKCE, client credentials, refresh, device flow, token exchange, PAR, mTLS (client auth + bound tokens), `private_key_jwt`, introspection, revocation, resource indicators, `iss` response parameter. -- **Closed in this fork:** JAR (server + client), CIBA poll mode (server + client), automatic key management, DPoP (server + validation + client). +- **Closed in this fork:** JAR (server + client), CIBA poll mode (server + client), automatic key management, DPoP (server + validation + client), JWT introspection responses (server + client + validation). - **Largest remaining gaps:** logout and sessions (back-channel logout, session management), dynamic client registration, SAML, and BFF/dynamic providers. - **Upstream is working on two of them:** back-channel logout (#2175) and DCR (#2404) are milestoned for `8.0.0-preview.5`, so the fork waits. @@ -33,7 +33,7 @@ Legend: ✅ available · 🟢 implemented in this fork (not upstream) · ⚠️ | RP-side logout in client stack | n/a | ❌ | ⏸ P4 | | DPoP (RFC 9449, incl. nonces) | ✅ | 🟢 server + validation + client | Done (P5) | | JARM (`response_mode=jwt`) | ❌ | ❌ | ⛔ not parity | -| JWT introspection response (RFC 9701) | ✅ | ❌ | P12 | +| JWT introspection response (RFC 9701) | ✅ | 🟢 server + client + validation | Done (P12) | | Dynamic client registration (RFC 7591) | ✅ (Configuration API) | ❌ | ⏸ P9 (upstream #2404) | | DCR management (RFC 7592) | ❌ | ❌ | Included in P9 | | Automatic key management | ✅ signing keys (90 d rotate / 14 d announce / 14 d retain) | 🟢 signing + encryption | Done (P10) | @@ -62,19 +62,19 @@ Legend: ✅ available · 🟢 implemented in this fork (not upstream) · ⚠️ | P8 CIBA (server) | `bbd52cbf` | Backchannel endpoint and pass-through, `urn:openid:params:grant-type:ciba`, `OpenIddictServerService` (list / approve / reject), discovery metadata. | Requires `SetIssuer`, token storage and non-degraded mode. **Device flow now returns `interval` and enforces `slow_down`**; disable with `SetPollingInterval(null)`. | | P8b CIBA (client) | `b67cf1f3` | `AllowClientInitiatedBackchannelAuthenticationFlow()`, `OpenIddictClientService.ChallengeUsingBackchannelAsync` / `AuthenticateWithBackchannelAsync`, discovery extraction. | Poll mode only. PAR requirement now enforced only for interactive flows. | | P5 DPoP | `0dae3a9d` `0a732595` `dbc144f5` | Server: `EnableDPoPSupport()`, `RequireDPoP()`, `RequireDPoPNonces()`, per-client `ft:dpop`, `dpop_jkt`, discovery `dpop_signing_alg_values_supported`. Validation: `DPoP` scheme, optional `IDistributedCache` replay cache. Client: `EnableDPoPTokenBinding()`, `DPoPSigningCredentials`, `CreateDPoPProofAsync`. | Opt-in. `cnf.jkt` on access tokens and public-client refresh tokens; `token_type=DPoP`. Server replay check writes one token entry per proof (token storage only). | +| P12 JWT introspection | `f1ff44d8` `811b913a` `a2c44c5a` `0152298e` | Server: `EnableJsonWebTokenIntrospectionResponses()`, `application/token-introspection+jwt` in ASP.NET Core/OWIN, discovery `introspection_signing_alg_values_supported` / `introspection_encryption_*`. Client: `OpenIddictClientRegistration.RequireJsonWebTokenIntrospectionResponses`. Validation: `RequireJsonWebTokenIntrospectionResponses()`. | Opt-in. Errors, anonymous and public clients get JSON. Encrypted only if the client JWKS has an RSA `enc` key. | | P10 automatic key management | `4d19d539` | New **Key** entity (EF Core `OpenIddictKeys` table, EF6, MongoDB `openiddict.keys`), `IOpenIddictKeyManager`. Server: `EnableAutomaticKeyManagement()`, `OpenIddictServerKeyRing`, `IOpenIddictServerKeyProtector` (in `OpenIddict.Server`; Data Protection implementation via `UseDataProtection()`). Local validation follows rotation. Quartz: `EnableKeyPruning()`. | Schema change for every EF user. Static keys still used, after the active auto key. `UseDataProtection()` also switches token formats unless `PreferDefaultTokenFormat()`. | -Latest runs, all green (DPoP suites from `dbc144f5`, MongoDB/Quartz/EF/core from `4d19d539`): server unit 704 · ASP.NET Core integration 1,569 · OWIN integration 1,539 · core 661 · client 182 · abstractions 1,451 · MongoDB 36 · Quartz 34 · validation 103 · validation ASP.NET Core / OWIN integration 30 / 30 · EF Core 10 · EF6 7 · Data Protection 1. +Latest runs, all green (P12 suites from `0152298e`, MongoDB/Quartz/EF/core from `4d19d539`): server unit 706 · ASP.NET Core integration 1,586 · OWIN integration 1,556 · core 661 · client 196 · abstractions 1,451 · MongoDB 36 · Quartz 34 · validation 118 · validation ASP.NET Core / OWIN integration 30 / 30 · EF Core 10 · EF6 7 · Data Protection 1. ## 5. Remaining work (ordered) | # | Phase | Size | Dependency / risk | |---|---|---|---| -| 1 | P12 JWT introspection | S | — | -| 2 | P11.2 dynamic providers | M | Client registration lifecycle refactor | -| 3 | P11.3 BFF | M | YARP dependency (approved) | -| 4 | P11.4 / P11.5 templates, admin API | M | New template pack (approved) | -| 5 | P11.6 SAML | XL | New package; XML signature attack surface | +| 1 | P11.2 dynamic providers | M | Client registration lifecycle refactor | +| 2 | P11.3 BFF | M | YARP dependency (approved) | +| 3 | P11.4 / P11.5 templates, admin API | M | New template pack (approved) | +| 4 | P11.6 SAML | XL | New package; XML signature attack surface | | — | P1, P2, P4, P9, P11.1 | L | Blocked until upstream `8.0.0-preview.5` is merged | ## 6. Risks