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
<p><aclass="tocxref" href="#wac-and-acp"><bdiclass="secno">3.2</bdi><span>WAC and ACP</span></a></p>
306
+
<ol>
307
+
<liclass="tocline"><aclass="tocxref" href="#data-model-comparison"><bdiclass="secno">3.2.1</bdi><span>Data Model Comparison</span></a></li>
308
+
<liclass="tocline"><aclass="tocxref" href="#converting-wac-to-acp"><bdiclass="secno">3.2.2</bdi><span>Converting WAC to ACP</span></a></li>
309
+
<liclass="tocline"><aclass="tocxref" href="#converting-acp-to-wac"><bdiclass="secno">3.2.3</bdi><span>Converting ACP to WAC</span></a></li>
310
+
<liclass="tocline"><aclass="tocxref" href="#summary-of-convertible-features"><bdiclass="secno">3.2.4</bdi><span>Summary of Convertible Features</span></a></li>
<p>The Solid ecosystem defines two access control systems: [<ahref="#ref-wac">WAC</a>] and [<ahref="#ref-acp">ACP</a>]. A Solid server implements one or both of these. Clients working across servers may need to convert between the two representations.</p>
444
+
<p>WAC and ACP overlap in what they can express but are not equivalent. WAC uses a flat list of <code>acl:Authorization</code> instances. ACP uses a layered structure of Access Control Resources, Access Controls, Policies, and Matchers. Some constructs in each system have no counterpart in the other.</p>
<p>A WAC authorization (an instance of <code>acl:Authorization</code>) combines access objects, access modes, and access subjects into a single resource. It uses <code>acl:accessTo</code> and <code>acl:default</code> to identify target resources, <code>acl:mode</code> to specify permissions, and <code>acl:agent</code>, <code>acl:agentClass</code>, <code>acl:agentGroup</code>, and <code>acl:origin</code> to identify subjects.</p>
450
+
<p>ACP separates these concerns across multiple classes. An <code>acp:AccessControlResource</code> connects a resource to one or more <code>acp:AccessControl</code> instances via <code>acp:accessControl</code> and <code>acp:memberAccessControl</code>. Each Access Control links to Policies via <code>acp:apply</code>. A Policy specifies allowed and denied modes via <code>acp:allow</code> and <code>acp:deny</code>, and references Matchers via <code>acp:allOf</code>, <code>acp:anyOf</code>, and <code>acp:noneOf</code>. A Matcher describes agent, client, issuer, and credential conditions.</p>
<p>Each <code>acl:Authorization</code> produces one <code>acp:AccessControlResource</code> containing one <code>acp:AccessControl</code>, one <code>acp:Policy</code>, and one <code>acp:Matcher</code>.</p>
458
+
459
+
<ol>
460
+
<liid="wac2acp-step-0">For each <code>acl:Authorization</code> in the source:</li>
461
+
<liid="wac2acp-step-1">If the authorization has any <code>acl:origin</code> values, the conversion fails. WAC's origin-based access has no equivalent in ACP's matcher model.</li>
462
+
<liid="wac2acp-step-2">If <code>acl:accessTo</code> is present, create an <code>acp:AccessControlResource</code> and link it to a new <code>acp:AccessControl</code> via <code>acp:accessControl</code>. Set <code>acp:resource</code> to the value of <code>acl:accessTo</code>. Then populate the Policy and Matcher as described in steps 4–7.</li>
463
+
<liid="wac2acp-step-3">If <code>acl:default</code> is present, create an <code>acp:AccessControlResource</code> and link it to a new <code>acp:AccessControl</code> via <code>acp:memberAccessControl</code>. Set <code>acp:resource</code> to the value of <code>acl:default</code>. The <code>acp:memberAccessControl</code> property provides the transitive inheritance that <code>acl:default</code> provides in WAC. Then populate the Policy and Matcher as described in steps 4–7.</li>
464
+
<liid="wac2acp-step-4">Create a new <code>acp:AccessControl</code>, a new <code>acp:Policy</code>, and a new <code>acp:Matcher</code>. Link the Access Control to the Access Control Resource's <code>acp:accessControl</code> or <code>acp:memberAccessControl</code> set (depending on step 2 or 3). Link the Policy to the Access Control via <code>acp:apply</code>. Link the Matcher to the Policy via <code>acp:allOf</code>.</li>
465
+
<liid="wac2acp-step-5">For each <code>acl:mode</code> value on the authorization, add it to the Policy via <code>acp:allow</code>. Both systems use the same mode IRIs from the ACL vocabulary (<code>acl:Read</code>, <code>acl:Write</code>, <code>acl:Control</code>, <code>acl:Append</code>).</li>
466
+
<liid="wac2acp-step-6">For each <code>acl:agent</code> value:
467
+
<ul>
468
+
<li>If the value is <code>foaf:Agent</code>, add <code>acp:PublicAgent</code> to the Matcher's <code>acp:agent</code>.</li>
469
+
<li>If the value is <code>acl:AuthenticatedAgent</code>, add <code>acp:AuthenticatedAgent</code> to the Matcher's <code>acp:agent</code>.</li>
470
+
<li>Otherwise, add the agent IRI directly to the Matcher's <code>acp:agent</code>.</li>
471
+
</ul>
472
+
</li>
473
+
<liid="wac2acp-step-7">For each member of an <code>acl:agentGroup</code> (resolved via <code>vcard:hasMember</code>), add the member IRI to the Matcher's <code>acp:agent</code>. ACP has no group indirection; group members are flattened into individual agent references.</li>
<p>Each <code>acp:AccessControlResource</code> produces one <code>acl:Authorization</code>. The authorization accumulates modes and agents from all Access Controls and their Policies.</p>
482
+
483
+
<ol>
484
+
<liid="acp2wac-step-0">Given an <code>acp:AccessControlResource</code> in the source:</li>
485
+
<liid="acp2wac-step-1">Create a new <code>acl:Authorization</code>.</li>
486
+
<liid="acp2wac-step-2">If the ACR has any <code>acp:accessControl</code> values, set <code>acl:accessTo</code> on the authorization to the ACR's <code>acp:resource</code> value,</li>
487
+
<liid="acp2wac-step-3">If the ACR has any <code>acp:memberAccessControl</code> values, set <code>acl:default</code> on the authorization to the ACR's <code>acp:resource</code> value.</li>
488
+
<liid="acp2wac-step-4">For each <code>acp:AccessControl</code> linked via <code>acp:accessControl</code> or <code>acp:memberAccessControl</code>, and for each <code>acp:Policy</code> linked via <code>acp:apply</code>:
489
+
<oltype="a">
490
+
<liid="acp2wac-step-4a">If the Policy has any <code>acp:deny</code> values, the conversion fails. WAC has no deny mechanism.</li>
491
+
<liid="acp2wac-step-4b">If the Policy has any <code>acp:anyOf</code> matchers, the conversion fails. WAC has no disjunctive matching.</li>
492
+
<liid="acp2wac-step-4c">If the Policy has any <code>acp:noneOf</code> matchers, the conversion fails. WAC has no negation.</li>
493
+
<liid="acp2wac-step-4d">For each <code>acp:allow</code> value on the Policy, add it to the authorization's <code>acl:mode</code>.</li>
494
+
<liid="acp2wac-step-4e">For each <code>acp:Matcher</code> linked via <code>acp:allOf</code>:
495
+
<ul>
496
+
<li>If the Matcher has any <code>acp:client</code> values, the conversion fails. WAC has no client restriction.</li>
497
+
<li>If the Matcher has any <code>acp:issuer</code> values, the conversion fails. WAC has no issuer restriction.</li>
498
+
<li>If the Matcher has any <code>acp:vc</code> values, the conversion fails. WAC has no verifiable credential matching.</li>
499
+
<li>For each <code>acp:agent</code> value on the Matcher:
500
+
<ul>
501
+
<li>If the value is <code>acp:CreatorAgent</code>, the conversion fails. WAC has no creator concept.</li>
502
+
<li>If the value is <code>acp:OwnerAgent</code>, the conversion fails. WAC has no owner concept.</li>
503
+
<li>If the value is <code>acp:PublicAgent</code>, add <code>foaf:Agent</code> to the authorization's <code>acl:agent</code>.</li>
504
+
<li>If the value is <code>acp:AuthenticatedAgent</code>, add <code>acl:AuthenticatedAgent</code> to the authorization's <code>acl:agent</code>.</li>
505
+
<li>Otherwise, add the agent IRI directly to the authorization's <code>acl:agent</code>.</li>
<dd><cite><ahref="https://solidproject.org/TR/2024/wac-20240512">Web Access Control</a></cite>. W3C Solid Community Group. URL: <ahref="https://solidproject.org/TR/2024/wac-20240512">https://solidproject.org/TR/2024/wac-20240512</a></dd>
445
613
614
+
<dtid="ref-acp">[ACP]</dt>
615
+
<dd><cite><ahref="https://solidproject.org/TR/2022/acp-20220518">Access Control Policy</a></cite>. W3C Solid Community Group. URL: <ahref="https://solidproject.org/TR/2022/acp-20220518">https://solidproject.org/TR/2022/acp-20220518</a></dd>
616
+
446
617
<dtid="ref-authapp">[BKY+24]</dt>
447
618
<dd>
448
619
<cite>AuthApp - Portable, Reusable Solid App for GDPR-Compliant Access Granting</cite>.
0 commit comments