Skip to content

[WAL-1348] feat(mdoc): implement Wi-Fi Aware retrieval - #2168

Draft
szijpeter wants to merge 5 commits into
feature/wal-1347-nfc-wallet-demosfrom
feature/wal-1348-wifi-aware-retrieval
Draft

[WAL-1348] feat(mdoc): implement Wi-Fi Aware retrieval#2168
szijpeter wants to merge 5 commits into
feature/wal-1347-nfc-wallet-demosfrom
feature/wal-1348-wifi-aware-retrieval

Conversation

@szijpeter

@szijpeter szijpeter commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the mandatory ISO mdoc Wi-Fi Aware holder baseline for WAL-1348 on top of the WAL-1347 demo stack.

The implementation follows the proximity architecture contract: shared code owns protocol semantics and lifecycle, Android owns the platform integration, and unsupported platforms report precise capability/remediation information. Exact-build physical evidence and the public ISO holder-test plan are tracked in WAL-1349 architecture PR #61.

What Changed

Protocol and transport

  • Adds the transaction-derived service name and NCS-SK-128 passphrase derivation, strict ISO HTTP exchange, bounded framing, transport ownership, cancellation, timeout, and deterministic cleanup.
  • Extends NFC carrier encoding/selection for application/vnd.wfa.nan, including exact cipher-suite, passphrase, band, and selected-carrier rules.
  • Shares one prepared Wi-Fi Aware transport across QR and NFC engagement paths so the selected bearer owns a single platform session.

Platform capability

  • Adds an Android API 33+ publisher/NDP responder over WifiAwareManager, an IPv6 link-local TCP listener, explicit NCS-SK-128 security, platform/feature/permission/resource checks, and truthful 2.4 GHz band advertising.
  • Reports Wi-Fi Aware as unsupported on iOS because Apple's public paired-device/static-service API cannot express the ISO transaction-derived service and security setup.
  • Keeps NCS-PK-2WDH-128 unadvertised rather than silently weakening or substituting the mandatory shared-key mode.

SDK, demos, and documentation

  • Extends the Kotlin and Swift proximity configuration, capability, remediation, factory-injection, and lifecycle surfaces without changing existing defaults.
  • Wires capability and recovery status into the Compose Android, Compose iOS, and native SwiftUI demos.
  • Extends demo preflight to execute SDK-reported Nearby Wi-Fi and local-network permission actions, rechecking the selected configuration before any presentation session is created. Android permissions that the OS will no longer prompt for become an explicit Open app settings action and are rechecked when the holder returns.
  • Documents the protocol boundary, platform requirements, security choice, unsupported-platform behavior, source comparison, and remaining qualification gates.

Architecture Notes

  • The implementation is independently authored from the ISO contract and platform APIs. Pinned Multipaz behavior is used only as a differential interoperability reference; no source or runtime dependency is copied.
  • Optional NCS-PK-2WDH-128 remains follow-up work gated on a canonical Wi-Fi NAN 3.1 source and independent physical reader evidence. It is not required for the mandatory NCS-SK-128 holder baseline delivered here.
  • Android advertises only capabilities it can determine precisely; generic platform 5 GHz support is not treated as proof of Wi-Fi Aware 5 GHz support.

Caveats and Follow-Ups

  • This PR remains draft until Android Wi-Fi Aware retrieval is exercised on supported physical hardware against an independent reader, including unavailable/resource-exhausted and cleanup behavior.
  • The official ISO/IEC TS 18013-6:2025 Appendix 2 holder catalogue maps the delivered baseline to mDL_Tech_DR_WiFi_01 through _04, _06, _07, and the harness-conditional _08. Optional _05 is explicitly not applicable because NCS-PK is not advertised. The current engineering ledger accounts for all 460 holder cases as 288 automated rows, 24 physical rows, and 148 explicit gaps, with the physical rows consolidated into five reusable scenarios. The positive Wi-Fi Aware scenario remains blocked on a second capable independent reader, and the normative TS main text remains required before any conformance claim.
  • Existing broad Multipaz BLE/NFC smoke results remain historical evidence. On frozen pre-final-restack head ae4efeb2dfaf60fa7daaab80db4415c4a63c57b0, the Android API 35 denial/settings/return permission recovery, Compose Android/Compose iOS/native SwiftUI QR-to-BLE GATT canaries, and Android QR-to-NFC hybrid canary against Multipaz passed. The hybrid proves NFC/HCE engagement and handover followed by BLE GATT retrieval, not direct-NFC retrieval. This completes the bounded dependency-renderer smoke for that frozen build only; none of these cases is cross-credited to the current head or replaces the still-pending Wi-Fi Aware physical matrix.
  • The stack was refreshed parent first from Identity main 4d151a1bf43c45072d931f00f8418d50de20813c: [WAL-1344] feat(mdoc): add shared proximity protocol engine #2155 targets main and each child targets its immediate predecessor. This PR is c8226699039ec51b0eb4caf36cadccfd0c18b26b on parent [WAL-1347] feat(wallet): integrate NFC proximity in demos #2166 571c0b9d8f308a8fa86a35b3d909be668020753a. Closed WAL-1376 PR [WAL-1376] feat(wallet): add full-screen image viewing and render QR claims #2176 is not a dependency; [WAL-1346] feat(wallet): add proximity presentation to wallet demos #2160 owns the minimum proximity-only ZXing renderer delta.
  • The lower-stack Android NFCv2 direct/hybrid and 42,507-byte response evidence is recorded in WAL-1349 architecture PR #61; it does not substitute for positive Wi-Fi Aware evidence on this overlay.
  • NCS-PK-2WDH-128 and optional 5 GHz advertising remain outside this draft's claimed scope.
  • iOS remains intentionally unadvertised unless Apple exposes a dynamic, unpaired service/security surface capable of the ISO flow. Apple's separate HCE approval affects NFC card emulation, not this Wi-Fi Aware limitation.

Breaking

None for published APIs. The new configuration and capability fields extend the unreleased stacked proximity API, and existing callers retain their current behavior unless Wi-Fi Aware is enabled.

@szijpeter szijpeter added the ci:mobile Run mobile related CI workflows for this PR label Aug 30, 2026
@szijpeter szijpeter self-assigned this Aug 30, 2026
@linear-code

linear-code Bot commented Aug 30, 2026

Copy link
Copy Markdown

WAL-1348

WAL-1376

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 83b04011-0617-4601-ad81-30bdf5adba47

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 24b5208 to 39bf74d Compare August 31, 2026 10:14
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 0baef8a to 4f60b3f Compare August 31, 2026 10:14
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 39bf74d to 139eeb8 Compare August 31, 2026 12:09
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 4f60b3f to b395131 Compare August 31, 2026 12:09
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 139eeb8 to f10ccee Compare August 31, 2026 17:10
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from b395131 to 3dd4d46 Compare August 31, 2026 18:06
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from f10ccee to 060a028 Compare September 1, 2026 10:45
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 3dd4d46 to 9b0b95f Compare September 1, 2026 10:45
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 060a028 to cfdff51 Compare September 1, 2026 11:13
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 9b0b95f to 06955c3 Compare September 1, 2026 11:13
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from cfdff51 to 9ec523e Compare September 1, 2026 11:55
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 06955c3 to 59179c4 Compare September 1, 2026 11:55
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 9ec523e to ed0b9ba Compare September 1, 2026 12:45
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 59179c4 to 385dacc Compare September 1, 2026 12:45
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from ed0b9ba to bb83536 Compare September 1, 2026 13:06
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 385dacc to 830a0a2 Compare September 1, 2026 13:06
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from bb83536 to 88adba9 Compare September 1, 2026 14:55
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch 2 times, most recently from 830a0a2 to 5663242 Compare September 1, 2026 14:55
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 88adba9 to 12db0e9 Compare September 1, 2026 15:57
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 5663242 to 21669be Compare September 1, 2026 15:57
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 12db0e9 to 8f9509e Compare September 2, 2026 08:54
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 21669be to 837243a Compare September 2, 2026 08:54
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 8f9509e to e01ea39 Compare September 2, 2026 09:44
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 837243a to 281d14f Compare September 2, 2026 09:45
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 281d14f to ebad662 Compare September 2, 2026 10:05
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 84542f9 to 072ba89 Compare September 2, 2026 10:28
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from ebad662 to e0c663d Compare September 2, 2026 10:28
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch 2 times, most recently from ec7f7ff to f934469 Compare September 2, 2026 12:08
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from e0c663d to ae4efeb Compare September 2, 2026 12:13
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from f934469 to ad15e04 Compare September 2, 2026 14:59
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch 2 times, most recently from ca6f3c3 to 4d03f2f Compare September 2, 2026 19:37
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch 2 times, most recently from 13068e1 to aea085c Compare September 3, 2026 14:12
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 4d03f2f to 7c1ec38 Compare September 3, 2026 14:12
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from aea085c to b1cf07d Compare September 3, 2026 15:39
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 7c1ec38 to 5bfcb0b Compare September 3, 2026 15:39
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 8d02138 to cdf4f66 Compare September 4, 2026 12:04
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch 2 times, most recently from 3294f55 to 88a83f6 Compare September 4, 2026 12:51
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch 2 times, most recently from c7af7ad to 7c3223f Compare September 4, 2026 13:12
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from 88a83f6 to a3b7a71 Compare September 4, 2026 13:12
@szijpeter
szijpeter force-pushed the feature/wal-1348-wifi-aware-retrieval branch from a3b7a71 to c822669 Compare September 4, 2026 14:39
@szijpeter
szijpeter force-pushed the feature/wal-1347-nfc-wallet-demos branch from 7c3223f to 571c0b9 Compare September 4, 2026 14:39
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:mobile Run mobile related CI workflows for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant