Skip to content

The grant signing page asks for a field the official Multipaz Payment card doesn't have #465

Closed

Description

@dzuluaga

In plain terms

The page where a person signs a spending grant with their phone asks the wallet for a payment card with a field the official Multipaz Payment card does not have. So the official card is never offered, and people fall back to a custom card minted from this repo. This issue makes the page ask for, and check, a field the official card carries.

Part of #464 (approve a spending grant with the official Multipaz Wallet and its Payment card).

Reproduce via

The SDK.

Steps to reproduce

From a checkout of main, save this as repro-dcql.mts in the repo root and run npx vite-node repro-dcql.mts:

import { buildIntentSignDcql } from "./packages/credentagent-gate/src/ceremony/intent-sign/dcql.ts";
console.log(JSON.stringify(buildIntentSignDcql()));

What happens

{"credentials":[{"id":"dpc_credential","format":"dc+sd-jwt","meta":{"vct_values":["urn:emvco:dpc:card:1","com.emvco.dpc"]},"claims":[{"path":["payment_instrument_id"]}]}]}

The official issuer's SD-JWT Payment card (payment_sca_sd_jwt at https://issuer.multipaz.org/issuer, type urn:emvco:dpc:card:1) carries credential_id, network and last_four in Multipaz main. It has no payment_instrument_id. On Android, a request for a claim the card lacks matches nothing, and the phone shows "Your info wasn't found".

What should happen instead

The request matches the official card, and the custom card minted by tools/demo-pki/mint/mint-dpc-sdjwt.mjs keeps working for tests.

Version or commit

main at ea12b21.


What to build

  • intent-sign/dcql.ts: ask for a claim the official card has (credential_id), while still accepting a card that has payment_instrument_id. How to express "either" so Android's matcher accepts it (DCQL claim_sets, or one claim per card type) is the open point; the phone run in the sibling issue settles it.
  • intent-sign/verify.ts and presentation.ts: require that one of the accepted claims is disclosed and signed. Security invariant 5 stays: an explicit positive claim, never "a token was present".
  • The simulated wallet (intent-sign/simulate.ts) gains the official card's shape, so tests cover both.

Acceptance criteria

  • AC1 The signing request matches a card that carries credential_id and no payment_instrument_id.
  • AC2 A presentation from the official card's shape verifies and authorizes the grant.
  • AC3 A presentation that discloses none of the accepted claims is refused. The test fails if the check is removed.
  • AC4 A presentation whose claim was appended unsigned is refused (the existing bypass test in presentation.ts still holds for the new claim).
  • AC5 A card of another type is refused.
  • AC6 The custom test card still verifies.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions