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
{{ message }}
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
In order to be able to do command line curl demos, we will assume that
56
-
Ian has saved his certificate and private key in the [`cert.pem`](#ians-ssl-certificate) file locally. (Of course it is not needed to do this in browsers...)
57
+
Ian has saved his certificate and private key in the [`cert.pem`](#ians-ssl-certificate) file locally. (Of course it is not needed to do this in browsers...)
57
58
58
59
The certificate public key is the one in the profile.
59
60
60
61
61
-
### Ian posts the file
62
+
### Ian posts the file
62
63
63
64
Here curl makes the connection, and authenticates Ian with his Certificate. As a result the content is created.
64
65
65
-
```bash
66
+
```sh
66
67
$ curl -X POST -k -i -H "Content-Type: text/turtle" \
So the `<financials>` resource is created in the LDP container `</2014/>` . Let us imagine that the `<financials.acl>` resource indeed limits it currently to only be viewed by the owner Ian.
To allow access to the resource to Jan, Ian must send the following
103
+
To allow access to the resource to Jan, Ian must send the following
101
104
PATCH, using his certificate as he is the only one authorised to patch the resource.
102
105
103
-
```
106
+
```http
104
107
PATCH /2014/financials.acl HTTP/1.1
105
108
Host: ian.name:443
106
109
Content-Type: application/sparql-update; utf-8
107
110
Content-Length: 120
108
-
111
+
```
112
+
```sparql
109
113
Prefix acl: <http://www.w3.org/ns/auth/acl#> .
110
-
INSERT DATA {
114
+
INSERT DATA {
111
115
[] acl:accessTo </2014/financials>;
112
116
acl:mode acl:Read;
113
117
acl:agent <https://jane.org/profile#me> .
@@ -122,13 +126,14 @@ Ian's software ( server or client - it does not matter ) somehow needs to find o
122
126
123
127
Given that we have shown the obvious way to query in other examples, we show here out of interest a potential optimisation that would send the query in the body of the GET (see [discussion on http-wg list](https://lists.w3.org/Archives/Public/ietf-http-wg/2015AprJun/0317.html) ). (The query could also be in a `Query` header.)
The acl is in `</pingInbox/ping20.wac>` and it may say that the resource is only readable by the owner of the `</pingInbox/>` container and the sender of the resource in R/W.
182
188
183
-
{>> we need to find a way to have an ACL that automatically adds the
189
+
{>> we need to find a way to have an ACL that automatically adds the
184
190
author of the ACL to the authorisation <<} .
185
-
191
+
186
192
At this point we have the following set of links:
187
193
188
-

194
+

189
195
190
196
### Jane views the file
191
197
@@ -195,9 +201,9 @@ Jane reads her inbox at some point, and just does a normal GET on the `<https://
195
201
196
202
### Ian's ssl certificate
197
203
198
-
You need
204
+
You need
199
205
200
-
```bash
206
+
```sh
201
207
$ openssl x509 -in IanCert.pem -inform pem -text
202
208
Certificate:
203
209
Data:
@@ -240,7 +246,7 @@ Certificate:
240
246
Digital Signature, Non Repudiation, Key Encipherment, Key Agreement, Certificate Sign
0 commit comments