diff --git a/packages/cahn_demo/client/src/schemas/manufacturer_trust.json b/packages/cahn_demo/client/src/schemas/manufacturer_trust.json index a37b136..dcb0c88 100644 --- a/packages/cahn_demo/client/src/schemas/manufacturer_trust.json +++ b/packages/cahn_demo/client/src/schemas/manufacturer_trust.json @@ -1,12 +1,7 @@ { - "@context": [ - "https://www.w3.org/ns/credentials/v2" - ], + "@context": ["https://www.w3.org/ns/credentials/v2"], "id": "urn:uuid:5d5b937c-9011-486a-a0a9-50677706cfda", - "type": [ - "VerifiableCredential", - "UserCredential" - ], + "type": ["VerifiableCredential", "UserCredential"], "issuer": "urn:uuid:0368d2e7-d376-40de-9e61-a59ce3ee067c", "validFrom": "2024-08-28T14:15:50.312460Z", "credentialSchema": { @@ -25,7 +20,7 @@ "description": "A trust relationship between a user and manufacturer", "type": "object", "properties": { - "user_id": { + "authoriser_id": { "description": "id of the trusting user", "type": "string" }, @@ -38,11 +33,7 @@ "type": "integer" } }, - "required": [ - "user_id", - "manufacturer_id", - "created_at" - ] + "required": ["authoriser_id", "manufacturer_id", "created_at"] } } -} \ No newline at end of file +} diff --git a/packages/cahn_demo/server/emailToPublicKeys.json b/packages/cahn_demo/server/emailToPublicKeys.json index 0967ef4..0bfadfc 100644 --- a/packages/cahn_demo/server/emailToPublicKeys.json +++ b/packages/cahn_demo/server/emailToPublicKeys.json @@ -1 +1,5 @@ -{} +{ + "henry@nquiringminds.com": [ + "9TgqqUgXTTNBuD7qz9vNouf/26IhCucYpivXoUqSvI8=" + ] +} \ No newline at end of file diff --git a/packages/cahn_demo/server/output/output_db.pl b/packages/cahn_demo/server/output/output_db.pl index d5997ba..1df658c 100644 --- a/packages/cahn_demo/server/output/output_db.pl +++ b/packages/cahn_demo/server/output/output_db.pl @@ -1,5 +1,5 @@ -created(1725542006.4788601). -assert(device_type_trust("henry@nquiringminds.com",1725541664677,"EvilPhone-id")). +created(1725542455.6824172). +assert(manufacturer_trust("henry@nquiringminds.com",1725542436629,"EvilInc-id")). assert(device_type(1723716151033,"TrustPhone-id","TrustPhone")). assert(device_type(1723716151033,"VulnerableCamera-id","VulnerableCamera")). assert(device_type(1723716151033,"EvilPhone-id","EvilPhone")). @@ -29,4 +29,4 @@ assert(sbom(1723716151033,"VulnerableCameraSBOM-id","VulnerableCamera SBOM information")). assert(manufacturer(1723716151033,"EvilInc-id","EvilInc")). assert(manufacturer(1723716151033,"TrustCorp-id","TrustCorp")). -assert(user(false,true,true,1725541960614,"henry@nquiringminds.com","henry-user")). +assert(user(false,false,true,1725542453617,"henry@nquiringminds.com","henry-user")). diff --git a/packages/cahn_demo/server/uploads/vcs/custom/User_VC_1725542453617.json b/packages/cahn_demo/server/uploads/vcs/custom/User_VC_1725542453617.json new file mode 100644 index 0000000..a81f5c3 --- /dev/null +++ b/packages/cahn_demo/server/uploads/vcs/custom/User_VC_1725542453617.json @@ -0,0 +1,34 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "id": "urn:uuid:3a64bb70-5fe7-468c-8027-ac6073ffd96f", + "type": [ + "VerifiableCredential", + "UserCredential" + ], + "name": null, + "description": null, + "issuer": "urn:uuid:5e0d3bf0-f574-46e4-95cf-414b325d59eb", + "validFrom": "2024-09-05T13:20:53.617Z", + "validUntil": null, + "credentialStatus": null, + "credentialSchema": { + "id": "test", + "type": "JsonSchema" + }, + "credentialSubject": { + "type": "fact", + "schemaName": "user", + "id": "396b5d45-92d7-4e41-ba24-30a1fb14a9bf", + "timestamp": 1725542453617, + "fact": { + "can_issue_device_trust": false, + "can_issue_manufacturer_trust": true, + "can_issue_device_type_trust": false, + "created_at": 1725542453617, + "id": "henry@nquiringminds.com", + "username": "henry-user" + } + } +} \ No newline at end of file diff --git a/packages/cahn_demo/server/uploads/vcs/custom/User_retraction_1725542453617.json b/packages/cahn_demo/server/uploads/vcs/custom/User_retraction_1725542453617.json new file mode 100644 index 0000000..2200e62 --- /dev/null +++ b/packages/cahn_demo/server/uploads/vcs/custom/User_retraction_1725542453617.json @@ -0,0 +1,16 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "id": "urn:uuid:cf8b9777-9662-4b0d-9102-868b60b8f27f", + "type": [ + "VerifiableCredential", + "RetractionCredential" + ], + "issuer": "urn:uuid:433b3e77-2fd1-4a38-ae2c-632ee3d5a3c8", + "credentialSubject": { + "type": "retraction", + "claim_id": "4a2dd4b7-c9b4-4e0b-8bfe-017e6c884d0e", + "timestamp": 1725542453617 + } +} \ No newline at end of file diff --git a/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542338502.json b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542338502.json new file mode 100644 index 0000000..5560cfd --- /dev/null +++ b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542338502.json @@ -0,0 +1 @@ +{"@context":["https://www.w3.org/ns/credentials/v2"],"id":"urn:uuid:5d5b937c-9011-486a-a0a9-50677706cfda","type":["VerifiableCredential","UserCredential"],"name":null,"description":null,"issuer":"urn:uuid:0368d2e7-d376-40de-9e61-a59ce3ee067c","validFrom":"2024-08-28T14:15:50.312460Z","validUntil":null,"credentialStatus":null,"credentialSchema":{"id":"https://github.com/nqminds/ClaimCascade/blob/claim_verifier/packages/claim_verifier/user.yaml","type":"JsonSchema"},"credentialSubject":{"fact":{"authoriser_id":"henry@nquiringminds.com","created_at":1725542338482,"manufacturer_id":"EvilInc-id"},"id":"0535dce5-855f-4ce7-99e5-2f15b9a51ed9","schemaName":"manufacturer_trust","timestamp":1716287268891,"type":"fact"},"proof":{"type":"JsonWebSignature2020","jws":"g8gXK/A6BaJlwr35Co045nU8KL1xbt5Rz4n2Ygh0e+Dwm/pjeTf8r0Jx6T3hO48jtfAlGz9CoN9KF6AAwuS0Bg==","proofPurpose":"assertionMethod","created":"2024-09-05T13:18:58.484Z"}} diff --git a/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542340139.json b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542340139.json new file mode 100644 index 0000000..758edf6 --- /dev/null +++ b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542340139.json @@ -0,0 +1 @@ +{"@context":["https://www.w3.org/ns/credentials/v2"],"id":"urn:uuid:4bbb62ae-8545-4952-91c8-fb2326d0e676","type":["VerifiableCredential","UserCredential"],"name":null,"description":null,"issuer":"urn:uuid:9f99b1d1-83bb-47a8-a402-dbb4463af850","validFrom":"2024-09-05T13:19:00.137Z","validUntil":null,"credentialStatus":null,"credentialSchema":{"id":"https://github.com/nqminds/ClaimCascade/blob/claim_verifier/packages/claim_verifier/user.yaml","type":"JsonSchema"},"credentialSubject":{"claim_id":"0535dce5-855f-4ce7-99e5-2f15b9a51ed9","id":"urn:uuid:ce89c669-b161-4efa-8b95-f7bdddd2d259","timestamp":1725542340137,"type":"retraction"},"proof":{"type":"JsonWebSignature2020","jws":"D/vXf9PuuGmsV20Eh7MNn610mBH3I75gf5P+/Jdt7y4cVpiv/xdJBjcA4qdkwlrpsLK0G5SJLjrQNZiP0+QsAA==","proofPurpose":"assertionMethod","created":"2024-09-05T13:19:00.137Z"}} diff --git a/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542430135.json b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542430135.json new file mode 100644 index 0000000..ae168d6 --- /dev/null +++ b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542430135.json @@ -0,0 +1 @@ +{"@context":["https://www.w3.org/ns/credentials/v2"],"id":"urn:uuid:cfd8e46c-a51f-463c-891f-7f43ce924f0d","type":["VerifiableCredential","UserCredential"],"name":null,"description":null,"issuer":"urn:uuid:585df7b5-8891-4630-9f5d-a5659f3abe04","validFrom":"2024-08-28T14:15:50.307579Z","validUntil":null,"credentialStatus":null,"credentialSchema":{"id":"https://github.com/nqminds/ClaimCascade/blob/claim_verifier/packages/claim_verifier/user.yaml","type":"JsonSchema"},"credentialSubject":{"type":"fact","schemaName":"user","id":"4a2dd4b7-c9b4-4e0b-8bfe-017e6c884d0e","timestamp":1716287268891,"fact":{"id":"henry@nquiringminds.com","username":"henry-user","created_at":1725542430135,"can_issue_device_trust":false,"can_issue_manufacturer_trust":false}}} diff --git a/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542436637.json b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542436637.json new file mode 100644 index 0000000..d0aaa7b --- /dev/null +++ b/packages/cahn_demo/server/uploads/vcs/custom/verifiable_credentials_1725542436637.json @@ -0,0 +1 @@ +{"@context":["https://www.w3.org/ns/credentials/v2"],"id":"urn:uuid:5d5b937c-9011-486a-a0a9-50677706cfda","type":["VerifiableCredential","UserCredential"],"name":null,"description":null,"issuer":"urn:uuid:0368d2e7-d376-40de-9e61-a59ce3ee067c","validFrom":"2024-08-28T14:15:50.312460Z","validUntil":null,"credentialStatus":null,"credentialSchema":{"id":"https://github.com/nqminds/ClaimCascade/blob/claim_verifier/packages/claim_verifier/user.yaml","type":"JsonSchema"},"credentialSubject":{"fact":{"authoriser_id":"henry@nquiringminds.com","created_at":1725542436629,"manufacturer_id":"EvilInc-id"},"id":"25f9263e-4468-47c1-b459-95e1d863a323","schemaName":"manufacturer_trust","timestamp":1716287268891,"type":"fact"},"proof":{"type":"JsonWebSignature2020","jws":"8hnCD11we+e5YVrWPmpgUXi2Qe8r8bEpj+irYREqA30UKfI1HWs9DAKMqxR7UrM6vhBBe42Q2E28oOLcKq0zBg==","proofPurpose":"assertionMethod","created":"2024-09-05T13:20:36.632Z"}}