Skip to content

Fix Passkey Registration Sending the Raw Attestation Object as public_key #1

Description

@maugauwi-hash

Labels: bug, ios, passkey, security, critical
Priority: High
Estimated Time: 3 hours

Description:
PasskeyService.register() (ios/EthosProtocol/Sources/Services/PasskeyService.swift:24) sets
pubKey = reg.rawAttestationObject?.base64URLEncodedString() and sends it to
APIClient.registerPasskey(publicKey:) under the public_key field. This is the entire CBOR
attestation object, not an extracted public key. docs/mobile-passkey-flow.md (lines 148-159)
describes a materially different flow: extract credential.credentialPublicKey (DER) separately
from the attestation object and send both. The client and its own documentation disagree, and
whichever the backend actually expects, one side of this is wrong.

Tasks:

  • Determine what the backend's /auth/register endpoint actually parses today
  • Extract the COSE/DER public key from the attestation object client-side, or confirm the backend parses attestation objects and update the docs instead
  • Rename the wire field so it isn't called public_key if it's actually the attestation object
  • Add a regression test asserting the exact bytes sent match the documented contract

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions