aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

fix(interop): overly strict validation

Open dbluhm opened this issue 1 year ago • 1 comments

This change relaxes some overly strict validation that was preventing presenting proof using LDP-VC from Credo 0.5.X based agents.

dbluhm avatar May 10 '24 00:05 dbluhm

cc @PatStLouis

dbluhm avatar May 14 '24 15:05 dbluhm

From the VC specification:

If the id property is present:

The id property MUST express an identifier that others are expected to use when expressing statements about a specific thing identified by that identifier.
The id property MUST NOT have more than one value.
The value of the id property MUST be a URI.

The most relevant here is the last point The value of the id property MUST be a URI.

Instead of testing for UUID, we can test for a URI value. I've commented the PR

PatStLouis avatar May 14 '24 15:05 PatStLouis

@PatStLouis The id properties changed are in the presentation submission, which is outlined in the presentation exchange specification as follows:

The presentation_submission object MUST contain an id property. The value of this property MUST be a unique identifier, such as a UUID. The presentation_submission object MUST contain a definition_id property. The value of this property MUST be the id value of a valid Presentation Definition.

I think the only change made to the VC itself is loosening the requirements for the LinkedDataProof schema domain property

dbluhm avatar May 14 '24 18:05 dbluhm

@dbluhm thanks for the clarification, I misread that this applied to the presentation itself!

PatStLouis avatar May 15 '24 17:05 PatStLouis

Please retry analysis of this Pull-Request directly on SonarCloud

sonarqubecloud[bot] avatar May 16 '24 00:05 sonarqubecloud[bot]

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 21 '24 15:05 sonarqubecloud[bot]