Add scope diagrams section with C4 Level 1 and Level 2 diagrams - #159
Conversation
| System(client, "Client application", "Requests and manages resources") | ||
| System(lws, "LWS server", "Manages resource hierarchy and access") | ||
| System_Ext(idp, "Identity provider", "Issues signed credentials") | ||
| System_Ext(ext, "External resources", "Web resources under management") |
There was a problem hiding this comment.
What do you mean by "external resources"? Are these the same as the "LWS resources" we defined in the terminology? If so, it might be best to re-use that term.
There was a problem hiding this comment.
| System_Ext(ext, "External resources", "Web resources under management") | |
| System_Ext(ext, "LWS resources", "Web resources under management") |
|
@jeremycaine In various projects I've been using https://likec4.dev/ There's even some work on embedding it in specs |
relaxing as JSON-LD is not only media type Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
elaborate on private, public and restricted Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
point that an LWS account not required; plus CIDs Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
|
@jeremycaine you can see two different LikeC4 diagrams I've done for LWS in Would you like to coordinate our diagramming efforts? |
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
acoburn
left a comment
There was a problem hiding this comment.
The LWS protocol intentionally does not have a notion of "external resources". I would remove references to external resources.
| Person(user, "User", "Person accessing resources") | ||
| System(client, "Client application", "Requests and manages resources") | ||
| System_Ext(idp, "Identity provider", "Issues signed credentials") | ||
| System_Ext(ext, "External resources", "Web resources under management") |
There was a problem hiding this comment.
| System_Ext(ext, "External resources", "Web resources under management") | |
| System_Ext(ext, "LWS resources", "Web resources under management") |
| Container(authn, "Authentication", "Validates credential against identity provider") | ||
| Container(authz, "Authorization", "Enforces resource manager access decisions") | ||
| Container(rm, "Resource Management", "Manages containers, containment and linksets") | ||
| Container(era, "External Resource Access", "Mediates access to external web resources") |
There was a problem hiding this comment.
I would remove this line. The LWS protocol does not define any behavior to interact with "external resources"
| Boundary(lws, "LWS server") { | ||
| Container(authn, "Authentication", "Validates credential against identity provider") | ||
| Container(authz, "Authorization", "Enforces resource manager access decisions") | ||
| Container(rm, "Resource Management", "Manages containers, containment and linksets") |
There was a problem hiding this comment.
I would rephrase the description to be "Manages containers, metadata and data resources" (linksets are a particular type of metadata resource that don't need explicit mention)
| Rel(rm, era, "resolves resource") | ||
| Rel(era, ext, "accesses") | ||
| ``` | ||
| Issue: The internal organisation of container, containment, and linkset management within the LWS server is not yet defined in the protocol. This diagram reflects current terminology and is subject to revision. |
There was a problem hiding this comment.
The internal organization is intentionally not defined by the protocol -- that is an implementation detail. I would remove this line.
| </p> | ||
| <figure id="fig-1-system-context"> | ||
| <img src="diagrams/fig-1-system-context.svg" | ||
| alt="LWS Protocol system context diagram showing the user, client application, LWS server, identity provider, and external resources"/> |
There was a problem hiding this comment.
I would remove "external resources" from this description
| </p> | ||
| <figure id="fig-2-container-diagram"> | ||
| <img src="diagrams/fig-2-container-diagram.svg" | ||
| alt="LWS Protocol container diagram showing authentication, authorization, resource management, and external resource access within the LWS server boundary"/> |
There was a problem hiding this comment.
| alt="LWS Protocol container diagram showing authentication, authorization, resource management, and external resource access within the LWS server boundary"/> | |
| alt="LWS Protocol container diagram showing authentication, authorization, and resource management within the LWS server boundary"/> |
|
Following up in discussion I had with @jeremycaine after the WG call. https://w3c.github.io/lws-protocol/lws10-core/#conformance LWS core defines two classes of products
You can find various normative statements with Clients MUST, Clients MAY etc. Given notifications, access requests / grants, indexes / search, more distinct classes of products may need to be defined. This would be out of scope for this PR but something to keep track of in next iterations. I will be adjusting LikeC4 model for #177 to reference those classes of products. I also created |
…rotocol into scope-diagrams
…/lws-protocol into introduction-section
|
@jeremycaine I think your new diagrams look great! When I compare them to to The main difference seems to be that you illustrate the special case where End-user == Resource Owner, so Alice is accessing her own data. While in my diagrams I'm illustrating the general case where End-user != Resource Owner, so for example Alice is accessing Bob's data (on bob.example), and Charlie's data (on charlie.example), and ACME data (on acme.example). Most of the complexity comes with the general scenario, the special case of user accessing their own data could be achieved in much simpler ways. |
| lws-client -> identity-provider 'authenticates' | ||
| lws-client -> resource-manager 'sends request' | ||
| resource-manager -> authentication 'authenticates request' | ||
| authentication -> identity-provider 'validates credentials' |
There was a problem hiding this comment.
My comment is mostly about this interaction. In general case this happesn between Authorization Server of the Resource Owner and the IdP of the End-user. Showing it as 'internal' to the LWS Server can bring confusion instead of clarifying it.
You can see Step 10 and after on https://elf-pavlik.github.io/lws-auth/view/oidc/?dynamic=sequence
And F5 & F6 on https://github.com/hackers4peace/likec4-example-customization/blob/4542f2b7edc20549bbf2f856483dccc94a7bdb0f/likec4/lws.c4#L54-L55
There was a problem hiding this comment.
@elf-pavlik questions and we need a plan to ack your points
- I assume your
lws-authview is some initial thought on how this flow might work. Ok we can integrate, but:
- we need to agree the named component list for the PR
view fig3-lws-server-components. - I have Resource Manager, Authorization, Authentication, Identity Provider.
- You have Resource Authorization Server and Resource Server; plus User Authorization Server / IdP.
- shouldn't IdP identity provide be for only authentication and not authorization?
- Identity Provider (in my diagram) is internal to LWS server, but as we have stated in Introduction it could be either internal to scope of LWS Server or outside. The challenge is how to show that optionality. Perhaps that means we need to show IdP (internal) and IdP (external).
- An LWS Client can authenticate with IdP (internal or external).
|
https://www.w3.org/2024/09/linked-web-storage-wg-charter.html#scope
The main challenge and resulting complexity comes from that loose coupling and interaction happening across independent security domains. I find it very important that this is reflected on the diagrams. While implementations/deployments can adopt more monolith/collocated approaches. The protocol itself enables interop between autonomous systems and IMO we should be emphasising it's user centric design. |
…rotocol into scope-diagrams
|
In the working session today - 23 Jul 2026 - we reduced the the model and therefore the diagrams to a simpler set. This enables the PR to merge and we move on to other discussions, which will then update the diagrams in future PRs. Points of the meeting
|
There was a problem hiding this comment.
I'm happy to merge it without my suggestions and follow up with a PR myself proposing them right away. Not sure if github can do stacked PRs from multiple contributors 🤔 - in a way that both show up in this repo as PRs - this may require working on branches here rather than forks. (tools like Git Butler, Graphite etc. make stacking pretty easy)
Currently I would only keep fig-container-diagram.png, possibly fig-resource-server.png which will be just two nested boxes (inner style.multiple). fig-srorage.png could be separate PR from @jeremycaine
|
@jeremycaine I have a example with a single diagram that could replace the three in this PR (except storage which is for next PR)
|
Co-authored-by: elf Pavlik <elf-pavlik@hackers4peace.net>
Co-authored-by: elf Pavlik <elf-pavlik@hackers4peace.net>
Co-authored-by: elf Pavlik <elf-pavlik@hackers4peace.net>
bring Storage as a component inside scope of Resource Manager Co-authored-by: elf Pavlik <elf-pavlik@hackers4peace.net>
done - and then that actually removes the need for the resource manager diagram. everything for now in this PR can be shown in one diagram. |
|
@jeremycaine I think you still may need to
|
|
Looking at fig-system-context.png — Is there a justification for the shading of the shape detail texts? I think all text should be white, just like the primary titles, for FAR better contrast and visibility for all viewers, not only those with optical challenges. I noted this looking at the single image linked above, but I think it equally valid for other images with shaded text. Generally speaking, such text should be simply black or white, regardless of the color behind it, choosing between these based on the stronger contrast value. I'm also wondering why the arrows are all the same dotted line. Usually, dotted lines are used to show a different sort of connection than solid lines ... but there are no solid lines here, so I don't know why these lines aren't solid. |
|
Looking at fig-resource-server.png — Why is there a shadow-box behind the Storage block, but not the LWS Client nor the Resource Server? Given the title of this image, if one of these is to be highlighted, I would expect the Resource Server, not the Storage... Please explain/justify? I'm also wondering why the arrows are all the same dotted line. Usually, dotted lines are used to show a different sort of connection than solid lines ... but there are no solid lines here, so I don't know why these lines aren't solid. |
|
@TallTed storage has applied |
|
Looking at fig-storage.png —
|
I can try. I've never used c4. (I have many years experience with layout and graphic tools for press-printing like Freehand, Quark XPress, and friends. These have mostly been superior to the various "direct to web" tools ... but who knows?) |
|
This was discussed during the #lws meeting on 27 July 2026. View the transcriptVote: LWS Diagrams PR#159jeremycaine: there were some issues with git push, not all images are correct TallTed: sorry I couldn't get to it sooner jeremycaine: I didn't add any of that just used default rendering <Zakim> acoburn, you wanted to talk about merge mechanics <ericP> elf-pavlik: suggest merging. we need to model to base other PRs. we can address alt text etc later. <ericP> ... re SVG, I don't think there's an easy way to get SVGs; <ericP> jeremycaine: is there a simple list for accessibility? jeremycaine: are there accessiblity guidelines? TallTed: there aren't great guides, we should have some textual descriptions <ericP> TallTed: they rules are complex. generally manually produced from SVG to allow for cut and paste TallTed: this way one doesn't have to retype jeremycaine: I think we can merge and come back, not to block threat model TallTed: I would like to open issues sooner than later jeremycaine: i can merge it today tomorrow <ericP> elf-pavlik: we should ask "is this an improvement"? <ericP> ... we can convert PR comments to issues. <TallTed> (How did we arrive at creating these in c4? I know other tools are being used in other WGs, often to produce far more complex graphics. This might be worth some exploration.) <ericP> ... i would like to merge this C4 file <ericP> PROPOSAL: Adopt diagrams included in w3c/lws-protocol#159 <gb> PR 159 Add scope diagrams section with C4 Level 1 and Level 2 diagrams (by jeremycaine) <elf-pavlik> +1 <gibsonf1> +1 <jeremycaine> +1 <ericP> +1 <TallTed> +1 <acoburn> +1 <pchampin> +1 <AZ> +1 RESOLUTION: Adopt diagrams included in w3c/lws-protocol#159 <ryey> +1 |
|
The |
|
I think generated SVG is less readable but as I said during the meeting I would mostly like to get that .c4 file merged. |
acoburn
left a comment
There was a problem hiding this comment.
This PR was discussed and approved during the 2026-07-27 WG meeting
Editorial - Clarify systems diagram (at least scope/system context; platform independent model)
Preview | Diff