diff --git a/docs/plans/duende-parity-plan.md b/docs/plans/duende-parity-plan.md index 36f8f980..3eecf404 100644 --- a/docs/plans/duende-parity-plan.md +++ b/docs/plans/duende-parity-plan.md @@ -31,7 +31,18 @@ Baseline `dev@dd0d5d7d` (8.0.0-preview.5, fork of upstream). **Plan only — do | P8 CIBA | ✅ server (poll) | `bbd52cbf` | Requires `SetIssuer`, token storage and non-degraded mode (ID0529). Completion goes through `OpenIddictServerService`. `slow_down`/`interval` also apply to the device flow. Signed CIBA requests and mTLS alias are not implemented. | | 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, P12, P11.x | ⏳ | — | — | +| 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 | ⏳ | — | — | + +**P5 deviations** + +| Item | Behaviour | +|---|---| +| Replay (server) | Entry created as `redeemed` (no separate `TryRedeemAsync`); concurrent duplicates rely on the store's unique `ReferenceId` (EF6 has none) | +| Replay (validation) | `IDistributedCache` get-then-set, not atomic | +| Nonces | Returned only with `use_dpop_nonce` errors; not issued by the validation stack | +| Confidential clients | Refresh tokens not bound; no Bearer-downgrade check on refresh | +| Client | One `use_dpop_nonce` retry; nonces cached per authority in memory; `dpop_jkt` not sent automatically (use `GetDPoPJsonWebKeyThumbprint`); ephemeral key lost on restart | ## 0. Blocking — verify before coding diff --git a/docs/reports/duende-parity-report.md b/docs/reports/duende-parity-report.md index c50d4560..abca73f5 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` (tip `c1322cbe`) | +| Fork state | Linear stack on `dev`, not pushed: `docs/duende-parity-plan` → `feature/jar` → `feature/ciba` → `feature/ciba-client` → `feature/key-management` → `feature/dpop` | | Duende reference | IdentityServer 8.0.7 (June 2026) | | Detailed plan | [`docs/plans/duende-parity-plan.md`](../plans/duende-parity-plan.md) | @@ -13,8 +13,8 @@ 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. -- **Largest remaining gaps:** logout and sessions (back-channel logout, session management), DPoP, dynamic client registration, SAML, and BFF/dynamic providers. +- **Closed in this fork:** JAR (server + client), CIBA poll mode (server + client), automatic key management, DPoP (server + validation + client). +- **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. ## 2. Gap matrix @@ -31,7 +31,7 @@ Legend: ✅ available · 🟢 implemented in this fork (not upstream) · ⚠️ | Front-channel logout | ✅ | ❌ | ⛔ declined upstream (third-party cookies) | | OIDC Session Management (`check_session_iframe`) | ✅ | ❌ | ⛔ same reason | | RP-side logout in client stack | n/a | ❌ | ⏸ P4 | -| DPoP (RFC 9449, incl. nonces) | ✅ | ❌ | P5 (upstream prefers mTLS) | +| DPoP (RFC 9449, incl. nonces) | ✅ | 🟢 server + validation + client | Done (P5) | | JARM (`response_mode=jwt`) | ❌ | ❌ | ⛔ not parity | | JWT introspection response (RFC 9701) | ✅ | ❌ | P12 | | Dynamic client registration (RFC 7591) | ✅ (Configuration API) | ❌ | ⏸ P9 (upstream #2404) | @@ -42,7 +42,7 @@ Legend: ✅ available · 🟢 implemented in this fork (not upstream) · ⚠️ | UI templates | ✅ | ⚠️ sandbox only | P11.4 | | Admin UI | ❌ (third-party) | ❌ | P11.5 (API only) | | SAML 2.0 IdP | ✅ built-in (v8) | ❌ | P11.6 — separate plan needed | -| FAPI 2.0 conformance report | ✅ | ❌ | Depends on DPoP (key management done) | +| FAPI 2.0 conformance report | ✅ | ❌ | Prerequisites done (DPoP, key management); conformance run pending | | Multi-issuer hosting | ✅ add-on | ❌ | Not planned | ## 3. OpenIddict strengths with no Duende equivalent @@ -61,20 +61,20 @@ Legend: ✅ available · 🟢 implemented in this fork (not upstream) · ⚠️ | P6 JAR | `d5c9bff7` | Server: `EnableRequestObjectSupport()`, `RequireSignedRequestObjects()`, per-client `ft:jar`, discovery metadata. Client: `UseSignedRequestObjects`. | Parameters outside the object are ignored (RFC 9101). Objects are validated with the client JWKS. | | 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). | | 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 (client suite from `b67cf1f3`, others from `4d19d539`): server unit 696 · ASP.NET Core integration 1,530 · OWIN integration 1,500 · core 661 · client 162 · MongoDB 36 · Quartz 34 · validation ASP.NET Core integration 20 · EF Core 10 · EF6 7 · Data Protection 1. +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 175 · 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. ## 5. Remaining work (ordered) | # | Phase | Size | Dependency / risk | |---|---|---|---| -| 1 | P5 DPoP | L | One DB write per protected request for replay protection; proxy `htu` normalization | -| 2 | P12 JWT introspection | S | — | -| 3 | P11.2 dynamic providers | M | Client registration lifecycle refactor | -| 4 | P11.3 BFF | M | YARP dependency (approved) | -| 5 | P11.4 / P11.5 templates, admin API | M | New template pack (approved) | -| 6 | P11.6 SAML | XL | New package; XML signature attack surface | +| 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 | | — | P1, P2, P4, P9, P11.1 | L | Blocked until upstream `8.0.0-preview.5` is merged | ## 6. Risks