Skip to content

feat!: a VAC states purposes of use, and verify_chain holds a chain to them - #44

Merged
stormer78 merged 1 commit into
mainfrom
feat/vac-purposes
Nov 10, 2026
Merged

stormer78 merged 1 commit into
mainfrom
feat/vac-purposes

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

DTG Core Credentials' Purposes of Use (trustoverip/dtgwg-cred-spec#84): an
optional credentialSubject.purposes on a VAC, any or a non-empty list, under
context v2. verify_chain enforces the chain rule (a link stating none takes its
parent's; a wider link is WidensPurposes) and reports the effective purposes.
The member was refused outright before: the VAC subject denies unknown fields,
so no verifier using this library could read a VAC carrying it. Breaking: new
public fields on CredentialSubjectAuthority and VerifiedAuthority, and a new
AuthorityError variant.

See the CHANGELOG entry for the full surface. Tests: authority_chain::purposes covers seven cases (none stated grants any, narrowing, inheritance, widening refused, modelTraining only from a root naming it, refusal at issue, and context v2 required with an empty list refused), plus the PurposeScope unit tests including the strict parse. Locally: fmt, clippy -D warnings, cargo test --all-features (232), --no-default-features, and cargo package --locked.

The release that publishes this is a separate chore(release) PR. VTI then pins it to check rooms/records/get 0.4 against chain purposes, and writes them in rooms/owner/issue-authority 0.3.

…o them

DTG Core Credentials' Purposes of Use (trustoverip/dtgwg-cred-spec#84): an
optional credentialSubject.purposes on a VAC, any or a non-empty list, under
context v2. verify_chain enforces the chain rule (a link stating none takes its
parent's; a wider link is WidensPurposes) and reports the effective purposes.
The member was refused outright before: the VAC subject denies unknown fields,
so no verifier using this library could read a VAC carrying it. Breaking: new
public fields on CredentialSubjectAuthority and VerifiedAuthority, and a new
AuthorityError variant.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 requested a review from a team as a code owner November 10, 2026 05:29
@stormer78
stormer78 merged commit 6b1ac69 into main Nov 10, 2026
7 checks passed
@stormer78
stormer78 deleted the feat/vac-purposes branch November 10, 2026 06:03
stormer78 added a commit to OpenVTC/verifiable-trust-infrastructure that referenced this pull request Nov 10, 2026
…licate purpose (#2544)

An internally tagged enum let the unit variant ignore extra members, so
{"scope":"any","purposes":[...]} parsed as any, and the listed variant's set
folded a duplicate purpose silently (VTI-ACL-100). Payloads of the acl tasks
are held to the schema before they are parsed, but a stored entry and an SDK
response are not; parse through a strict wire form instead. Found writing the
same type for dtg-credentials (OpenVTC/dtg-credentials#44).

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
stormer78 added a commit that referenced this pull request Nov 10, 2026
A VAC's optional credentialSubject.purposes under context v2, and the chain
rule in verify_chain (#44). Breaking: new public fields on
CredentialSubjectAuthority and VerifiedAuthority, and AuthorityError gains
WidensPurposes. Also carries the did:scid party matching (#38) and the
proof-from-issuer check, released for the first time here.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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.

1 participant