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

Verifiable credentials used in test have expired #4699

Closed
scandinave opened this issue Jan 6, 2025 · 1 comment · Fixed by #4702
Closed

Verifiable credentials used in test have expired #4699

scandinave opened this issue Jan 6, 2025 · 1 comment · Fixed by #4702
Assignees
Labels
triage all new issues awaiting classification

Comments

@scandinave
Copy link
Contributor

Bug Report

Describe the Bug

Tests for verifiable credentials are in failed state.

Expected Behavior

All tests en main branch should passed

Observed Behavior

VCs defined https://github.com/eclipse-edc/Connector/tree/main/extensions/common/crypto/ldp-verifiable-credentials/src/test/resources/jws2020/issuing have an expiration date to the 12/31/2024

Steps to Reproduce

Steps to reproduce the behavior:

  1. Just launch Gradle test on the project or test in the LdpIssuerTest suite specifically

Context Information

Detailed Description

When creating a PR, tests failed with this error:

> Task :extensions:common:crypto:lib:jws2020-lib:testFixturesJar
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

> Task :extensions:common:crypto:ldp-verifiable-credentials:test

LdpIssuerTest > JsonWebSignature2020 > t0001: a simple credential to sign (EC Key) FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signSimpleCredential_ecKey(LdpIssuerTest.java:97)

LdpIssuerTest > JsonWebSignature2020 > t0003: signed embedded verificationMethod FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signEmbeddedVerificationMethod(LdpIssuerTest.java:180)

LdpIssuerTest > JsonWebSignature2020 > t0001: a simple credential to sign (RSA Key) > keySize = 2048 bits FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signSimpleCredential_rsaKey(LdpIssuerTest.java:132)

LdpIssuerTest > JsonWebSignature2020 > t0001: a simple credential to sign (RSA Key) > keySize = 3072 bits FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signSimpleCredential_rsaKey(LdpIssuerTest.java:132)

LdpIssuerTest > JsonWebSignature2020 > t0001: a simple credential to sign (RSA Key) > keySize = 4096 bits FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signSimpleCredential_rsaKey(LdpIssuerTest.java:132)

LdpIssuerTest > JsonWebSignature2020 > t0004: a credential with DID key as verification method FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signVerificationDidKey(LdpIssuerTest.java:223)

LdpIssuerTest > JsonWebSignature2020 > t0001: a simple credential to sign (OctetKeyPair) FAILED
    org.opentest4j.AssertionFailedError: Error signing document: Expired
        at app//org.eclipse.edc.verifiablecredentials.linkeddata.LdpIssuerTest$JsonWebSignature2020.signSimpleCredential_octetKeyPair(LdpIssuerTest.java:158)


21 tests completed, 7 failed

Possible Implementation

The quick fix is to update the expiration date of the VC, but this will not resolve the problem in the long run.

@paullatzelsperger
Copy link
Member

there is also other tests that fail BTW. I am against generating the signed documents in the test, and then verifying it, because realistically, we would test our own signing implementation against our own verifying implementation. In addition, it would not be possible for third parties to independently validate that our test data is correct.

I'll put the expiration date to 2099, that should give us enough time to come up with a better strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage all new issues awaiting classification
Projects
None yet
2 participants