JanssenProject / JanssenProject/jans
feat(jans-fido2): optional native-client telemetry envelope for attestation/assertion calls
- Dominant language
- Java
- Stars
- 647
- Forks
- 173
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 110
Description
**Is your feature request related to a problem? Please describe.**
Many native failure causes cannot be inferred from WebAuthn alone: post-install AASA verification delay, iCloud Keychain sync lag, Play Services version, OEM-specific Credential Manager behavior, screen-lock prerequisites, third-party credential providers, and user cancellations. Today Jans derives client context **only** from the HTTP `User-Agent` (`DeviceInfoExtractor.extractDeviceInfo` → OS/browser/device-type). A native app has far richer first-party context than a UA string can carry, and none of it currently reaches the server.
**Describe the solution you'd like**
Define an **optional** mobile telemetry envelope a native app/SDK may send alongside attestation/assertion `start`/`finish` calls, e.g.:
```jsonc
{
"client_correlation_id": "uuid",
"platform": "android", // android | ios
"native_api": "credential-manager", // credential-manager | asauthorization | legacy-fido2 | webview
"os_version": "14",
"play_services_version": "24.40",
"device_manufacturer": "Samsung",
"device_model": "Galaxy S23",
"credential_provider": "google-password-manager",
"is_device_secure": true,
"flow_context": "native", // native | webview | system-browser
"app_version": "6.2.1",
"distribution_channel": "play-store",
"last_client_error_code": "GetCredentialCancellationException"
}
```
- **Optional** — absence must not change behavior.
- Persist the fields onto the metrics entry (extends the FIDO2 metrics) and correlate via `client_correlation_id`.
**Describe alternatives you've considered**
- *Richer UA parsing* — insufficient; UA can't carry Play Services version, OEM Credential Manager quirks, or the last client-side error code.
- *A separate telemetry endpoint decoupled from the ceremony* — possible later, but loses the tight correlation to a specific attestation/assertion attempt.
**Additional context**
Feeds the mobile metric dimensions work and the alerting work. Tie the field taxonomy to the jans-chip reference app (#14551) so client and server agree.
Corbado article — https://www.corbado.com/blog/native-ios-android-passkey-implementation-challenges ;
ChatGPT analysis — https://chatgpt.com/share/6a5129bc-a8f4-83ea-8649-3e463e0a7db3
Contributor guide
Assessment
This issue has not been assessed yet.