Skip to content

Commit a254e0e

Browse files
committed
style: make linters happy
1 parent 4c807a5 commit a254e0e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ We'll see how we can submit an execution order to set the file accessible throug
3434
### Prerequistes
3535

3636
Some tools are needed in order to run the example:
37+
3738
- [docker](https://docs.docker.com/engine/install/)
3839
- [okp4d](https://github.com/okp4/okp4d)
3940
- [jsonld](https://github.com/digitalbazaar/jsonld-cli)
4041

4142
The local chain must be running with our [contracts](https://github.com/okp4/contracts) stored.
4243

43-
The local configuration of `okp4d` in `$OKP4D_HOME/config/client.toml` shall be self-sufficient to sign and broadcast transaction without additional command flags (e.g. `--chain-id`, `--keyring-backend`, etc..)
44+
The local configuration of `okp4d` in `$OKP4D_HOME/config/client.toml` shall be self-sufficient to sign and broadcast transaction without additional command flags (e.g. `--chain-id`, `--keyring-backend`, etc..)
4445

4546
### Steps
4647

@@ -90,6 +91,7 @@ okp4d tx wasm instantiate $DATAVERSE_CODE_ID \
9091
#### Declare resources
9192

9293
Now let's declare the storage service and the dataset in the dataverse: we'll have for each one two verifiable credentials, one for the description and one referencing the governance. Then, another one will be needed to express that the dataset is served by our minio storage service, providing its protected proxy URL. Those verifiable credentials are available here:
94+
9395
- [example/vc-s3-desc.jsonld]
9496
- [example/vc-s3-gov.jsonld]
9597
- [example/vc-data-desc.jsonld]
@@ -102,6 +104,7 @@ Those VCs are not signed. For that we'll need to have some cryptographic keys to
102104
You can list the keys with `okp4d --keyring-backend test --keyring-dir example keys list` if needed.
103105

104106
To sign and submit the verifiable credentials we have a simple script that you can use:
107+
105108
```bash
106109
./scripts/setup.sh $MY_WALLET_ADDR $DATAVERSE_ADDR
107110
```
@@ -110,11 +113,13 @@ To sign and submit the verifiable credentials we have a simple script that you c
110113

111114
Here we need to run the minio and deploy our dataset on it. For that, we provide a [docker-compose.yml]: it will run a MinIO instance accessible at `http://localhost:9000`.For demonstration purposes, this setup will make the `README` file of this project available as part of the dataset at `http://localhost:9000/test/README.md`.
112115
You can start the compose with:
116+
113117
```bash
114118
docker compose up
115119
```
116120

117121
Now we'll run the proxy through which we'll connect to the dataverse with:
122+
118123
```bash
119124
./target/dist/s3-auth-proxy start --listen-addr 0.0.0.0:8080 \
120125
--jwt-secret-key 1d5be173d43385b984ef8c73fe4fb9e5ca5a31466f20bf8a250d06eec5f3079b \
@@ -132,30 +137,35 @@ Now we'll run the proxy through which we'll connect to the dataverse with:
132137
For this step, we'll act ourselves as the initiator of the execution order, and the orchestration service that'll fulfill the order, to demonstrate the interactions with the proxy.
133138

134139
Let's create the execution order, and the execution containing the status and the parameters:
140+
135141
```bash
136142
./scripts/order-exec.sh $MY_WALLET_ADDR $DATAVERSE_ADDR
137143
```
138144

139145
#### Access the dataset
140146

141147
At this point, submitting an authentication verifiable credential signed with the orchestration service keys we should be able to access the dataset, let's forge this credential:
148+
142149
```bash
143150
./scripts/issue-auth-cred.sh > vc-auth.jsonld
144151
```
145152

146153
And then issue an authentication request to obtain an access token:
154+
147155
```bash
148156
curl -s -X POST -T ./vc-auth.jsonld http://localhost:8080/auth
149157
```
150158

151159
Now we should be able to get through the proxy authorization layer with our access token:
160+
152161
```bash
153162
curl -s -H "Authorization: Bearer $TOKEN" http://localhost:8080/test/README.md
154163
```
155164

156165
#### Terminate the execution
157166

158167
We just need to submit a credential expressing an execution status of delivered:
168+
159169
```bash
160170
./scripts/end-exec.sh $MY_WALLET_ADDR $DATAVERSE_ADDR
161171
```

0 commit comments

Comments
 (0)