Skip to content

fix: use original VCT identifiers in DCQL vct_values#307

Merged
masv3971 merged 1 commit intoSUNET:masv/infra/releasefrom
sirosfoundation:fix/vct-dcql-identifier
Mar 13, 2026
Merged

fix: use original VCT identifiers in DCQL vct_values#307
masv3971 merged 1 commit intoSUNET:masv/infra/releasefrom
sirosfoundation:fix/vct-dcql-identifier

Conversation

@leifj
Copy link
Contributor

@leifj leifj commented Mar 13, 2026

Problem

The OpenID4VP request object was populating vct_values in the DCQL query with the type-metadata publication URL (e.g. https://tecca.issuer.id.siros.org/type-metadata/pid_1_5) instead of the original VCT identifier from the VCTM (e.g. urn:eudi:pid:arf-1.5:1).

This caused verification failures because the wallet's credential has the original VCT identifier in its vct claim, which doesn't match the URL the verifier was requesting.

Related to #306 (same class of bug, different code path).

Fix

  • Added VCTIdentifiersForScopes() helper on Cfg that returns original VCT identifiers from the VCTM structs
  • Switched the DCQL query builder in handlers_verifier.go to use VCTIdentifiersForScopes() instead of VCTUrlsForScopes()

Files changed

  • pkg/model/config.go — new VCTIdentifiersForScopes method
  • internal/apigw/apiv1/handlers_verifier.go — use new method for vct_values

The OpenID4VP request object was populating vct_values with the
type-metadata publication URL instead of the original VCT identifier
from the VCTM (e.g. urn:eudi:pid:arf-1.5:1). Added
VCTIdentifiersForScopes helper and switched the DCQL query builder
to use it so vct_values matches the vct claim in issued credentials.
@sonarqubecloud
Copy link

@masv3971 masv3971 merged commit 80c627e into SUNET:masv/infra/release Mar 13, 2026
5 checks passed
leifj added a commit to sirosfoundation/vc that referenced this pull request Mar 13, 2026
buildDCQLQueryFromConfig was using GetVCTURL() (the publication URL)
for vct_values in the DCQL query. This should use the original VCT
identifier from the VCTM so it matches the vct claim in credentials.

Same class of bug as fixed in apigw handlers_verifier.go (PR SUNET#307).
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