Skip to content

Commit

Permalink
fix(interop): overly strict validation
Browse files Browse the repository at this point in the history
This change relaxes some overly strict validation that was preventing
presenting proof using LDP-VC from Credo 0.5.X based agents.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed May 10, 2024
1 parent f9d9bad commit 40b8d36
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions aries_cloudagent/protocols/present_proof/dif/pres_exch.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,12 +824,10 @@ class Meta:

id = fields.Str(
required=False,
validate=UUID4_VALIDATE,
metadata={"description": "ID", "example": UUID4_EXAMPLE},
)
definition_id = fields.Str(
required=False,
validate=UUID4_VALIDATE,
metadata={"description": "DefinitionID", "example": UUID4_EXAMPLE},
)
descriptor_maps = fields.List(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import Mapping, Optional, Sequence, Tuple
from uuid import uuid4

from marshmallow import RAISE

from ......messaging.base_handler import BaseResponder
from ......messaging.decorators.attach_decorator import AttachDecorator
Expand Down Expand Up @@ -75,7 +74,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping):
Schema = mapping[message_type]

# Validate, throw if not valid
Schema(unknown=RAISE).load(attachment_data)
Schema().load(attachment_data)

def get_format_identifier(self, message_type: str) -> str:
"""Get attachment format identifier for format and message combination.
Expand Down
3 changes: 0 additions & 3 deletions aries_cloudagent/vc/vc_ld/models/linked_data_proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ class Meta:

domain = fields.Str(
required=False,
# TODO the domain can be more than a Uri, provide a less restrictive validation
# https://www.w3.org/TR/vc-data-integrity/#defn-domain
validate=Uri(),
metadata={
"description": (
"A string value specifying the restricted domain of the signature."
Expand Down

0 comments on commit 40b8d36

Please sign in to comment.