Title: WAC: ACL parser reads literal acl: keys, so valid expanded JSON-LD ACLs grant nothing and lock the owner out · Issue #631 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: WAC: ACL parser reads literal acl: keys, so valid expanded JSON-LD ACLs grant nothing and lock the owner out · Issue #631 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: WAC: ACL parser reads literal acl: keys, so valid expanded JSON-LD ACLs grant nothing and lock the owner out · Issue #631 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary The WAC ACL parser reads authorizations by their literal compact keys (acl:agent, acl:mode, acl:accessTo, or the bare agent, mode, …) instead of interpreting the document as JSON-LD. A valid JSON-LD ACL that uses expanded IRIs (o...
Open Graph Description: Summary The WAC ACL parser reads authorizations by their literal compact keys (acl:agent, acl:mode, acl:accessTo, or the bare agent, mode, …) instead of interpreting the document as JSON-LD. A vali...
X Description: Summary The WAC ACL parser reads authorizations by their literal compact keys (acl:agent, acl:mode, acl:accessTo, or the bare agent, mode, …) instead of interpreting the document as JSON-LD. A vali...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/631
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"WAC: ACL parser reads literal acl: keys, so valid expanded JSON-LD ACLs grant nothing and lock the owner out","articleBody":"## Summary\n\nThe WAC ACL parser reads authorizations by their literal compact keys (`acl:agent`, `acl:mode`, `acl:accessTo`, or the bare `agent`, `mode`, …) instead of interpreting the document as JSON-LD. A valid JSON-LD ACL that uses expanded IRIs (or any other prefix, e.g. `wac:`) is accepted with `201`, but parses as granting nobody anything. If it is the resource's only ACL, the owner is locked out, including from the `.acl` itself, so it can't be repaired over HTTP.\n\nIt fails closed (denies), so it isn't an access leak, but it is a silent lockout.\n\n## Reproduce\n\nAs the pod owner (single-user pod, `--idp --conneg`), on 0.0.212. `src/wac/parser.js` is unchanged on `main` (b424397):\n\n1. `PUT /me/public/acl-repro/expanded/doc.ttl` (Turtle) → `201`\n2. `PUT /me/public/acl-repro/expanded/doc.ttl.acl`, `Content-Type: application/ld+json`, granting the owner Read/Write/Control in **expanded** form → `201`\n\n ```json\n [{\n \"@id\": \"#owner\",\n \"@type\": [\"http://www.w3.org/ns/auth/acl#Authorization\"],\n \"http://www.w3.org/ns/auth/acl#agent\": [{ \"@id\": \"http://127.0.0.1:8732/me/profile/card.jsonld#me\" }],\n \"http://www.w3.org/ns/auth/acl#accessTo\": [{ \"@id\": \"http://127.0.0.1:8732/me/public/acl-repro/expanded/doc.ttl\" }],\n \"http://www.w3.org/ns/auth/acl#mode\": [\n { \"@id\": \"http://www.w3.org/ns/auth/acl#Read\" },\n { \"@id\": \"http://www.w3.org/ns/auth/acl#Write\" },\n { \"@id\": \"http://www.w3.org/ns/auth/acl#Control\" }\n ]\n }]\n ```\n3. `GET doc.ttl` as the owner → **`403`**; `GET doc.ttl.acl` as the owner → **`403`**\n\nThe same triples in compact form (`\"@context\": { \"acl\": \"http://www.w3.org/ns/auth/acl#\" }`, `\"acl:agent\"`, `\"acl:mode\"`, …) behave as expected: both GETs return `200`.\n\n## Expected\n\nThe two documents are the same RDF, so they should authorize the same requests. Or, if JSS only supports a subset of JSON-LD for ACLs, the PUT should be rejected (e.g. `400`/`422`) rather than accepted and silently ignored.\n\n## Cause\n\n`src/wac/parser.js`:\n\n- `isAuthorization` matches the full `@type` IRI, so the node is recognised as an authorization.\n- `parseAuthorization` then reads `node['acl:accessTo'] || node['accessTo']`, `node['acl:agent'] || node['agent']`, `node['acl:mode'] || node['mode']`, … Expanded keys (or keys with a different prefix) are never seen, so `agents` and `modes` come out empty.\n\n## Suggested fix\n\n- Expand the document (jsonld `expand`, already a dependency through the Turtle conversion) and read the full ACL IRIs, normalising `@id`/`@value` arrays. That covers expanded form, any prefix, `@context` arrays (cf. #389), and `@vocab`.\n- Optionally, at PUT time: parse the incoming ACL the same way and reject it if it yields no authorizations, or if it would remove the writer's own Control. That's a cheap guard against self-lockout.\n\n## How it came up\n\nRunning SolidOS against JSS. JSS answers Turtle ACL PUTs with `415` + `Accept-Put: application/ld+json`, so the client retried as JSON-LD; the first version serialised in expanded form and the owner lost access to every resource it had just created (address book, schedule, chat).\n","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-10-21T14:54:11Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/631"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2f6b4868-b475-bae3-e114-3b50b4743ace |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F12:21A483:5CB79A:79D620:6B03E2B0 |
| html-safe-nonce | 532e18fa2ff068c2e1ed1781ec7ecd5ccc7f9201690bc7852ecda706680ba79d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjEyOjIxQTQ4Mzo1Q0I3OUE6NzlENjIwOjZCMDNFMkIwIiwidmlzaXRvcl9pZCI6IjU3OTI3NTQ0NTEyNzAwNjY4NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 77ca10a1a6ac5e6a3a7d17d4c172bab6f62e3564f59bd58c4a805da8ba986b1e |
| hovercard-subject-tag | issue:5962913072 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/631/issue_layout |
| twitter:image | https://opengraph.githubassets.com/64f6fb6790d7febfce173ea8a563314b0ff1e8fc4e365b239d295f359aba8517/JavaScriptSolidServer/JavaScriptSolidServer/issues/631 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/64f6fb6790d7febfce173ea8a563314b0ff1e8fc4e365b239d295f359aba8517/JavaScriptSolidServer/JavaScriptSolidServer/issues/631 |
| og:image:alt | Summary The WAC ACL parser reads authorizations by their literal compact keys (acl:agent, acl:mode, acl:accessTo, or the bare agent, mode, …) instead of interpreting the document as JSON-LD. A vali... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width