You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+175-9Lines changed: 175 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,8 +195,10 @@ with the `type: VerifiableCredential` - in the example below, the **Animal Welfa
195
195
the role for **Data Access** are the claim. Since **Animal Welfare** is creating the credential, they are the issuer, and **Alice** is the subject. The issuer
196
196
signs the credential with their private key.
197
197
198
-
The private key `0b6366519a40eb4f384f7f84cf8bb716683ad1af8adbe60e59fe24ba042e396a` is used for all users throughout the tutorial,
199
-
since the associated public key is the one that has been stored on the public web as a decentralised identifier. The necessary information
198
+
The private key used for signing the credential should not be shared, but for this tutorial,
199
+
`0b6366519a40eb4f384f7f84cf8bb716683ad1af8adbe60e59fe24ba042e396a` is used for all users throughout
200
+
the requests,
201
+
since the associated public key is the one that has been stored on the public web as a [decentralised identifier](https://fiware.github.io//tutorials.Step-by-Step/alice/did.json). The necessary information
Now that Alice has been given a Verifiable credential, she can use it to claim the role of Operator within the Data Space and gain Access to the Vetenary Records. A First attempt to access the records without holding a token results in an error, indicating that the verifier is present on port `1030`
582
584
583
-
#### Accessing the Vetenary Records without a Veriable Credential
585
+
#### Accessing the Vetenary Records without a Verifiable Credential
584
586
585
587
#### 5️⃣ Request:
586
588
@@ -602,7 +604,7 @@ The response is a **401 - Unauthorized** error code with the following response
602
604
```
603
605
604
606
605
-
### Accessing the Vetenary Records with an invalid Veriable Credential
607
+
### Accessing the Vetenary Records with an invalid Verifiable Credential
606
608
607
609
The Verifiable Credential is added as a Bearer token to the Authorization header. The bearer token is a JWT which is then decoded and verified - if the content of the Bearer token does not match the claimed issuer, then the token is rejected.
608
610
@@ -631,7 +633,7 @@ In the case of a rejected credentila The response is a **401 - Unauthorized** er
631
633
632
634
Note that a real Credential Verifier would not only check that all the claimed issuers of credentials had really signed each verifiable credential, but also ensure that the `exp` and `nbf` are also in range.
633
635
634
-
### Accessing the Vetenary Records with a valid Veriable Credential
636
+
### Accessing the Vetenary Records with a valid Verifiable Credential
635
637
636
638
With a proper Verifiable Presentation, the **Animal** records can be accessed:
637
639
@@ -679,7 +681,7 @@ following output:
679
681
OperatorCredential issued by did:web:fiware.github.io:tutorials.Step-by-Step:animal-welfare was NOT TRUSTED
680
682
```
681
683
682
-
This is because a further check is required. Not only must the Verifiable Credential be signed by the issuer, but the issuer must be a valid issuer of credentials within the data space. The way that a verifier checks this, is that it must contact a trusted issuers list. The location of this list is defined within the configuration service associated to the Verifiable Credentials verifier.
684
+
This is because in reality, a further check is required. Not only must the Verifiable Credential be signed by the issuer, but the issuer must be a valid issuer of credentials within the data space. The way that a verifier checks this, is that it must contact a trusted issuers list. The location of this list is defined within the configuration service associated to the Verifiable Credentials verifier.
683
685
684
686
### Checking for trusted issuers
685
687
@@ -719,25 +721,189 @@ The response indicates that VerifiableCredentials can be checked against the tru
719
721
720
722
### Reading a trusted issuers list
721
723
724
+
The trusted issuers list is usually maintained by the operator of the data space. It holds information about who is a valid user, and what sort of actions that issuer is allowed to generate, A trusted issuers list can be found running on port 8080 - initially there are no valid issuers available.
725
+
722
726
#### 9️⃣ Request:
723
727
724
728
```console
725
-
729
+
curl -L 'localhost:8080/v4/issuers'
726
730
```
727
731
728
732
#### Response:
729
733
734
+
```json
735
+
{
736
+
"self": "/v4/issuers/",
737
+
"items": [],
738
+
"total": 0,
739
+
"pageSize": 0,
740
+
"links": null
741
+
}
742
+
```
743
+
730
744
731
-
### Verifying a Verifiable Credential
745
+
### Adding a trusted issuer to the trusted issuers list
746
+
747
+
To Add a trusted issuer, make a **POST** request to the `/issuer` endpoint. You can see here that the issuer is `did:web:fiware.github.io:tutorials.Step-by-Step:animal-welfare` and that organisation is allowed to Create **OperatorCredentials** with two separate roles - `OPERATOR` and `VISITOR`
This trusted issuers list is able to retrieve issuer rights in two different formats. Initially we shall retrieve plain-text issuer information by making a **GET** request to the
As you can see the `role:OPERATOR` is indeed a valid setting for `did:web:fiware.github.io:tutorials.Step-by-Step:animal-welfare` to create. Matching these values
905
+
would allow a real data space connector to permit or deny access using their PEP.
0 commit comments