Open securedimensions opened 2 months ago
Your did document is odd, you set the type to Ed25519VerificationKey2018
but display the key as a json web key. Ed25519VerificationKey2018
requires a publicKeyBase58
representation of the public key. Change the the verificationMethod type to JsonWebKey2020
to use jwk. Also you are using the Ed25519Signature2018
crytosuite which should technically match with a Ed25519VerificationKey2018
. If you want to use JWK I would use a different securing mechanism such as jwt-vc or JsonWebSignature2020
. Aca-py will support jwt-vc, but not JsonWebSignature2020
for the time being. You can also just represent the key as the publicKeyBase58
form and aca-py should be able to verify this credential.
The univerifier also has a hard time verifying your proof
Thank you for the quick answer!
The problem is that I cannot change the DiD document as it's given.
However, I found another VC that validates with the univerifier but does not with Aries:
{
"credentialSubject": {
"date": "2024-08-31T00:00:00.000000Z/2024-08-31T00:00:00.000000Z",
"bbox": [
-44.078494,
-3.931139,
-34.874524,
4.18639
],
"links": {
"data": [
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_CMASK_GRID_SURFACE.tif",
"title": "CMASK",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND1_GRID_SURFACE.tif",
"title": "BAND1",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND2_GRID_SURFACE.tif",
"title": "BAND2",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND3_GRID_SURFACE.tif",
"title": "BAND3",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND4_GRID_SURFACE.tif",
"title": "BAND4",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
}
],
"previews": [
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015.png",
"title": "Preview",
"type": "image/png"
}
]
},
"geometry": {
"coordinates": [
[
[
-44.078494,
-3.931139
],
[
-44.078494,
4.18639
],
[
-34.874524,
4.18639
],
[
-34.874524,
-3.931139
],
[
-44.078494,
-3.931139
]
]
],
"type": "Polygon"
},
"id": "did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015",
"title": "AMAZONIA_1_WFI_20240831_034_015",
"updated": "2024-09-05T19:03:04.887222Z"
},
"issuanceDate": "2024-09-12T06:47:20Z",
"id": "did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015",
"proof": {
"created": "2024-09-12T06:47:21.017Z",
"jws": "eyJhbGciOiJFUzI1NksiLCJjcml0IjpbImI2NCJdLCJiNjQiOmZhbHNlfQ..ParvZXf2mVJ_Ip2FuCjpl26eGJokz5cABS-bJEXFrWEBeMGlJilZJiCGBLBV6Zwzhs8QCLsi9HXgofrkeE4j6A",
"proofPurpose": "assertionMethod",
"type": "EcdsaSecp256k1Signature2019",
"verificationMethod": "did:web:emc.spacebel.be:organisations:br_inpe#owner"
},
"type": [
"VerifiableCredential",
"Feature"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"date": "dct:date",
"gj": "https://purl.org/geojson/vocab#",
"data": "iana:enclosure",
"bbox": {
"@id": "gj:bbox",
"@container": "@list"
},
"coordinates": "gj:coordinates",
"title": "dct:title",
"Feature": "gj:Feature",
"dct": "http://purl.org/dc/terms/",
"previews": "iana:icon",
"geometry": "gj:geometry",
"iana": "http://www.iana.org/assignments/relation/",
"links": {
"@id": "owc:links",
"@context": {
"@vocab": "http://www.iana.org/assignments/relation/",
"type": "atom:type"
}
},
"owc": "http://www.opengis.net/ont/owc/1.0/",
"href": "@id",
"id": "@id",
"Polygon": "gj:Polygon",
"atom": "http://www.w3.org/2005/Atom/",
"updated": "dct:modified"
}
],
"issuer": "did:web:emc.spacebel.be:organisations:br_inpe"
}
Feeding this into the univerifier, the verification result is
VERIFIED: true
ISSUER: did:web:emc.spacebel.be:organisations:br_inpe
SUBJECT: did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015
CHECKS: credential-parse: true
CHECKS: credential-proof: EcdsaSecp256k1Signature2019/secp256k1 (ES256K)
CHECKS: issuance-date: true
CHECKS: ebsi-tir (no data)
CHECKS: did-lei (no data)
Feeding the same VC into /vc/verify
produces the following respone (with errors):
request:
{
"options": {},
"verifiableCredential": {
"credentialSubject": {
"date": "2024-08-31T00:00:00.000000Z/2024-08-31T00:00:00.000000Z",
"bbox": [
-44.078494,
-3.931139,
-34.874524,
4.18639
],
"links": {
"data": [
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_CMASK_GRID_SURFACE.tif",
"title": "CMASK",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND1_GRID_SURFACE.tif",
"title": "BAND1",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND2_GRID_SURFACE.tif",
"title": "BAND2",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND3_GRID_SURFACE.tif",
"title": "BAND3",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND4_GRID_SURFACE.tif",
"title": "BAND4",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
}
],
"previews": [
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015.png",
"title": "Preview",
"type": "image/png"
}
]
},
"geometry": {
"coordinates": [
[
[
-44.078494,
-3.931139
],
[
-44.078494,
4.18639
],
[
-34.874524,
4.18639
],
[
-34.874524,
-3.931139
],
[
-44.078494,
-3.931139
]
]
],
"type": "Polygon"
},
"id": "did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015",
"title": "AMAZONIA_1_WFI_20240831_034_015",
"updated": "2024-09-05T19:03:04.887222Z"
},
"issuanceDate": "2024-09-12T06:47:20Z",
"id": "did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015",
"proof": {
"created": "2024-09-12T06:47:21.017Z",
"jws": "eyJhbGciOiJFUzI1NksiLCJjcml0IjpbImI2NCJdLCJiNjQiOmZhbHNlfQ..ParvZXf2mVJ_Ip2FuCjpl26eGJokz5cABS-bJEXFrWEBeMGlJilZJiCGBLBV6Zwzhs8QCLsi9HXgofrkeE4j6A",
"proofPurpose": "assertionMethod",
"type": "EcdsaSecp256k1Signature2019",
"verificationMethod": "did:web:emc.spacebel.be:organisations:br_inpe#owner"
},
"type": [
"VerifiableCredential",
"Feature"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"date": "dct:date",
"gj": "https://purl.org/geojson/vocab#",
"data": "iana:enclosure",
"bbox": {
"@id": "gj:bbox",
"@container": "@list"
},
"coordinates": "gj:coordinates",
"title": "dct:title",
"Feature": "gj:Feature",
"dct": "http://purl.org/dc/terms/",
"previews": "iana:icon",
"geometry": "gj:geometry",
"iana": "http://www.iana.org/assignments/relation/",
"links": {
"@id": "owc:links",
"@context": {
"@vocab": "http://www.iana.org/assignments/relation/",
"type": "atom:type"
}
},
"owc": "http://www.opengis.net/ont/owc/1.0/",
"href": "@id",
"id": "@id",
"Polygon": "gj:Polygon",
"atom": "http://www.w3.org/2005/Atom/",
"updated": "dct:modified"
}
],
"issuer": "did:web:emc.spacebel.be:organisations:br_inpe"
}
}
response:
Server response
Code Details
200
Response body
Download
{
"verified": false,
"document": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"date": "dct:date",
"gj": "https://purl.org/geojson/vocab#",
"data": "iana:enclosure",
"bbox": {
"@id": "gj:bbox",
"@container": "@list"
},
"coordinates": "gj:coordinates",
"title": "dct:title",
"Feature": "gj:Feature",
"dct": "http://purl.org/dc/terms/",
"previews": "iana:icon",
"geometry": "gj:geometry",
"iana": "http://www.iana.org/assignments/relation/",
"links": {
"@id": "owc:links",
"@context": {
"@vocab": "http://www.iana.org/assignments/relation/",
"type": "atom:type"
}
},
"owc": "http://www.opengis.net/ont/owc/1.0/",
"href": "@id",
"id": "@id",
"Polygon": "gj:Polygon",
"atom": "http://www.w3.org/2005/Atom/",
"updated": "dct:modified"
}
],
"id": "did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015",
"type": [
"VerifiableCredential",
"Feature"
],
"issuer": "did:web:emc.spacebel.be:organisations:br_inpe",
"issuanceDate": "2024-09-12T06:47:20Z",
"credentialSubject": {
"date": "2024-08-31T00:00:00.000000Z/2024-08-31T00:00:00.000000Z",
"bbox": [
-44.078494,
-3.931139,
-34.874524,
4.18639
],
"links": {
"data": [
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_CMASK_GRID_SURFACE.tif",
"title": "CMASK",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND1_GRID_SURFACE.tif",
"title": "BAND1",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND2_GRID_SURFACE.tif",
"title": "BAND2",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND3_GRID_SURFACE.tif",
"title": "BAND3",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
},
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015_L4_BAND4_GRID_SURFACE.tif",
"title": "BAND4",
"type": "image/tiff; application=geotiff; profile=cloud-optimized"
}
],
"previews": [
{
"href": "https://data.inpe.br/bdc/data/amazonia_wfi/2024_08/AMAZONIA_1_WFI_RAW_2024_08_31.13_13_30_CB10/034_015_0/4_BC_LCC_WGS84/AMAZONIA_1_WFI_20240831_034_015.png",
"title": "Preview",
"type": "image/png"
}
]
},
"geometry": {
"coordinates": [
[
[
-44.078494,
-3.931139
],
[
-44.078494,
4.18639
],
[
-34.874524,
4.18639
],
[
-34.874524,
-3.931139
],
[
-44.078494,
-3.931139
]
]
],
"type": "Polygon"
},
"id": "did:web:emc.spacebel.be:collections:AMZ1-WFI-L4-SR-1:items:AMAZONIA_1_WFI_20240831_034_015",
"title": "AMAZONIA_1_WFI_20240831_034_015",
"updated": "2024-09-05T19:03:04.887222Z"
},
"proof": {
"type": "EcdsaSecp256k1Signature2019",
"proofPurpose": "assertionMethod",
"verificationMethod": "did:web:emc.spacebel.be:organisations:br_inpe#owner",
"created": "2024-09-12T06:47:21.017Z",
"jws": "eyJhbGciOiJFUzI1NksiLCJjcml0IjpbImI2NCJdLCJiNjQiOmZhbHNlfQ..ParvZXf2mVJ_Ip2FuCjpl26eGJokz5cABS-bJEXFrWEBeMGlJilZJiCGBLBV6Zwzhs8QCLsi9HXgofrkeE4j6A"
}
},
"errors": [
"Could not verify any proofs; no proofs matched the required suites (Ed25519Signature2018, Ed25519Signature2020) and purpose (assertionMethod)"
]
}
This now looks like a missing support for EcdsaSecp256k1Signature2019
, right?
Why is the purpose in error?
I'm using the Aries Cloud Agent v1.0.0. How can I make it work?
You are correct, ACA-py only supports ED25519Signature2018
/ED25519Signature2020
. Support for EcdsaSecp256k1Signature2019
would be a good addition to, and should be simpler to implement on the verification side. If you're interested to look into this, you can create a EcdsaSecp256k1Signature2019
suite here.
Summary
The verification of a W3C VC return error
when the public key is resolved via the dev.uniresolver.io. The resolver returns the public key as
publicKeyJwk
ratherpublicKeyBase58
as required by aries-cloudagent.https://dev.uniresolver.io/1.0/identifiers/did%3Aweb%3Aemc.spacebel.be%3Aorganisations%3Ade_dlr
returnsReproducing the error
First, start aca-py with the parameters
--universal-resolver --universal-resolver-regex did:web:.*
to enable the universal resolver for external DIDs. Second, send W3C VC verification request to endpoint/vc/credentials/verify
:This returns the error
Question
Can I activate the support for
publicKeyJwk
somehow?