Skip to content

[BUG] DIF PE (ld_proof) holder always signs with auto-detected DID; explicit issuer_id in send-presentation is ignored #4195

Description

@jacksonriding

Describe the Bug

When responding to a DIF Presentation Exchange request for a ld_proof-format credential, DIFPresFormatHandler.create_pres always calls DIFPresExchHandler.create_vp(..., is_holder_override=True). This forces the if self.is_holder or is_holder_override: branch inside create_vp, which unconditionally calls get_sign_key_credential_subject_id() to auto-detect the signing DID — completely ignoring self.pres_signing_did, i.e. any explicit issuer_id passed via POST /present-proof-2.0/records/{id}/send-presentation. For a did:key credential subject (the norm in --no-ledger setups), the auto-detection fails to select a signing key, so the resulting VP is returned with no proof at all, and the exchange completes with no error on the holder side. Separately, issuer_id also gets silently reset to None in create_pres unless presentation_definition is re-supplied in the same manual send-presentation call.

Steps to Reproduce

  1. Run two ACA-Py agents with --no-ledger, connected via OOB + DID Exchange (did:peer).
  2. On each agent, create a did:key (POST /wallet/did/create {"method":"key","key_type":"ed25519"}).
  3. Issue a JSON-LD (ld_proof, Ed25519Signature2018) credential from agent A to agent B's did:key via Issue Credential 2.0.
  4. From agent A, send a DIF PE presentation request (POST /present-proof-2.0/send-request) for that credential.
  5. On agent B, respond via --auto-respond-presentation-request, or manually call POST /present-proof-2.0/records/{id}/send-presentation with {"dif": {"issuer_id": "<the did:key>"}}.

Expected Behavior

The presentation is signed using the credential's did:key subject (either auto-detected correctly, or using the explicitly supplied issuer_id), and verification on agent A succeeds (verified: true).

Actual Behavior

The submitted VP has no proof field. Agent A's verifier logs:
DIF-PRES verify_pres result: verified=False errors=[LinkedDataProofException('presentation must contain "proof"')]
No error or warning is logged on the holder (agent B) side — it returns 200 and completes the exchange as if nothing went wrong.

Environment

  • ACA-Py version: py3.13-1.6-lts (ghcr.io/openwallet-foundation/acapy-agent:py3.13-1.6-lts)
  • Python version: 3.13
  • OS: Docker containers (Linux), orchestrated from Windows host

Additional Context

Reproduced consistently across multiple fresh wallets/connections while building an integration project with home assistant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions