From 25c06363087e37b798ff7cdf72df39634d4f9f2a Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 26 Jul 2024 16:33:17 +0000 Subject: [PATCH 1/2] Add status credential fixtures Signed-off-by: Patrick --- README.md | 7 ++++--- .../multi-purpose-fail.jsonld | 17 +++++++++++++++++ .../status-credentials/multi-purpose-ok.jsonld | 17 +++++++++++++++++ .../short-encoded-list-fail.jsonld | 16 ++++++++++++++++ .../single-purpose-fail.jsonld | 14 ++++++++++++++ .../status-credentials/single-purpose-ok.jsonld | 14 ++++++++++++++ 6 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 fixtures/status-credentials/multi-purpose-fail.jsonld create mode 100644 fixtures/status-credentials/multi-purpose-ok.jsonld create mode 100644 fixtures/status-credentials/short-encoded-list-fail.jsonld create mode 100644 fixtures/status-credentials/single-purpose-fail.jsonld create mode 100644 fixtures/status-credentials/single-purpose-ok.jsonld diff --git a/README.md b/README.md index 8d3b2ac..6d5d40d 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,10 @@ npm run generate-vcs ## Implementation To add your implementation to this test suite see the -`w3c-ccg/vc-test-suite-implementations` [README](https://github.com/w3c-ccg/vc-test-suite-implementations/blob/main/README.md). Add the tags -`BitstringStatusList` along with `Revocation` or `Suspension` to run your -issuer and verifier against this test suite. +`w3c-ccg/vc-test-suite-implementations` [README](https://github.com/w3c-ccg/vc-test-suite-implementations/blob/main/README.md). Add the tag +`BitstringStatusList` to run your issuer and verifier against this test suite. + +This test-suite publishes status credential fixtures for testing verifiers implementations. These status credentials have the following indexes set to 1 `201 94023 57444`. Note: To run the tests, some implementations require client secrets that can be passed as env variables to the test script. To see which ones require client diff --git a/fixtures/status-credentials/multi-purpose-fail.jsonld b/fixtures/status-credentials/multi-purpose-fail.jsonld new file mode 100644 index 0000000..1f31239 --- /dev/null +++ b/fixtures/status-credentials/multi-purpose-fail.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "BitstringStatusListCredential" + ], + "credentialSubject": { + "type": "BitstringStatusList", + "statusPurpose": [ + "random", + "purposes" + ], + "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" + } + } \ No newline at end of file diff --git a/fixtures/status-credentials/multi-purpose-ok.jsonld b/fixtures/status-credentials/multi-purpose-ok.jsonld new file mode 100644 index 0000000..8bbd2ac --- /dev/null +++ b/fixtures/status-credentials/multi-purpose-ok.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "BitstringStatusListCredential" + ], + "credentialSubject": { + "type": "BitstringStatusList", + "statusPurpose": [ + "revocation", + "suspension" + ], + "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" + } + } \ No newline at end of file diff --git a/fixtures/status-credentials/short-encoded-list-fail.jsonld b/fixtures/status-credentials/short-encoded-list-fail.jsonld new file mode 100644 index 0000000..5e173d8 --- /dev/null +++ b/fixtures/status-credentials/short-encoded-list-fail.jsonld @@ -0,0 +1,16 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "BitstringStatusListCredential" + ], + "credentialSubject": { + "type": "BitstringStatusList", + "statusPurpose": [ + "revocation" + ], + "encodedList": "H4sIAN7Lo2YC_2NgwAEAjw7P6RkAAAA" + } + } \ No newline at end of file diff --git a/fixtures/status-credentials/single-purpose-fail.jsonld b/fixtures/status-credentials/single-purpose-fail.jsonld new file mode 100644 index 0000000..e0dcca8 --- /dev/null +++ b/fixtures/status-credentials/single-purpose-fail.jsonld @@ -0,0 +1,14 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "BitstringStatusListCredential" + ], + "credentialSubject": { + "type": "BitstringStatusList", + "statusPurpose": "randomPurpose", + "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" + } + } \ No newline at end of file diff --git a/fixtures/status-credentials/single-purpose-ok.jsonld b/fixtures/status-credentials/single-purpose-ok.jsonld new file mode 100644 index 0000000..f7c9f75 --- /dev/null +++ b/fixtures/status-credentials/single-purpose-ok.jsonld @@ -0,0 +1,14 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "BitstringStatusListCredential" + ], + "credentialSubject": { + "type": "BitstringStatusList", + "statusPurpose": "revocation", + "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" + } + } \ No newline at end of file From 2c74c28af3bb1f11619c0cc98ae98dbe43cbfafe Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 7 Aug 2024 15:48:46 +0000 Subject: [PATCH 2/2] fixtures based on vc-api status credentials Signed-off-by: Patrick --- README.md | 2 +- fixtures/should-be-revoked.jsonld | 17 +++++++++++++++++ fixtures/should-be-suspended.jsonld | 17 +++++++++++++++++ fixtures/sl-date-expired-fail.jsonld | 17 +++++++++++++++++ fixtures/sl-encoded-list-invalid-fail.jsonld | 17 +++++++++++++++++ fixtures/sl-encoded-list-short-fail.jsonld | 17 +++++++++++++++++ fixtures/sl-purpose-multi-ok.jsonld | 17 +++++++++++++++++ fixtures/sl-purpose-single-ok.jsonld | 17 +++++++++++++++++ fixtures/sl-vc-type-missing-fail.jsonld | 17 +++++++++++++++++ fixtures/sl-vc-type-wrong-fail.jsonld | 17 +++++++++++++++++ .../multi-purpose-fail.jsonld | 17 ----------------- .../status-credentials/multi-purpose-ok.jsonld | 17 ----------------- .../short-encoded-list-fail.jsonld | 16 ---------------- .../single-purpose-fail.jsonld | 14 -------------- .../status-credentials/single-purpose-ok.jsonld | 14 -------------- 15 files changed, 154 insertions(+), 79 deletions(-) create mode 100644 fixtures/should-be-revoked.jsonld create mode 100644 fixtures/should-be-suspended.jsonld create mode 100644 fixtures/sl-date-expired-fail.jsonld create mode 100644 fixtures/sl-encoded-list-invalid-fail.jsonld create mode 100644 fixtures/sl-encoded-list-short-fail.jsonld create mode 100644 fixtures/sl-purpose-multi-ok.jsonld create mode 100644 fixtures/sl-purpose-single-ok.jsonld create mode 100644 fixtures/sl-vc-type-missing-fail.jsonld create mode 100644 fixtures/sl-vc-type-wrong-fail.jsonld delete mode 100644 fixtures/status-credentials/multi-purpose-fail.jsonld delete mode 100644 fixtures/status-credentials/multi-purpose-ok.jsonld delete mode 100644 fixtures/status-credentials/short-encoded-list-fail.jsonld delete mode 100644 fixtures/status-credentials/single-purpose-fail.jsonld delete mode 100644 fixtures/status-credentials/single-purpose-ok.jsonld diff --git a/README.md b/README.md index 6d5d40d..84b8d07 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To add your implementation to this test suite see the `w3c-ccg/vc-test-suite-implementations` [README](https://github.com/w3c-ccg/vc-test-suite-implementations/blob/main/README.md). Add the tag `BitstringStatusList` to run your issuer and verifier against this test suite. -This test-suite publishes status credential fixtures for testing verifiers implementations. These status credentials have the following indexes set to 1 `201 94023 57444`. +This test-suite leverages static status credential fixtures for testing verifiers implementations. These status credentials have the following indexes set to 1 `201` `94023` `57444`. Note: To run the tests, some implementations require client secrets that can be passed as env variables to the test script. To see which ones require client diff --git a/fixtures/should-be-revoked.jsonld b/fixtures/should-be-revoked.jsonld new file mode 100644 index 0000000..d484905 --- /dev/null +++ b/fixtures/should-be-revoked.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/purpose-single-ok.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/should-be-suspended.jsonld b/fixtures/should-be-suspended.jsonld new file mode 100644 index 0000000..2198cfa --- /dev/null +++ b/fixtures/should-be-suspended.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "suspension", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/purpose-multi-ok.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-date-expired-fail.jsonld b/fixtures/sl-date-expired-fail.jsonld new file mode 100644 index 0000000..38a6cab --- /dev/null +++ b/fixtures/sl-date-expired-fail.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/date-expired-fail.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-encoded-list-invalid-fail.jsonld b/fixtures/sl-encoded-list-invalid-fail.jsonld new file mode 100644 index 0000000..1a1495b --- /dev/null +++ b/fixtures/sl-encoded-list-invalid-fail.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/encoded-list-invalid-fail.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-encoded-list-short-fail.jsonld b/fixtures/sl-encoded-list-short-fail.jsonld new file mode 100644 index 0000000..0f03192 --- /dev/null +++ b/fixtures/sl-encoded-list-short-fail.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/encoded-list-short-fail.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-purpose-multi-ok.jsonld b/fixtures/sl-purpose-multi-ok.jsonld new file mode 100644 index 0000000..5101900 --- /dev/null +++ b/fixtures/sl-purpose-multi-ok.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "1", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/purpose-multi-ok.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-purpose-single-ok.jsonld b/fixtures/sl-purpose-single-ok.jsonld new file mode 100644 index 0000000..f8a520f --- /dev/null +++ b/fixtures/sl-purpose-single-ok.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "1", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/purpose-single-ok.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-vc-type-missing-fail.jsonld b/fixtures/sl-vc-type-missing-fail.jsonld new file mode 100644 index 0000000..40f5c0c --- /dev/null +++ b/fixtures/sl-vc-type-missing-fail.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/vc-type-missing-fail.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/sl-vc-type-wrong-fail.jsonld b/fixtures/sl-vc-type-wrong-fail.jsonld new file mode 100644 index 0000000..d35aa22 --- /dev/null +++ b/fixtures/sl-vc-type-wrong-fail.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "name": "Alice" + }, + "credentialStatus": { + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": "201", + "statusListCredential": "https://w3c-ccg.github.io/vc-api/fixtures/credentials/status/vc-type-wrong-fail.jsonld" + } +} \ No newline at end of file diff --git a/fixtures/status-credentials/multi-purpose-fail.jsonld b/fixtures/status-credentials/multi-purpose-fail.jsonld deleted file mode 100644 index 1f31239..0000000 --- a/fixtures/status-credentials/multi-purpose-fail.jsonld +++ /dev/null @@ -1,17 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2" - ], - "type": [ - "VerifiableCredential", - "BitstringStatusListCredential" - ], - "credentialSubject": { - "type": "BitstringStatusList", - "statusPurpose": [ - "random", - "purposes" - ], - "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" - } - } \ No newline at end of file diff --git a/fixtures/status-credentials/multi-purpose-ok.jsonld b/fixtures/status-credentials/multi-purpose-ok.jsonld deleted file mode 100644 index 8bbd2ac..0000000 --- a/fixtures/status-credentials/multi-purpose-ok.jsonld +++ /dev/null @@ -1,17 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2" - ], - "type": [ - "VerifiableCredential", - "BitstringStatusListCredential" - ], - "credentialSubject": { - "type": "BitstringStatusList", - "statusPurpose": [ - "revocation", - "suspension" - ], - "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" - } - } \ No newline at end of file diff --git a/fixtures/status-credentials/short-encoded-list-fail.jsonld b/fixtures/status-credentials/short-encoded-list-fail.jsonld deleted file mode 100644 index 5e173d8..0000000 --- a/fixtures/status-credentials/short-encoded-list-fail.jsonld +++ /dev/null @@ -1,16 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2" - ], - "type": [ - "VerifiableCredential", - "BitstringStatusListCredential" - ], - "credentialSubject": { - "type": "BitstringStatusList", - "statusPurpose": [ - "revocation" - ], - "encodedList": "H4sIAN7Lo2YC_2NgwAEAjw7P6RkAAAA" - } - } \ No newline at end of file diff --git a/fixtures/status-credentials/single-purpose-fail.jsonld b/fixtures/status-credentials/single-purpose-fail.jsonld deleted file mode 100644 index e0dcca8..0000000 --- a/fixtures/status-credentials/single-purpose-fail.jsonld +++ /dev/null @@ -1,14 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2" - ], - "type": [ - "VerifiableCredential", - "BitstringStatusListCredential" - ], - "credentialSubject": { - "type": "BitstringStatusList", - "statusPurpose": "randomPurpose", - "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" - } - } \ No newline at end of file diff --git a/fixtures/status-credentials/single-purpose-ok.jsonld b/fixtures/status-credentials/single-purpose-ok.jsonld deleted file mode 100644 index f7c9f75..0000000 --- a/fixtures/status-credentials/single-purpose-ok.jsonld +++ /dev/null @@ -1,14 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2" - ], - "type": [ - "VerifiableCredential", - "BitstringStatusListCredential" - ], - "credentialSubject": { - "type": "BitstringStatusList", - "statusPurpose": "revocation", - "encodedList": "H4sIACbOo2YC_-3QMREAMAgEsGerLPyrQgFjB-4SCUkWHQAAAAAAAOCwpwAAAADgrFIAAAAAAAAAAAAAAAAA3wxvOeOvqGEAAA" - } - } \ No newline at end of file