Skip to content

Commit 0f57fb5

Browse files
authored
fix(examples)!: migrate credentialStatus to DID-based CRSet model (#46)
* fix(examples)!: migrate credentialStatus to DID-based CRSet model BREAKING CHANGE: credentialStatus entries use the new statusServiceOperator + statusIndex model instead of the old non-compliant DID path id notation. - Migrate all 5 SimpulseID credential examples to new format - Update test_examples_integrity.py: check statusServiceOperator and statusIndex - Update docs/credentials/index.md credential skeleton - Pin harbour-credentials submodule to fix/credential-status-did-compliance Refs: reachhaven/harbour-credentials#6 Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de> * fix(ci): create tag before git-cliff in workflow_dispatch releases (#47) When the release workflow is triggered via workflow_dispatch, the target tag does not yet exist in git history. git-cliff --latest picks up the previous tag instead of generating notes for the new release. Fix: create a lightweight local tag before running git-cliff so --latest resolves to the correct range. Also removes continue-on-error from the changelog step so failures are surfaced instead of silently swallowed. Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de> * chore(deps): pin harbour-credentials submodule to v1.1.0 release The PR previously pinned to a feature branch commit (dd572d6) on fix/credential-status-did-compliance. Update to the v1.1.0 release tag (b89ddae) which includes the same CRSet model fix via squash-merge, plus CI improvements and the TypeScript pipeline. Refs: reachhaven/harbour-credentials#6 Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de> --------- Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
1 parent f3ec6ca commit 0f57fb5

9 files changed

Lines changed: 36 additions & 18 deletions

.github/workflows/cd-release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ jobs:
5151
fi
5252
echo "tag=$TAG" >> $GITHUB_OUTPUT
5353
54+
- name: Ensure tag exists for changelog generation
55+
env:
56+
TAG: ${{ steps.tag.outputs.tag }}
57+
run: |
58+
if ! git rev-parse "$TAG" >/dev/null 2>&1; then
59+
git tag "$TAG"
60+
echo "Created lightweight tag $TAG at $(git rev-parse HEAD)"
61+
else
62+
echo "Tag $TAG already exists"
63+
fi
64+
5465
- name: Generate changelog
5566
id: changelog
5667
uses: orhun/git-cliff-action@v4
@@ -60,7 +71,6 @@ jobs:
6071
env:
6172
OUTPUT: CHANGELOG.md
6273
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
continue-on-error: true
6474

6575
- name: Create GitHub Release
6676
uses: softprops/action-gh-release@v3

docs/credentials/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ All credentials follow the W3C Verifiable Credentials Data Model v2.0 with three
4444
"type": "<subject-type>",
4545
"harbourCredential": "<harbour-gx-credential-urn>"
4646
},
47-
"credentialStatus": [{"type": "harbour:CRSetEntry", "statusPurpose": "revocation"}],
47+
"credentialStatus": [{"type": "harbour:CRSetEntry", "statusPurpose": "revocation", "statusServiceOperator": "<crset-operator-did>", "statusIndex": "<index>"}],
4848
"evidence": [{"type": ["harbour:CredentialEvidence"], "verifiablePresentation": "..."}]
4949
}
5050
```

examples/simpulseid-administrator-credential.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
},
3434
"credentialStatus": [
3535
{
36-
"id": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1/f8b8a8150acbbbf936df9692ed7ca809c9a6a66b190149ce9d4e9557587829ec",
3736
"type": "harbour:CRSetEntry",
38-
"statusPurpose": "revocation"
37+
"statusPurpose": "revocation",
38+
"statusServiceOperator": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1",
39+
"statusIndex": "f8b8a8150acbbbf936df9692ed7ca809c9a6a66b190149ce9d4e9557587829ec"
3940
}
4041
],
4142
"evidence": [

examples/simpulseid-ascs-base-membership-credential.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
},
2323
"credentialStatus": [
2424
{
25-
"id": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1/6239c5abac53d33fff4a9babaaae70f6c71ac495cface74d26ac1e3affee8c61",
2625
"type": "harbour:CRSetEntry",
27-
"statusPurpose": "revocation"
26+
"statusPurpose": "revocation",
27+
"statusServiceOperator": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1",
28+
"statusIndex": "6239c5abac53d33fff4a9babaaae70f6c71ac495cface74d26ac1e3affee8c61"
2829
}
2930
],
3031
"evidence": [

examples/simpulseid-ascs-envited-membership-credential.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
},
2424
"credentialStatus": [
2525
{
26-
"id": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1/b8ca800e6cf1807ed35c682ca7c84f07df55ad53a20784fe0ee896f279a6a047",
2726
"type": "harbour:CRSetEntry",
28-
"statusPurpose": "revocation"
27+
"statusPurpose": "revocation",
28+
"statusServiceOperator": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1",
29+
"statusIndex": "b8ca800e6cf1807ed35c682ca7c84f07df55ad53a20784fe0ee896f279a6a047"
2930
}
3031
],
3132
"evidence": [

examples/simpulseid-participant-credential.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646
},
4747
"credentialStatus": [
4848
{
49-
"id": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1/608101d3a8430e61f60dcf1be0f42ab3ceb52b6abffb9f75b6f36c80362fc25a",
5049
"type": "harbour:CRSetEntry",
51-
"statusPurpose": "revocation"
50+
"statusPurpose": "revocation",
51+
"statusServiceOperator": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1",
52+
"statusIndex": "608101d3a8430e61f60dcf1be0f42ab3ceb52b6abffb9f75b6f36c80362fc25a"
5253
}
5354
],
5455
"evidence": [

examples/simpulseid-user-credential.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
},
3434
"credentialStatus": [
3535
{
36-
"id": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1/9396f1d42a2a5eaa93a1a3211e4b0db85c8185d533b835984cd98d24ecba6440",
3736
"type": "harbour:CRSetEntry",
38-
"statusPurpose": "revocation"
37+
"statusPurpose": "revocation",
38+
"statusServiceOperator": "did:ethr:0x14a34:0x4612FbF84Ef87dfBc363c6077235A475502346d1",
39+
"statusIndex": "9396f1d42a2a5eaa93a1a3211e4b0db85c8185d533b835984cd98d24ecba6440"
3940
}
4041
],
4142
"evidence": [

tests/test_examples_integrity.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,16 @@ def test_base_membership_credential_resolves(path):
352352

353353
@pytest.mark.parametrize("path", EXAMPLE_FILES, ids=[f.stem for f in EXAMPLE_FILES])
354354
def test_credential_status_registry_resolves(path):
355-
"""credentialStatus id prefix must match the revocation registry DID."""
355+
"""credentialStatus statusServiceOperator must match the revocation registry DID."""
356356
vc = json.loads(path.read_text())
357357
for status in vc.get("credentialStatus", []):
358-
status_id = status.get("id", "")
359-
assert status_id.startswith(REVOCATION_REGISTRY_DID), (
360-
f"credentialStatus id '{status_id}' in {path.name} does not start "
361-
f"with revocation registry DID {REVOCATION_REGISTRY_DID}"
358+
operator = status.get("statusServiceOperator", "")
359+
assert operator == REVOCATION_REGISTRY_DID, (
360+
f"credentialStatus statusServiceOperator '{operator}' in {path.name} "
361+
f"does not match revocation registry DID {REVOCATION_REGISTRY_DID}"
362+
)
363+
assert status.get("statusIndex"), (
364+
f"credentialStatus in {path.name} is missing statusIndex"
362365
)
363366
assert REVOCATION_REGISTRY_DID in DID_DOCS, (
364367
f"Revocation registry DID {REVOCATION_REGISTRY_DID} has no DID document."

0 commit comments

Comments
 (0)