-
Notifications
You must be signed in to change notification settings - Fork 160
Proof shouldn't override/hardcode jsonld contexts #1833
Comments
It was implemented in accordance with the reference implementation by Digitalbazaar. If we want to be compatible with their implementation, we should leave the context substitution as is by default. This means that |
@kdimak @sudeshrshetty @fqutishat I'm not sure about the implications on interop, but here is an example of an JSON-LD document for which downstream projects are verifying proofs using Example{
"@context": "https://w3id.org/security/v2",
"id": "http://www.example.org/foo/documents/a3480d17-df7f-449f-9480-e2c35e20a865",
"allowedAction": ["read", "write"],
"invocationTarget": {
"ID": "http://www.example.org/foo/documents/a3480d17-df7f-449f-9480-e2c35e20a865",
"Type": "urn:edv:document"
},
"proof": [{
"created": "2020-12-04T15:28:14.673975717-05:00",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..6OfIULug35ZmoU7lysChVpD6sjYfV71UwxqIZ8u0woYSIzRtzCo3MsZJw6cGIZMEaMssnQyRqIzo8B0yHEL2Dw",
"nonce": "da7CcJahAdFG0GXN-JnS2f2mywcFNtaLyXtGVqku2DwVwUaJbGpUQjhlNi5kDbS4ZMi2cNhEN5ac6LponS-C9w",
"proofPurpose": "capabilityDelegation",
"type": "Ed25519Signature2018",
"verificationMethod": "did:key:z6MkmkFTTczYKzU94t45sG65iZi2HA21tAU9ns8bXSmBEap4#z6MkmkFTTczYKzU94t45sG65iZi2HA21tAU9ns8bXSmBEap4"
}]
} Every single one of the terms in that document are defined between https://w3id.org/security/v1 and https://w3id.org/security/v2, so there's no need for the trustbloc context in this case. You can confirm this by removing the cache from this line and see that it works. It seems most if not all the signature suites are using The problem we are facing downstream is a panic due to |
Example goroutine stacktraces: AddDocument
LoadDocument
|
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code in the framework. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code in the framework. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code in the framework. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code in the framework. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code in the framework. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
This change creates a local JSON-LD Document Cache loader using a cache of type *sync.Map to avoid 'error on cache writes' panics. This change also introduces the 'benchmark' Make target to support benchmarking code in the framework. closes hyperledger-archives#1833 for the fatal error mentioned in the comment Also related and closes the discussion about the same panic topic in hyperledger-archives#2487 Signed-off-by: Baha Shaaban <[email protected]>
It is json ld doc author's responsibility to pass proof related contexts. Aries shouldn't override/hardcode contexts.
Currently "JsonWebSignature2020" is treated as invalid RDF even though proper context is available in VC.
Because aries proof digest calculator overrides it and adds its own context which doesn't have JsonWebSignature2020.
https://github.com/hyperledger/aries-framework-go/blob/b077c8b62a512a89a9c8caa7ca95ee397f458380/pkg/doc/signature/proof/jws.go#L109
The text was updated successfully, but these errors were encountered: