Title: Add test coverage for acl:AuthenticatedAgent · Issue #58 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Add test coverage for acl:AuthenticatedAgent · Issue #58 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Add test coverage for acl:AuthenticatedAgent · Issue #58 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary JSS has implemented acl:AuthenticatedAgent support in the WAC parser and checker, but lacks test coverage for this important access control feature. Current Implementation The implementation exists and works correctly: Parser (sr...
Open Graph Description: Summary JSS has implemented acl:AuthenticatedAgent support in the WAC parser and checker, but lacks test coverage for this important access control feature. Current Implementation The implementatio...
X Description: Summary JSS has implemented acl:AuthenticatedAgent support in the WAC parser and checker, but lacks test coverage for this important access control feature. Current Implementation The implementatio...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/58
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add test coverage for acl:AuthenticatedAgent","articleBody":"## Summary\n\nJSS has implemented `acl:AuthenticatedAgent` support in the WAC parser and checker, but lacks test coverage for this important access control feature.\n\n## Current Implementation\n\nThe implementation exists and works correctly:\n- **Parser** (`src/wac/parser.js:23`): Defines `AgentClass.AUTHENTICATED`\n- **Checker** (`src/wac/checker.js:176-179`): Properly validates authenticated-only access\n- **WAC-Allow** (`src/wac/checker.js:245-250`): Correctly calculates permissions\n\n## Missing Test Coverage\n\nThere is no test that validates the specific `acl:AuthenticatedAgent` behavior, which differs from both public and private access:\n\n| Access Type | Anonymous | Owner | Other Authenticated User |\n|------------|-----------|-------|-------------------------|\n| `foaf:Agent` (public) | ✅ Allow | ✅ Allow | ✅ Allow |\n| Specific agent (private) | ❌ Deny | ✅ Allow | ❌ Deny |\n| **`acl:AuthenticatedAgent`** | ❌ Deny | ✅ Allow | ✅ **Allow** |\n\nThe key distinction is that `acl:AuthenticatedAgent` allows **any authenticated user**, not just the owner.\n\n## Proposed Test\n\nAdd a test to `test/wac.test.js` or `test/auth.test.js`:\n\n```javascript\nit('should allow any authenticated user but deny anonymous (AuthenticatedAgent)', async () =\u003e {\n await createTestPod('user1');\n await createTestPod('user2');\n \n // Create a resource with acl:AuthenticatedAgent\n const acl = {\n '@context': { 'acl': 'http://www.w3.org/ns/auth/acl#' },\n '@graph': [{\n '@id': '#authenticated',\n '@type': 'acl:Authorization',\n 'acl:agentClass': { '@id': 'acl:AuthenticatedAgent' },\n 'acl:accessTo': { '@id': 'http://localhost:5420/user1/authenticated-only/' },\n 'acl:mode': [{ '@id': 'acl:Read' }]\n }]\n };\n \n // Test anonymous access - should deny\n const res1 = await request('/user1/authenticated-only/');\n assertStatus(res1, 401);\n \n // Test owner access - should allow\n const res2 = await request('/user1/authenticated-only/', { auth: 'user1' });\n assertStatus(res2, 200);\n \n // Test different authenticated user - should allow (key test)\n const res3 = await request('/user1/authenticated-only/', { auth: 'user2' });\n assertStatus(res3, 200);\n});\n```\n\n## Specification Reference\n\nFrom the [W3C ACL Ontology](http://www.w3.org/ns/auth/acl):\n\n```turtle\n:AuthenticatedAgent a rdfs:Class;\n rdfs:subClassOf foaf:Agent;\n rdfs:label \"Anyone authenticated\";\n rdfs:comment \"\"\"A class of agents who have been authenticated.\nIn other words, anyone can access this resource, but not anonymously.\nThe social expectation is that the authentication process will provide an\nidentify and a name, or pseudonym.\n(A new ID should not be minted for every access: the intent is that the user\nis able to continue to use the ID for continues interactions with peers,\nand for example to develop a reputation)\n\"\"\" .\n```\n\n## Related\n\n- [Web Access Control Spec](https://solid.github.io/web-access-control-spec/)\n- [AuthenticatedAgent Discussion](https://github.com/solid/web-access-control-spec/issues/88)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-05T19:30:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/58/JavaScriptSolidServer/issues/58"}
| 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:1e7dcd07-50b3-2843-ad9c-b2539afdd09c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6B6:2C98AB:4685A1:60F045:69774E15 |
| html-safe-nonce | 574e74c3db3e108795f3c2bba183dc88880d1d6ffbf218c027dca193f1be0887 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkI2OjJDOThBQjo0Njg1QTE6NjBGMDQ1OjY5Nzc0RTE1IiwidmlzaXRvcl9pZCI6IjU4ODczMjk4MTU3ODU1OTAyOTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 902749278179668ad02cc747365d16e884feef0a5fdba77e5f8604ce00f9d820 |
| hovercard-subject-tag | issue:3782635892 |
| 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/58/issue_layout |
| twitter:image | https://opengraph.githubassets.com/24bfa62d3b53a0bb9faa4962967d74c185f242aa44608caab5b9689877bba2e5/JavaScriptSolidServer/JavaScriptSolidServer/issues/58 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/24bfa62d3b53a0bb9faa4962967d74c185f242aa44608caab5b9689877bba2e5/JavaScriptSolidServer/JavaScriptSolidServer/issues/58 |
| og:image:alt | Summary JSS has implemented acl:AuthenticatedAgent support in the WAC parser and checker, but lacks test coverage for this important access control feature. Current Implementation The implementatio... |
| 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 | 3310064f35a62c06a4024ba37f41c06836f39376a095c2dfd2c4b693c34965be |
| 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 | 67d5f8d1d53c3cc4f49fc3bb8029933c3dc219e6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width