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
One thing to keep in mind is - if there are several hops (an ACL request chain
324
-
across more than one other domain), how does this change the delegation
325
-
confirmation algorithm? If the original server is explicitly authorized for
326
-
delegation by the user, what about the subsequent ones?
327
-
328
-
**ID Tokens/Bearer Tokens**. If you're using a token-based authentication system
329
-
such as OpenID Connect or OAuth2 Bearer Tokens, it will also need to implement
330
-
the ability to delegate its ACL requests on behalf of the original user. See
331
-
[PoP/RFC7800](https://tools.ietf.org/html/rfc7800) and [Authorization Cross
332
-
Domain Code](http://openid.bitbucket.org/draft-acdc-01.html) specs for relevant
333
-
examples.
334
-
335
-
##### Infinite Request Loops in Group Listings
336
-
337
-
Since Group Listings (which are linked to from ACL resources using
338
-
the `acl:agentGroup` predicate) reside in regular documents, those documents
339
-
will have their very own `.acl` resources that restrict which users (or groups)
340
-
are allowed to access or change them. This fact, that `.acl`s point to Group
341
-
Listings, which can have `.acl`s of their own, which can potentially also point
342
-
to Group Listings, and so on, introduces the potential for infinite loops
343
-
during ACL resolution.
344
-
345
-
Take the following situation with two different servers:
346
-
347
-
```
348
-
https://a.com https://b.com
349
-
------------- GET ---------------
350
-
group-listA <------ group-listB.acl
351
-
| ^ contains:
352
-
| | agentGroup <a.com/group-ListA>
353
-
v GET |
354
-
group-listA.acl ------> group-listB
355
-
contains:
356
-
agentGroup <b.com/group-listB>
357
-
```
358
-
359
-
The access to `group-listA` is controlled by `group-listA.acl`. So far so good.
360
-
But if `group-listA.acl` contains any `acl:agentGroup` references to *another*
361
-
group listing (say, points to `group-listB`), one runs into potential danger.
362
-
In order to retrieve that other group listing, the ACL-checking engine on
363
-
`https://b.com` will need to check the rules in `group-listB.acl`. And if
364
-
`group-listB.acl` (by accident or malice) points back to `group-listA` a request
365
-
will be made to access `group-listA` on the original server `https://a.com`,
366
-
which would start an infinite cycle.
367
-
368
-
To guard against these loops, implementers have several options:
369
-
370
-
**A) Do not allow cross-domain Group Listing resolutions**.
371
-
The simplest to implement (but also the most limited) option is to disallow
372
-
cross-domain Group Listings resolution requests. That is, the ACL-checking code
373
-
could detect `agentGroup` links pointing to external servers during ACL
374
-
resolution time, and treat those uniformly (as errors, or as automatic "access
375
-
denied").
376
-
377
-
**B) Treat Group Listings as special cases**.
378
-
This assumes that the server has the ability to parse or query the contents of a
379
-
Group Listing document *before* resolving ACL checks -- a design decision that
380
-
some implementations may find unworkable. If the ACL checking engine can inspect
381
-
the contents of a document and know that it's a Group Listing, it can put in
382
-
various safeguards against loops. For example, it could validate ACLs when they
383
-
are created, and disallow external Group Listing links, similar to option A
384
-
above. Note that even if you wanted to ensure that no `.acl`s are allowed for
385
-
Group Listings, and that all such documents would be public-readable, you would
386
-
still have to be able to tell Group Listings apart from other documents, which
387
-
would imply special-case treatment.
388
-
389
-
**C) Create and pass along a tracking/state parameter**.
390
-
For each ACL check request beyond the original server, it would be possible to
391
-
create a nonce-type tracking parameter and pass it along with each subsequent
392
-
request. Servers would then be able to use this parameter to detect loops on
393
-
each particular request chain. However, this is a spec-level solution (instead
394
-
of an individual implementation level), since all implementations have to play
395
-
along for this to work. See issue
396
-
[solid/solid#8](https://github.com/solid/solid/issues/8) for further
397
-
discussion).
398
-
399
-
**D) Ignore this issue and rely on timeouts.**
400
-
It's worth noting that if an infinite group ACL loop was created by mistake,
401
-
this will soon become apparent since requests for that resource will time out.
402
-
If the loop was created by malicious actors, this is comparable to a very
403
-
small, low volume DDOS attack, which experienced server operators know how to
404
-
guard against. In either case, the consequences are not disastrous.
296
+
Possible future methods for a server to find out whether a given agent is a
297
+
member of s group are a matter for future research and possible addition here.
405
298
406
299
### Public Access (All Agents)
407
300
@@ -455,6 +348,69 @@ An application of this feature is to throw a resource open to all logged on user
455
348
for a specific amount of time, accumulate the list of those who case as a group,
456
349
and then later restrict access to that group, to prevent spam.
457
350
351
+
### Referring to Origins, i.e. Web Apps
352
+
353
+
When a compliant server receives a request from a web application running
354
+
in a browser, the brrowser will send an extra warning HTTP header, the Origin header.
355
+
356
+
```
357
+
Origin: https://scripts.example.com:8080
358
+
```
359
+
Note that the origin comprises the protocol and the DNS and port but none of the path,
360
+
and no trailing slash.
361
+
All scripts running on the same origin are assumed to be run by the same
362
+
social entity, and so trusted to the same extent.
363
+
364
+
*When an Origin header is present then BOTH the authenticated agent AND
365
+
the origin MUST be allowed access*
366
+
367
+
As both the user and the web app get to read or write the data, then they most BOTH
368
+
be trusted.
369
+
370
+
- If the requested mode is available to the public, then suceed `200 OK`.
371
+
- If the user is *not* logged on, then fail `401 Unauthenticated`
372
+
- Is the User authenticated is *not* allowed access required, AND the class AuthenticatedAgent is not allowed access, then fail `403 User Unauthorized`
373
+
- If the Origin header is not present, the succeed `200 OK`
374
+
- If the Origin is allowed by the ACL, then succeed `200 OK` with added CORS headers ACAO and ACAH
375
+
- (In future proposed) Look up the user's webid to check for trusted apps declared there, and if match, succeed `200 OK`
376
+
- Fail `403 Origin Unauthorized`
377
+
378
+
Note it is a really good idea to make it clear both in the text of the status message and in the body of
379
+
the message the difference between the user not being allowed and the web app they are using
380
+
not bing trusted.
381
+
382
+
#### Adding trusted web apps.
383
+
384
+
The authorization of trusted web app is a running battle between readers and writers on the web, and manevalent parties trying to break in to get unauthorized access. The history or Cross-Site Scripting attacks and the introduction of the Same Origin Policy is not detailed here, The CORS specification in general prevents any web app from accessing any data from or associated with a different origin. The web server can get around CORS. It is a pain to to do so, as it involves the server code echoing back the Orin header in the ACAO header, and also it must be done only when the web app in question actually is trustworthy.
385
+
386
+
In solid a maxim is, you have complete control of he data. Therefore it is up to the owner of the data, the publisher, the controller of the ACL, or more broadly the person running the solid server, to specify who gets access, be it people or apps. However another maxim is that you can chose which app you use. So of Alice publishes data, and Bob want to use his favorite app, then how does that happen?
387
+
388
+
##### Now:
389
+
390
+
- The web server can run with a given trusted domain created by the solid developers.
391
+
- A specific ACL can be be made to allow a given app to access a given file or folder of files.
392
+
393
+
##### Possible future:
394
+
- A writer could give in their profile a statement that they will allow readers to use a given app.
0 commit comments