WAC for container children with acp_ess_1

Hello all,

I’m trying to set the access control for a pod using WAV with acp_ess_1 module. I added the agents necessary to the rule, added the rule to the policy, and then applied the policy to the resource. I also applied the policy to the resource with addMemberPolicyUrl and saveAcrFor, however when I try to write a new file to the container from the agent that has access, it still prevents the save from occurring. Does anyone have an idea or a workflow I can compare with to see where I am missing something?


If I have understood correctly what you are trying to achieve acp_ess_1 is not the right module for you.
There is one that is designed specifically to work with wac: Manage Access to Data (WAC) — Inrupt JavaScript Client Libraries
In general it is advised to use universalAccess module (it manages both ACP and WAC), but it has a lot of errors in it at the moment.
Universal Module:
Access Policies: Universal API — Inrupt JavaScript Client Libraries
some info about errors in it:
access/universal functions throw error instead of creating .acl when no .acl exists · Issue #1549 · inrupt/solid-client-js · GitHub
setPublicAccess from universalAccess not working as expected · Issue #1640 · inrupt/solid-client-js · GitHub

and ша you will need to get around these issues and use, acp_ess_2 module to manage ACP pods, there also are some issues with it getResourcePolicyAll and getPolicyAll functions from acp_ess_2 module don't work · Issue #1641 · inrupt/solid-client-js · GitHub

Yes , I had the same issue. You probably need to get the aclData first with getResourceInfoWithAcl.

Here is an example: WACEditor/acl.ts at main · phochste/WACEditor · GitHub

My code is inspired from BashLib

1 Like


Thank you for the tip - this is pretty much what was happening. I had to retrieve with the Acl after I first applied the original policy. In my original code, I retrieved the dataset and applied the policy and member policy separately, so the changes did not occur together which was causing issues.