Skip to content

Handle C-S-S passkeyUsed notifications by parsing and logging - #9495

Draft
dbajpeyi wants to merge 4 commits into
developfrom
cursor/passkey-usage-detection-e6be
Draft

Handle C-S-S passkeyUsed notifications by parsing and logging#9495
dbajpeyi wants to merge 4 commits into
developfrom
cursor/passkey-usage-detection-e6be

Conversation

@dbajpeyi

Copy link
Copy Markdown
Collaborator

Adds a dedicated handler pair for the webCompat/passkeyUsed notification that content-scope-scripts sends when a WebAuthn passkey ceremony completes ({ type: get|create, success: boolean, error? }).

Follows the ContentScopeJsMessageHandlersPlugin pattern (e.g. DecryptWithSyncMasterKeyHandler), with a WebViewCompat twin so the message is handled on either C-S-S transport. Unlike the existing webCompat request/response handlers there is intentionally no id guard: this is a notify() message and carries no id.

For now the payload is only parsed and logged; pixel firing is a follow-up (definitions in PR #7183).

Task/Issue URL:
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable):

Description

Steps to test this PR

Feature 1

  • [ ]
  • [ ]

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

Adds a dedicated handler pair for the webCompat/passkeyUsed
notification that content-scope-scripts sends when a WebAuthn passkey
ceremony completes ({ type: get|create, success: boolean, error? }).

Follows the ContentScopeJsMessageHandlersPlugin pattern (e.g.
DecryptWithSyncMasterKeyHandler), with a WebViewCompat twin so the
message is handled on either C-S-S transport. Unlike the existing
webCompat request/response handlers there is intentionally no id
guard: this is a notify() message and carries no id.

For now the payload is only parsed and logged; pixel firing is a
follow-up (definitions in PR #7183).
Point at pr-releases/cursor/passkey-usage-detection-e6be rather than
the source branch. The source branch has no committed build output, so
installing from it removed the vendored build/android bundles; the
pr-releases branch ships the built artifacts the app actually consumes.

Resolves to 72cc2f8, the build-artifacts commit on top of source commit
1d01d1b, and refreshes the two vendored bundles that include webCompat
so the app picks up passkey detection.
Adds android.util.Log.i("PasskeyUsedDbg", ...) at both transport
handlers' process() entry and inside PasskeyUsedMessageLogger.log().
android.util.Log writes regardless of the debuggable flag or whether
the logcat{} logger is installed, so this isolates whether the message
is being routed to the handler at all versus a logging-visibility issue.

Tests switched to Robolectric so the android.util.Log calls resolve.

Revert before merge - this is throwaway on-device diagnostics.
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.

2 participants