Skip to content

Remove provenance metadata fields from passkey storage - #109

Merged
pando85 merged 1 commit into
mainfrom
remove-provenance-fields
Aug 2, 2026
Merged

Remove provenance metadata fields from passkey storage#109
pando85 merged 1 commit into
mainfrom
remove-provenance-fields

Conversation

@pando85

@pando85 pando85 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Remove provenance metadata fields that tracked which app/browser created each passkey. These fields are not required for WebAuthn ceremonies and add unnecessary complexity to the CBOR storage format.

Changes

Removed fields from PasskeyCredential and StoredCredential:

  • createdByCallerType (NATIVE_APP vs PRIVILEGED_BROWSER)
  • createdByPackage (e.g., "org.mozilla.fenix", "com.android.chrome")
  • createdByCertificateDigest (signing certificate hash)
  • verifiedOrigin (web origin for browser callers)

Files modified:

  • PasskeyCredential.kt - removed fields, equals(), hashCode(), CallerType import
  • StoredCredential.kt - removed fields, CBOR serialization/deserialization, equals(), hashCode()
  • AppPasskeyProviderActivity.kt - removed .copy() call that populated these fields
  • Deleted StoredCredentialBindingMetadataTest.kt (tested removed functionality)

Backward Compatibility

Old credentials with these fields will continue to work. The extra CBOR keys are safely ignored during deserialization since the fields are no longer part of the data model.

Testing

All passkeys:core tests pass.

Related

This change improves compatibility with tools like soft-fido2 that expect strict WebAuthn-compliant CBOR encoding without extra metadata fields.

Remove createdByCallerType, createdByPackage, createdByCertificateDigest,
and verifiedOrigin fields from PasskeyCredential and StoredCredential.

These fields stored information about which app/browser created the passkey
(e.g., org.mozilla.fenix), but this metadata is not needed for WebAuthn
ceremonies and adds unnecessary complexity to the storage format.

Old credentials with these fields will continue to work - the extra CBOR
keys are safely ignored during deserialization.

Deleted StoredCredentialBindingMetadataTest.kt as it tested the removed
functionality.

Fixes compatibility issues with tools like soft-fido2 that expect strict
WebAuthn-compliant CBOR encoding.
@pando85
pando85 enabled auto-merge (squash) August 2, 2026 00:09
@pando85
pando85 merged commit f89dfba into main Aug 2, 2026
5 checks passed
@pando85
pando85 deleted the remove-provenance-fields branch August 2, 2026 00:11
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