Skip to content

Comments

feat: add Web Access Control (WAC) support#13

Open
soyuka wants to merge 8 commits intodunglas:mainfrom
soyuka:feat/wac
Open

feat: add Web Access Control (WAC) support#13
soyuka wants to merge 8 commits intodunglas:mainfrom
soyuka:feat/wac

Conversation

@soyuka
Copy link

@soyuka soyuka commented Feb 23, 2026

Summary

  • Adds Authorization value object modeling ACL rules (agents, agentClasses, modes, accessTo, default inheritance)
  • Adds AclDocument for parsing Turtle ACL documents via EasyRdf and serializing back with acl:/foaf: prefixes
  • Adds getAcl() — discovers .acl URL via Link rel="acl" header, fetches and parses
  • Adds putAcl() — writes an AclDocument back to the Pod

Stack

8/8 — builds on #12 (feat/recursive-traversal)

Test plan

  • Authorization constants test
  • AclDocument Turtle serialization roundtrip
  • getAcl() with mocked HEAD + GET
  • putAcl() verifies PUT method/URL/body
  • Default inheritance (acl:default) test

🤖 Generated with Claude Code

@soyuka
Copy link
Author

soyuka commented Feb 23, 2026

Stack: 6/6 — builds on #12. Uses ML\IRI\IRI (transitive dep of ml/json-ld) for ACL URL resolution instead of a custom IRI helper.

soyuka and others added 2 commits February 23, 2026 21:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the missing HTTP method wrappers to SolidClient:
- put(): creates/overwrites resources, with optional container Link header
- head(): retrieves resource metadata headers
- delete(): removes resources
- patch(): updates resources via SPARQL Update or N3 Patch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
soyuka and others added 5 commits February 24, 2026 10:13
Parses HEAD response headers into a structured ResourceMetadata object
with content type, length, last modified, LDP type, WAC-Allow permissions,
and ACL URL from Link headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds getContainerContents() to parse ldp:contains from JSON-LD responses.
Uses ML\JsonLD\JsonLD::expand() with base URL option to handle relative
IRI resolution (CSS returns relative @id values in expanded JSON-LD).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Checks via HEAD whether a container exists, catches
ClientExceptionInterface for 404 specifically and lets other errors
propagate. Recursively creates missing parent containers via PUT.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generator-based recursive descent over LDP container trees using
getContainerContents(). Supports maxDepth parameter: -1 for unlimited,
0 for current level only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds getAcl() and putAcl() to SolidClient for reading and writing
ACL documents. Discovers .acl URL via Link header, parses/serializes
Turtle ACL documents with EasyRdf. Uses ML\IRI\IRI for resolving
relative ACL URLs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant