Skip to content

Commit

Permalink
feat(CAHN Demo Server): 🐛 update server schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
A9-dev committed Sep 5, 2024
1 parent 0c16f6c commit 257194d
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 18 deletions.
19 changes: 5 additions & 14 deletions packages/cahn_demo/client/src/schemas/manufacturer_trust.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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"
},
Expand All @@ -38,11 +33,7 @@
"type": "integer"
}
},
"required": [
"user_id",
"manufacturer_id",
"created_at"
]
"required": ["authoriser_id", "manufacturer_id", "created_at"]
}
}
}
}
6 changes: 5 additions & 1 deletion packages/cahn_demo/server/emailToPublicKeys.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"henry@nquiringminds.com": [
"9TgqqUgXTTNBuD7qz9vNouf/26IhCucYpivXoUqSvI8="
]
}
6 changes: 3 additions & 3 deletions packages/cahn_demo/server/output/output_db.pl
Original file line number Diff line number Diff line change
@@ -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")).
Expand Down Expand Up @@ -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")).
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Original file line number Diff line number Diff line change
@@ -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
}
}
Original file line number Diff line number Diff line change
@@ -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"}}
Original file line number Diff line number Diff line change
@@ -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"}}
Original file line number Diff line number Diff line change
@@ -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}}}
Original file line number Diff line number Diff line change
@@ -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"}}

0 comments on commit 257194d

Please sign in to comment.