Skip to content

feat(auth): per-device session metadata, dependabot fold-in, domain drift fixes - #746

Merged
ivanball merged 2 commits into
mainfrom
chore/domain-drift-and-deps
Nov 17, 2026
Merged

ivanball merged 2 commits into
mainfrom
chore/domain-drift-and-deps

Conversation

@ivanball

Copy link
Copy Markdown
Owner

Three changes for v1.298.0, from the Domain-projects drift review (harness Docs/Planning/Drift/DomainProjects-plan.md).

1. Per-signed-in-device metadata (owner decision)

  • RefreshSession gains seven nullable [Pii] Device* fields (id, name, model, manufacturer, platform, form factor, type; max 256). CreateSuccessor carries them across rotation and Anonymize clears them.
  • PUT auth/sessions/current/device (AuthControllerBase, [Authorize]) records them on the caller's own live session, resolved from the access token's sid claim. Another user's, revoked, expired or unknown session: 404, nothing written.
  • The MAUI side: MauiDeviceMetadataReporter sends DeviceInfo plus a per-install id (mmca.device.installationId) after every sign-in (AuthUIService.AuthenticateAsync), and once per process after a successful token refresh (SecureStoreTokenStorageService), so sessions that predate this release are backfilled. Best effort, 3 s bound; a failed report is retried on the next refresh. Web heads keep a no-op reporter.
  • The signed-in devices list, sign-in history and admin sessions view label a device as "{Name} ({Model} on {Platform})" and fall back to the user-agent label.
  • DeviceMetadata replaces the unused AuthenticationRequest record (Removed).
  • Consumers need a migration for the seven RefreshSessions columns, plus PRIVACY.md inventory rows.

2. Dependabot fold-in (supersedes #743 and #744)

The grouped minor/patch bumps plus Scalar.AspNetCore 3.0.0. Both PRs were red only because lock files were not regenerated (NU1004). All lock files are regenerated here, including the out-of-slnx ones. The Testcontainers family is aligned on 4.17.0. MapScalarApiReference needs no change on 3.0, and /scalar/{documentName} still serves the bundled script.

3. Domain drift

  • A8: SoftDeleteEnforcementTestsBase always allows Common's six row-erasing framework types, so consumers drop their copies. AllowedHardDeleteTypes stays the app extension point.
  • B8b: the IErasableUser / DeleteUserHandlerBase docs drop the narrative about an app User hiding Delete(). ADC removes its hide in its bump PR.

Verification (local)

  • dotnet build MMCA.Common.slnx -c Release: 0 warnings, 0 errors
  • dotnet test --solution MMCA.Common.slnx -c Release: 23593 passed, 0 failed
  • Locked restore: clean (slnx plus the out-of-slnx projects)
  • UI.Maui build, net10.0-android and net11.0-android: clean
  • FACTS --check: up to date
  • Helpdesk source build and tests against this tree: 202 passed. The Helpdesk consumer check needs MMCA.Helpdesk test: pin rate-limit attribute inheritance on AuthControllerBase overrides #232 (pin alignment) merged first.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uf2x9Tvm2rtLRjMjHxXwHg

ivanball and others added 2 commits November 16, 2026 22:36
…rasableUser doc trim

- Directory.Packages.props: the grouped minor-and-patch bumps (#743) and
  Scalar.AspNetCore 3.0.0 (#744); every packages.lock.json regenerated,
  including the ones outside the slnx. MapScalarApiReference compiles and
  serves /scalar/{documentName} with bundled assets unchanged on 3.0.
- SoftDeleteEnforcementTestsBase always allows Common's six row-erasing
  framework types; AllowedHardDeleteTypes stays the app extension point.
  Consumers can drop their copies.
- IErasableUser / DeleteUserHandlerBase: drop the narrative about an app
  User hiding Delete(); no consumer does any more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uf2x9Tvm2rtLRjMjHxXwHg
- RefreshSession gains seven [Pii] Device* fields (id, name, model,
  manufacturer, platform, form factor, type), carried across rotation by
  CreateSuccessor and cleared by Anonymize.
- PUT auth/sessions/current/device records them on the caller's own live
  session, resolved from the access token's sid claim (404 otherwise).
- MAUI: MauiDeviceMetadataReporter reports DeviceInfo plus a per-install id
  after every sign-in, and once per process after a successful token refresh
  so sessions that predate this release are backfilled; a failed report is
  retried on the next refresh. Web heads keep a no-op reporter.
- The signed-in devices list, sign-in history and admin sessions view show the
  device when present and fall back to the user-agent label.
- DeviceMetadata replaces the unused AuthenticationRequest record.
- Testcontainers family aligned on 4.17.0.

Consumers need a migration for the seven nullable RefreshSessions columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uf2x9Tvm2rtLRjMjHxXwHg
@ivanball
ivanball merged commit 0788aad into main Nov 17, 2026
39 of 40 checks passed
@ivanball
ivanball deleted the chore/domain-drift-and-deps branch November 17, 2026 04:36
ivanball added a commit that referenced this pull request Nov 17, 2026
* feat(ui): UI drift wave (update idempotency key, Cancel-first confirm, read cache removed)

- C1: EntityServiceBase.UpdateAsync sends an Idempotency-Key beside If-Match, minted once
  outside the retry, so an update that landed and lost its response is replayed by the
  server instead of answering a false 412. DELETE unchanged.
- B2: IAppDialogService.ConfirmAsync opens the Cancel-first ConfirmationDialog (the
  generalized DeleteConfirmationDialog): Cancel first and focused, Escape answers false.
  New overload with bool destructive (error-colored confirm); lock, sign out a device or
  every device, remove a passkey and leave unsaved changes use it.
- C5: remove IUiReadCache, UiReadCache, UiReadCacheOptions and every constructor parameter
  and Clear() call that served them; GetCachedAsync becomes the plain SendGetAsync.
- A9: remove LayoutSettings.HideNotificationPagesWhenUnregistered and
  ClearToastsOnNavigation; the notification pages answer 404 whenever no
  NotificationUIModule is registered, and MainLayout always renders StaleToastSweeper.
- A10: UIModuleConfiguration.IsModuleEnabled adopts the ADR-059 server rule (a missing
  module is off), and /client-config always forwards a modules section with each head
  module's resolved enabled flag; Modules is a reserved ClientConfigBuilder name.
- A12: an ErrorBoundary around the page body in MainLayout, with a localized alert and
  Retry, recovered on every navigation.
- A6: PageE2ECoverageTestsBase fails on a stale allowlist entry (no page, or a page an
  E2E test now reaches).

Dependabot #750 needs nothing here: its bumps already landed on main in #746.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uf2x9UumHdyUmE76PPaVYE

* chore: regenerate FACTS (Common executes 746 fitness methods)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uf2x9UumHdyUmE76PPaVYE

* release: stamp v1.301.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uf2x9UumHdyUmE76PPaVYE

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant