Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for validity start date from vc data-model-v2.0 #559

Closed
mikeplotean opened this issue Jul 1, 2024 · 0 comments · Fixed by #648
Closed

Missing support for validity start date from vc data-model-v2.0 #559

mikeplotean opened this issue Jul 1, 2024 · 0 comments · Fixed by #648
Assignees
Labels
bug Something isn't working verifier-api Attached to an issue related to verifier-api

Comments

@mikeplotean
Copy link
Contributor

Describe the bug
The verifier-api NotBeforeDatePolicy doesn't cover the cases for credentials with validFrom property, which, according to the spec, is the new name for issuanceDate.

To Reproduce
Steps to reproduce the behavior:

  1. Go to issuer-api
  2. Generate credential-offer (using vc-sample.json from below)
  3. Claim credential with wallet-api
  4. Go to verifier-api
  5. Generate presentation-request (using vp-sample.json from below)
  6. Perform presentation with wallet-api

Expected behavior

  • popup shows presentation failed
  • status code 400

Actual behavior

  • popup shows presentation successful
  • status code 200

Environment

Additional context
vc-sample.json

{
    "issuerKey":
    {
        "type": "jwk",
        "jwk":
        {
            "kty": "OKP",
            "d": "mDhpwaH6JYSrD2Bq7Cs-pzmsjlLj4EOhxyI-9DM1mFI",
            "crv": "Ed25519",
            "kid": "Vzx7l5fh56F3Pf9aR3DECU5BwfrY6ZJe05aiWYWzan8",
            "x": "T3T4-u1Xz3vAV2JwPNxWfs4pik_JLiArz_WTCvrCFUM"
        }
    },
    "issuerDid": "did:key:z6MkjoRhq1jSNJdLiruSXrFFxagqrztZaXHqHGUTKJbcNywp",
    "credentialConfigurationId": "OpenBadgeCredential_jwt_vc_json",
    "credentialData":
    {
        "@context":
        [
            "https://www.w3.org/2018/credentials/v1",
            "https://purl.imsglobal.org/spec/ob/v3p0/context.json"
        ],
        "id": "urn:uuid:THIS WILL BE REPLACED WITH DYNAMIC DATA FUNCTION (see below)",
        "type":
        [
            "VerifiableCredential",
            "OpenBadgeCredential"
        ],
        "name": "JFF x vc-edu PlugFest 3 Interoperability",
        "issuer":
        {
            "type":
            [
                "Profile"
            ],
            "id": "did:key:THIS WILL BE REPLACED WITH DYNAMIC DATA FUNCTION FROM CONTEXT (see below)",
            "name": "Jobs for the Future (JFF)",
            "url": "https://www.jff.org/",
            "image": "https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png"
        },
        "validFrom": "2025-07-20T07:05:44Z",
        "credentialSubject":
        {
            "id": "did:key:123 (THIS WILL BE REPLACED BY DYNAMIC DATA FUNCTION (see below))",
            "type":
            [
                "AchievementSubject"
            ],
            "achievement":
            {
                "id": "urn:uuid:ac254bd5-8fad-4bb1-9d29-efd938536926",
                "type":
                [
                    "Achievement"
                ],
                "name": "JFF x vc-edu PlugFest 3 Interoperability",
                "description": "This wallet supports the use of W3C Verifiable Credentials and has demonstrated interoperability during the presentation request workflow during JFF x VC-EDU PlugFest 3.",
                "criteria":
                {
                    "type": "Criteria",
                    "narrative": "Wallet solutions providers earned this badge by demonstrating interoperability during the presentation request workflow. This includes successfully receiving a presentation request, allowing the holder to select at least two types of verifiable credentials to create a verifiable presentation, returning the presentation to the requestor, and passing verification of the presentation and the included credentials."
                },
                "image":
                {
                    "id": "https://w3c-ccg.github.io/vc-ed/plugfest-3-2023/images/JFF-VC-EDU-PLUGFEST3-badge-image.png",
                    "type": "Image"
                }
            }
        }
    },
    "mapping":
    {
        "id": "<uuid>",
        "issuer":
        {
            "id": "<issuerDid>"
        },
        "credentialSubject":
        {
            "id": "<subjectDid>"
        }
    }
}

vp-sample.json

{
    "vc_policies":
    [
        "not-before"
    ],
    "request_credentials":
    [
        "OpenBadgeCredential"
    ]
}
@mikeplotean mikeplotean added bug Something isn't working verifier-api Attached to an issue related to verifier-api labels Jul 1, 2024
@mikeplotean mikeplotean self-assigned this Jul 25, 2024
@mikeplotean mikeplotean linked a pull request Jul 26, 2024 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verifier-api Attached to an issue related to verifier-api
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant