Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 56 additions & 6 deletions main/authorization.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ Authorization {#authorization}

## Web Access Control ## {#web-access-control}

Web Access Control (WAC) is a decentralized cross-domain access control
system. The WAC mechanism is concerned with giving access to agents denoted by
a [[#webid]] to perform various kinds of read-write operations on resources
identified by URLs. The Access Control List (ACL) vocabulary is used to
describe authorization policies about authorized agents with modes of access
on target resources.
Web Access Control (<abbr title="Web Access Control">WAC</abbr>) is a
decentralized cross-domain access control system. The WAC mechanism is
concerned with giving access to agents denoted by a [[#webid]] to perform
various kinds of read-write operations on resources identified by URLs. The
<cite><a href="http://www.w3.org/ns/auth/acl">Access Control List</a></cite>
(<abbr title="Access Control List">ACL</abbr>) ontology is used to describe
authorization policies about authorized agents with modes of access on target
resources.

Servers MUST conform to the Web Access Control specification [[!WAC]].

Expand All @@ -19,3 +21,51 @@ the HTTP `Link` header with a `rel` value of `acl` [[#acl]].
In the event that a server can't apply an ACL to a resource, it MUST deny
access.
[[Source](https://github.com/solid/specification/issues/130#issue-532777017)]

Servers exposing client's access privileges on a resource URL MUST advertise
by including the `WAC-Allow` HTTP header in the response of HTTP `HEAD` and
Comment thread
csarven marked this conversation as resolved.
`GET` requests.

The syntax for the `WAC-Allow` header, using the ABNF syntax defined in
Section 1.2 of [[!RFC7231]], is:

```
wac-allow = "WAC-Allow" ":" OWS #access-param OWS
access-param = permission-group OWS "=" OWS access-modes
permission-group = 1*ALPHA
access-modes = *1DQUOTE OWS *1(access-mode *(RWS access-mode)) OWS *1DQUOTE
access-mode = "read" / "write" / "append" / "control"
```

The `WAC-Allow` HTTP header's field-value is a comma-separated list of
`access-param`s. `access-param` is a whitespace-separated list of `access
modes` granted to a `permission-group`.

This specification defines the following `permission-group`s:

<dl>
<dt>`user`</dt>
<dd>Permissions granted to the agent requesting the resource.</dd>
<dt>`public`</dt>
<dd>Permissions granted to the public.</dd>
</dl>

`access-mode` corresponds to the modes of access as defined in the
ACL ontology (`acl:Read`, `acl:Write`, `acl:Append`, `acl:Control`).

Clients can discover access privileges on a resource by making an HTTP `HEAD`
or `GET` request on the target URL, and checking the `WAC-Allow` header value
for access parameters listing the allowed access modes per permission group.

Clients' parsing algorithm for the `WAC-Allow` header should incorporate error
handling. When the received message fails to match an allowed pattern, finds
unrecognised access parameters or access modes, clients MUST ignore the
received `WAC-Allow` header-field.

The quoted and unquoted values for `access-modes` are equivalent. Servers are
recommended to use quoted values in the response. Clients' are recommended to
be able to parse both quoted and unquoted values.

[[Source](https://github.com/solid/specification/issues/171)]
[[Source](https://github.com/solid/specification/issues/170)]
[[Source](https://github.com/solid/specification/issues/181)]