Skip to content

Add scope diagrams section with C4 Level 1 and Level 2 diagrams#159

Open
jeremycaine wants to merge 24 commits into
w3c:mainfrom
jeremycaine:scope-diagrams
Open

Add scope diagrams section with C4 Level 1 and Level 2 diagrams#159
jeremycaine wants to merge 24 commits into
w3c:mainfrom
jeremycaine:scope-diagrams

Conversation

@jeremycaine

@jeremycaine jeremycaine commented May 15, 2026

Copy link
Copy Markdown

Editorial - Clarify systems diagram (at least scope/system context; platform independent model)


Preview | Diff

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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System_Ext(ext, "External resources", "Web resources under management")
System_Ext(ext, "LWS resources", "Web resources under management")

Comment thread lws10-core/diagrams/fig-2-container-diagram.md Outdated
Comment thread lws10-core/index.html Outdated
@elf-pavlik

Copy link
Copy Markdown
Member

@jeremycaine In various projects I've been using https://likec4.dev/

There's even some work on embedding it in specs

jeremycaine and others added 5 commits June 11, 2026 17:10
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>
@elf-pavlik

Copy link
Copy Markdown
Member

@jeremycaine you can see two different LikeC4 diagrams I've done for LWS in

Would you like to coordinate our diagramming efforts?

jeremycaine and others added 3 commits June 27, 2026 12:16
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 acoburn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The internal organization is intentionally not defined by the protocol -- that is an implementation detail. I would remove this line.

Comment thread lws10-core/index.html Outdated
</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"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "external resources" from this description

Comment thread lws10-core/index.html Outdated
</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"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"/>

@elf-pavlik

Copy link
Copy Markdown
Member

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

  • LWS Server
  • LWS Client

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

@elf-pavlik

elf-pavlik commented Jul 10, 2026

Copy link
Copy Markdown
Member

@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'

@elf-pavlik elf-pavlik Jul 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jeremycaine jeremycaine Jul 20, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elf-pavlik questions and we need a plan to ack your points

  1. I assume your lws-auth view 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.
  1. shouldn't IdP identity provide be for only authentication and not authorization?
  2. 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).
  3. An LWS Client can authenticate with IdP (internal or external).

@elf-pavlik

Copy link
Copy Markdown
Member

https://www.w3.org/2024/09/linked-web-storage-wg-charter.html#scope

This protocol will ensure interoperability between compliant user applications, and compliant storage and identity servers, thus giving users the freedom to select the applications and services that suit their needs.

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.

description 'An agent of the LWS system'
}

lws = system 'LWS System' {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest removing LWS System, similar to The Web it is a heterogenous envoronment where interactions between autonomous parties follow specific protocol(s). Tyring to draw a box around it seems to me rather confusing.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elf-pavlik
My point in the f2f April meeting and here - is that good architecture practice shows the system context boundary: anything inside will describe the specification to implement, anything outside are things with an known interaction model. I am not precious about the name, but I favour a clear defined boundary.

Alts. to LWS System -> LWS, LWS Scope Boundary, LWS Scope etc

Comment thread lws10-core/diagrams/figures.md Outdated
Comment thread lws10-core/diagrams/figures.md Outdated

| Box | Description |
|---|---|
| Agent | An agent of the LWS system |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Agent | An agent of the LWS system |
| Agent | An agent that interacts with LWS servers and/or client tools |

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since LWS System = LWS Client + LWS Server, then I thought it simpler to say 'An agent of the LWS system'

| Box | Description |
|---|---|
| Agent | An agent of the LWS system |
| LWS System | A system that implements the LWS Protocol |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| LWS System | A system that implements the LWS Protocol |
| LWS Deployment | A deployment of LWS servers and/or client tools |

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's nail this point first then flow through changes

@jeremycaine

jeremycaine commented Jul 20, 2026

Copy link
Copy Markdown
Author

https://www.w3.org/2024/09/linked-web-storage-wg-charter.html#scope

This protocol will ensure interoperability between compliant user applications, and compliant storage and identity servers, thus giving users the freedom to select the applications and services that suit their needs.

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.

Please advise how we might reflect going across independent security domain in these, or additional, diagrams. @elf-pavlik

jeremycaine and others added 2 commits July 20, 2026 14:02
edits

Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
edits

Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@gibsonf1

Copy link
Copy Markdown

It's very confusing to call the manager of the LWS system the "Resource Manager" when that manager is manging far more than just resources but authentication, authorization etc. It would make far more sense to call this the "LWS Manager" and be less confusing by far, as that is exactly what this is, the LWS manager, (not generic resources)

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.

7 participants