Repository navigation
Conversation
The outbound-HTTP port (IOAuthHttpClient) and its Drogon adapter
(DrogonOAuthHttpClient) were only compiled under WITH_SOCIAL because their
sole consumer was social login. OIDC Back-Channel Logout (B1) is a core
feature that needs the same postForm() transport to deliver logout_tokens,
so the port + adapter can no longer be social-gated.
- Drop the #ifdef WITH_SOCIAL guards from IOAuthHttpClient.h and
DrogonOAuthHttpClient.{h,cc} (FakeOAuthHttpClient was already ungated).
- Move IOAuthHttpClient.h out of the social-only header group in
libs/identity/CMakeLists.txt so it is a declared public header regardless
of WITH_SOCIAL. DrogonOAuthHttpClient.cc was already always compiled by
the GLOB; its body now defines symbols unconditionally.
No behavior change for social builds; non-social builds now also provide the
port + adapter.
First slice of B1 (OIDC Back-Channel Logout 1.0): the real notifier and the
pure logout_token claim builder, with full unit coverage. Wiring into the
logout flow + admin/UI config follow in subsequent commits.
- libs/oauth2: LogoutToken.{h,cc} -- pure buildLogoutTokenClaims() (iss/sub/
aud/iat/exp/jti/events, no nonce per spec §2.4) + generateJti(). Unit tests
assert the exact claim set, exp=iat+ttl, and jti uniqueness.
- libs/drogon: BackchannelLogoutNotifier -- the real Adapter-layer
IBackchannelLogoutNotifier. notify() chains two async Mapper queries (active
tokens for the user -> distinct client_ids -> clients with a
backchannel_logout_uri, no JOIN per db-operations.md) then dispatch().
dispatch() signs a per-RP logout_token and POSTs it fire-and-forget,
auditing each attempt; logout responses are never blocked by RP round-trips.
enable_shared_from_this + per-Mapper try-catch that always reaches the
callback.
- libs/drogon/test: dispatch unit tests (D1-D6) with an ephemeral-key
JwkManager + FakeOAuthHttpClient + FakeAuditSink, including RS256 signature
verification of the logout_token against the signing key.
Not yet wired into IdentityAssembly (still uses the logging stub).
- IdentityAssembly: replace the LoggingBackchannelLogoutNotifier stub with the real BackchannelLogoutNotifier (dbClient + plugin signing key/issuer/ audit sink + the shared DrogonOAuthHttpClient). Move oauthHttpClient construction out of the WITH_SOCIAL block so the notifier always has a transport (social reuses the same instance). - SessionController: delete the dead sendBackchannelLogoutNotifications() stub; the sessionManager_==null branch (memory/no-DB configs, where there are no clients to notify) now just responds. - DiscoveryController: advertise OIDC Back-Channel Logout 1.0 support -- backchannel_logout_supported=true, backchannel_logout_session_supported= false (subject-scoped logout_tokens, no sid).
The backchannel_logout_uri column (V015) was writable nowhere -- admin API, RFC 7591 registration, and the admin UI all ignored it, so the notifier added in the previous commit could never be exercised in production. This wires the write/read path through the client admin service. - RuleSet: new validateBackchannelLogoutUri() -- OIDC §2.3 https requirement (empty == not configured), honoring the auth.allow_http_redirect_uri dev hatch; loopback NOT exempt (server-to-server). - ClientManagementService: createClient/updateClient read, validate (https), and persist backchannel_logout_uri (empty on update clears it to NULL); getClient/listClients surface backchannel_logout_uri (+ session_required on the detail endpoint). - openapi.yaml: add requestBody schemas (with backchannel_logout_uri) to POST/PUT /api/admin/clients -- these operations previously had none.
…s row Mark Backchannel Logout backend as delivered on feat/backchannel-logout-b1 (notifier + logout_token builder + admin config + discovery + unit tests D1-D6), and record that the admin-UI forms are ready but blocked by a Mimosa false-positive on pre-existing mock-api.ts fixtures, and that integration tests are pending (need PostgreSQL).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
Code Review — Back-Channel Logout (feat/backchannel-logout-b1)代码已逐文件核对(LogoutToken.cc / BackchannelLogoutNotifier.cc / SessionManager.cc / IdentityAssembly.cc / DiscoveryController.cc / 迁移 V015 / ClientManagementService.cc / RuleSet.cc)。整体实现扎实、规范对齐良好,未发现必须阻塞合入的崩溃级 bug。 以下是经代码验证的结论与建议项。 已验证正确的关键点
建议修(非阻塞)
结论可合入。上述 1/2 为合规增强建议,3 为设计说明。无必须修项。 |
- ApplicationDetailPage (Auth Config tab): editable Backchannel Logout URI, loaded from getClient and sent on save (only when changed). - ApplicationsPage (create modal): optional Backchannel Logout URI field, included in the create payload.
…overy endpoint tests - ValidatorTest: Unit_P0_Validation_BackchannelLogoutUri_AllScenarios — https valid, empty valid (not configured), scheme-less/ftp invalid; http expectations read from the live config because the test env enables auth.allow_http_redirect_uri (dev hatch honored by the validator). Loopback http is NOT free (unlike redirect_uri) — gated by the same hatch. - Admin endpoint suite (sh+ps1): Test 44 backchannel_logout_uri set/read/clear lifecycle; Test 45 non-https scheme rejected 400 (ftp:// — plain http is not a reliable negative under the dev hatch); Test 46 create client with backchannel_logout_uri + read-back + cleanup. ps1 $total 52→55. - OAuth2 endpoint suite (sh+ps1): Test 3 discovery now asserts backchannel_logout_supported=true and backchannel_logout_session_supported =false (subject-scoped logout_tokens, no sid).
Test 44/45 hit /api/admin/clients/api-service, which is a frontend e2e MOCK id — no such client exists in the seed data, so Test 44's first PUT returned 404 (Test 45 passed only because scheme validation (400) fires before the client lookup). Target the seeded vue-client instead; the lifecycle test restores it (clears to NULL) immediately.
voidvec
added a commit
that referenced
this pull request
Aug 14, 2026
…1 delivery Restores the memory-verdict updates lost when the working tree was switched to feat/user-management-crud-v2 (the previous edits were never committed), and syncs all tracking docs with the newly delivered work: Memory verdict (⚠️ → ✅, re-applied across 4 docs): - SDK embedding scope measured 2026-08-13: third-party-host-smoke (pure SDK) peak working set 2.5 MB / private 0.6 MB / binary 12 MB; full-stack-host-smoke (SDK+Drogon) also 2.5 MB peak - 50-120MB claim conservatively MET — actual SDK logic layer far below - docker stats 2.4GB is a different scope (container: pools + shared libs + page cache), not comparable to the SDK claim Newly delivered work synced: - A2 user management CRUD — IMPLEMENTED (PR #52): pagination, search, createUser, updateUser expansion, deleteUser soft-delete (V024) - D1 Backchannel Logout — BACKEND DELIVERED (PR #50): notifier + logout_token JWT + admin API + discovery + unit tests D1-D6; frontend blocked by Mimosa false-positive, integration tests pending - Phase 2 completion raised ~25% → ~45%; Phase 0 raised ~85% → ~90% - IAM audit: user mgmt + backchannel logout rows updated to delivered - next-phase plan: completed-tiers table extended, A2/B1 sections marked delivered, dependency graph + risk matrix + decision items updated (decisions 1-3 now resolved)
Owner
Author
voidvec
added a commit
that referenced
this pull request
Aug 15, 2026
…1 delivery Restores the memory-verdict updates lost when the working tree was switched to feat/user-management-crud-v2 (the previous edits were never committed), and syncs all tracking docs with the newly delivered work: Memory verdict (⚠️ → ✅, re-applied across 4 docs): - SDK embedding scope measured 2026-08-13: third-party-host-smoke (pure SDK) peak working set 2.5 MB / private 0.6 MB / binary 12 MB; full-stack-host-smoke (SDK+Drogon) also 2.5 MB peak - 50-120MB claim conservatively MET — actual SDK logic layer far below - docker stats 2.4GB is a different scope (container: pools + shared libs + page cache), not comparable to the SDK claim Newly delivered work synced: - A2 user management CRUD — IMPLEMENTED (PR #52): pagination, search, createUser, updateUser expansion, deleteUser soft-delete (V024) - D1 Backchannel Logout — BACKEND DELIVERED (PR #50): notifier + logout_token JWT + admin API + discovery + unit tests D1-D6; frontend blocked by Mimosa false-positive, integration tests pending - Phase 2 completion raised ~25% → ~45%; Phase 0 raised ~85% → ~90% - IAM audit: user mgmt + backchannel logout rows updated to delivered - next-phase plan: completed-tiers table extended, A2/B1 sections marked delivered, dependency graph + risk matrix + decision items updated (decisions 1-3 now resolved)
wangrh0909
pushed a commit
that referenced
this pull request
Aug 16, 2026
…1 delivery Restores the memory-verdict updates lost when the working tree was switched to feat/user-management-crud-v2 (the previous edits were never committed), and syncs all tracking docs with the newly delivered work: Memory verdict (⚠️ → ✅, re-applied across 4 docs): - SDK embedding scope measured 2026-08-13: third-party-host-smoke (pure SDK) peak working set 2.5 MB / private 0.6 MB / binary 12 MB; full-stack-host-smoke (SDK+Drogon) also 2.5 MB peak - 50-120MB claim conservatively MET — actual SDK logic layer far below - docker stats 2.4GB is a different scope (container: pools + shared libs + page cache), not comparable to the SDK claim Newly delivered work synced: - A2 user management CRUD — IMPLEMENTED (PR #52): pagination, search, createUser, updateUser expansion, deleteUser soft-delete (V024) - D1 Backchannel Logout — BACKEND DELIVERED (PR #50): notifier + logout_token JWT + admin API + discovery + unit tests D1-D6; frontend blocked by Mimosa false-positive, integration tests pending - Phase 2 completion raised ~25% → ~45%; Phase 0 raised ~85% → ~90% - IAM audit: user mgmt + backchannel logout rows updated to delivered - next-phase plan: completed-tiers table extended, A2/B1 sections marked delivered, dependency graph + risk matrix + decision items updated (decisions 1-3 now resolved)
voidvec
added a commit
that referenced
this pull request
Aug 17, 2026
CHANGELOG for v1.2.0 (61 commits since v1.1.0): #43 resource-scope authorization model, A2 user-management CRUD (PR #52), B1 back-channel logout backend (PR #50), A1 OpenAPI spec governance M0 + breaking-change gates (PR #63), benchmark M2-M4 load-bearing verdicts (PR #48), and the #53-#60 user-admin hardening batch (PR #62). Per the release SOP (docs/backend/versioning-and-release.md §11.1): draft via `git cliff --unreleased --tag v1.2.0 --prepend`, then hand-curated (themed sections, security-hardening migrations, noise removed). Version SSoT already bumped to 1.2.0 in e5548ec; api-diff and the new spec-governance gate verified OK on the release ref.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Real OIDC Back-Channel Logout 1.0 — replaces the
LoggingBackchannelLogoutNotifierstub. On logout the OP finds every relying party with an active session for the user and a registeredbackchannel_logout_uri, and POSTs a signedlogout_tokento each (fire-and-forget). Includes the full config path (admin API + admin UI) and endpoint test coverage.Design doc:
docs/productization-evolution/in-progress/backchannel-logout-design.md.Key finding (verified)
oauth2_access_tokens.user_idstores the public subject (public_sub), identical to theuserIdnotify()receives (TokenService.cc:172,343) and to the id_tokensub. So no subject mapping is needed — query tokens byuser_idand use it as the logout_tokensub.Changes
LogoutToken: purebuildLogoutTokenClaims()(iss/sub/aud/iat/exp/jti/events, no nonce per §2.4) +generateJti().BackchannelLogoutNotifier(Adapter layer):notify()chains two async Mapper queries (active tokens → distinct client_ids → clients with a URI; no JOIN) thendispatch()signs + POSTs per-RP, fire-and-forget, auditing each.enable_shared_from_this; per-Mapper try-catch that always reaches the callback.backchannel_logout_supported=true,backchannel_logout_session_supported=false(subject-scoped, no sid).backchannel_logout_uri(https; empty-on-update clears to NULL); get/list surface it. RuleSet —validateBackchannelLogoutUri()(https per §2.3; honors theauth.allow_http_redirect_uridev hatch; loopback NOT exempt). openapi.yaml — requestBody schemas for POST/PUT/api/admin/clients.backchannel_logout_urifield in ApplicationDetailPage (Auth Config tab) + ApplicationsPage create modal.WITH_SOCIAL.logout_token
RS256 JWT (same OP key/kid as id_token). Claims:
{iss, sub, aud=clientId, iat, exp=iat+120, jti, events={"http://schemas.openid.net/event/backchannel-logout":{}}}; no nonce. POSTed asapplication/x-www-form-urlencodedlogout_token=<jwt>.Tests (all green locally, full 8-step pipeline)
LogoutTokenTest(U1–U3) — exact claim set/no nonce, exp=iat+ttl, jti uniqueness.BackchannelLogoutNotifierTest(D1–D6) — per-client fan-out with matching aud/sub, skip empty URI, transport failure audited + others still notified, non-200=failure/200=success, RS256 signature verifies against the signing key (kid matches), completion-after-dispatch.Unit_P0_Validation_BackchannelLogoutUri_AllScenarios— scheme policy incl. loopback-not-exempt.Follow-ups (not blocking)
sidissuance (clients withbackchannel_logout_session_required=true— documented gap); cross-client token revocation on logout; configurable HTTP timeout/retry; RP response-body validation; RFC 7591backchannel_logout_uri.Safety
Default config (no client has a
backchannel_logout_uri) → zero POSTs, identical to prior behavior.