Skip to content

Commit 30aa33a

Browse files
committed
remove the plantuml
1 parent a9f2dc6 commit 30aa33a

15 files changed

+196
-86
lines changed

404.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,22 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
173173

174174
</div>
175175

176+
<!-- Livereload script (if served using the cli tool) -->
177+
<script>
178+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
179+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
180+
const socket = new WebSocket(wsAddress);
181+
socket.onmessage = function (event) {
182+
if (event.data === "reload") {
183+
socket.close();
184+
location.reload();
185+
}
186+
};
187+
188+
window.onbeforeunload = function() {
189+
socket.close();
190+
}
191+
</script>
176192

177193

178194

architecture.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,22 @@ <h1 id="architecture"><a class="header" href="#architecture">Architecture</a></h
183183

184184
</div>
185185

186+
<!-- Livereload script (if served using the cli tool) -->
187+
<script>
188+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
189+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
190+
const socket = new WebSocket(wsAddress);
191+
socket.onmessage = function (event) {
192+
if (event.data === "reload") {
193+
socket.close();
194+
location.reload();
195+
}
196+
};
197+
198+
window.onbeforeunload = function() {
199+
socket.close();
200+
}
201+
</script>
186202

187203

188204

chapter_1.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,22 @@ <h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>
177177

178178
</div>
179179

180+
<!-- Livereload script (if served using the cli tool) -->
181+
<script>
182+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
183+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
184+
const socket = new WebSocket(wsAddress);
185+
socket.onmessage = function (event) {
186+
if (event.data === "reload") {
187+
socket.close();
188+
location.reload();
189+
}
190+
};
191+
192+
window.onbeforeunload = function() {
193+
socket.close();
194+
}
195+
</script>
180196

181197

182198

design.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,22 @@ <h1 id="design"><a class="header" href="#design">Design</a></h1>
185185

186186
</div>
187187

188+
<!-- Livereload script (if served using the cli tool) -->
189+
<script>
190+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
191+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
192+
const socket = new WebSocket(wsAddress);
193+
socket.onmessage = function (event) {
194+
if (event.data === "reload") {
195+
socket.close();
196+
location.reload();
197+
}
198+
};
199+
200+
window.onbeforeunload = function() {
201+
socket.close();
202+
}
203+
</script>
188204

189205

190206

design/authentication-authorization.html

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -156,46 +156,6 @@ <h1 id="authentication--authorization"><a class="header" href="#authentication--
156156
<p>Light-Portal is a single-page application (SPA) that utilizes both the OAuth 2.0 Authorization Code and Client Credentials flows.</p>
157157
<p>The following pattern illustrates the end-to-end process recommended by the Light Platform for an SPA interacting with downstream APIs.</p>
158158
<h3 id="sequence-diagram"><a class="header" href="#sequence-diagram">Sequence Diagram</a></h3>
159-
<p>The following is the raw data that can be used to render the diagram in http://www.plantuml.com</p>
160-
<pre><code class="language-plantuml">@startuml
161-
participant "Portal View" as PortalView
162-
participant "Login View" as LoginView
163-
participant "Light Gateway" as Gateway
164-
participant "OAuth-Kafka" as OAuthKafka
165-
participant "Auth Service" as AuthService
166-
participant "Proxy Sidecar" as ProxySidecar
167-
participant "Backend API" as BackendAPI
168-
169-
PortalView -&gt; LoginView: 1. Signin redirect
170-
LoginView -&gt; OAuthKafka: 2. Authenticate user
171-
OAuthKafka -&gt; AuthService: 3. Authenticate User\n (Active Directory\n for Employees)\n (CIF System\n for Customers)
172-
AuthService -&gt; OAuthKafka: 4. Authenticated
173-
OAuthKafka -&gt; OAuthKafka: 5. Generate auth code
174-
OAuthKafka -&gt; PortalView: 6. Redirect with code
175-
PortalView -&gt; Gateway: 7. Authorization URL \n with code param
176-
Gateway -&gt; OAuthKafka: 8. Create JWT access \n token with code
177-
OAuthKafka -&gt; OAuthKafka: 9. Generate JWT \n access token \n with user claims
178-
OAuthKafka -&gt; Gateway: 10. Token returns \n to Gateway
179-
Gateway -&gt; PortalView: 11. Token returns \n to Portal View \n in Secure Cookie
180-
PortalView -&gt; Gateway: 12. Call Backend API
181-
Gateway -&gt; Gateway: 13. Verify the token
182-
Gateway -&gt; OAuthKafka: 14. Create Client \n Credentials token
183-
OAuthKafka -&gt; OAuthKafka: 15. Generate Token \n with Scopes
184-
OAuthKafka -&gt; Gateway: 16. Return the \n scope token
185-
Gateway -&gt; Gateway: 17. Add scope \n token to \n X-Scope-Token \nHeader
186-
Gateway -&gt; ProxySidecar: 18. Invoke API
187-
ProxySidecar -&gt; ProxySidecar: 19. Verify \n Authorization \ntoken
188-
ProxySidecar -&gt; ProxySidecar: 20. Verify \n X-Scope-Token
189-
ProxySidecar -&gt; ProxySidecar: 21. Fine-Grained \n Authorization
190-
ProxySidecar -&gt; BackendAPI: 22. Invoke \n business API
191-
BackendAPI -&gt; ProxySidecar: 23. Business API \n response
192-
ProxySidecar -&gt; ProxySidecar: 24. Fine-Grained \n response filter
193-
ProxySidecar -&gt; Gateway: 25. Return response
194-
Gateway -&gt; PortalView: 26. Return response
195-
196-
@enduml
197-
</code></pre>
198-
<p>Mermaid</p>
199159
<pre class="mermaid">sequenceDiagram
200160
participant PortalView as Portal View
201161
participant LoginView as Login View
@@ -233,7 +193,6 @@ <h3 id="sequence-diagram"><a class="header" href="#sequence-diagram">Sequence Di
233193
Gateway -&gt;&gt; PortalView: 26. Return response
234194

235195
</pre>
236-
<p><img src="authentication-sequence.png" alt="Sequence Diagram" /></p>
237196
<ol>
238197
<li>
239198
<p>When a user visits the website to access the single-page application (SPA), the Light Gateway serves the SPA to the user's browser. Each single page application will have a dedicated Light Gateway instance acts as a BFF. By default, the user is not logged in and can only access limited site features. To unlock additional features, the user can click the <code>User</code> button in the header and select the <code>Sign In</code> menu. This action redirects the browser from the Portal View to the Login View, both served by the same Light Gateway instance.</p>
@@ -344,6 +303,22 @@ <h3 id="sequence-diagram"><a class="header" href="#sequence-diagram">Sequence Di
344303

345304
</div>
346305

306+
<!-- Livereload script (if served using the cli tool) -->
307+
<script>
308+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
309+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
310+
const socket = new WebSocket(wsAddress);
311+
socket.onmessage = function (event) {
312+
if (event.data === "reload") {
313+
socket.close();
314+
location.reload();
315+
}
316+
};
317+
318+
window.onbeforeunload = function() {
319+
socket.close();
320+
}
321+
</script>
347322

348323

349324

design/authentication-sequence.png

-99 KB
Binary file not shown.

design/fine-grained-authorization.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ <h2 id="standard-models-for-implementing-fga"><a class="header" href="#standard-
236236
</ul>
237237
<p>Each of these models offers different strengths and may be more suitable for different scenarios. FGA allows for fine grained control over access, enabling organizations to enforce highly specific access policies tailored to their requirements.</p>
238238
<h2 id="streamlining-fga-by-implementing-rule-based-access-control"><a class="header" href="#streamlining-fga-by-implementing-rule-based-access-control">Streamlining FGA by Implementing Rule-Based Access Control:</a></h2>
239-
<p>ABAC (Attribute-Based Access Control) focuses on data attributes, PBAC (Policy-Based Access Control) centers on logic, and ReBAC (Relationship-Based Access Control) emphasizes relationships between users and resources. But what if we combined all three to leverage the strengths of each? This is the idea behind <strong>Rule-Based Access Control (RBAC)</strong>.</p>
239+
<p>ABAC (Attribute-Based Access Control) focuses on data attributes, PBAC (Policy-Based Access Control) centers on logic, and ReBAC (Relationship-Based Access Control) emphasizes relationships between users and resources. But what if we combined all three to leverage the strengths of each? This is the idea behind <strong>Rule-Based Access Control (RuBAC)</strong>.</p>
240240
<p>By embedding a lightweight rule engine, we can integrate multiple rules and actions to achieve the following:</p>
241241
<ul>
242242
<li>
@@ -279,6 +279,22 @@ <h2 id="streamlining-fga-by-implementing-rule-based-access-control"><a class="he
279279

280280
</div>
281281

282+
<!-- Livereload script (if served using the cli tool) -->
283+
<script>
284+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
285+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
286+
const socket = new WebSocket(wsAddress);
287+
socket.onmessage = function (event) {
288+
if (event.data === "reload") {
289+
socket.close();
290+
location.reload();
291+
}
292+
};
293+
294+
window.onbeforeunload = function() {
295+
socket.close();
296+
}
297+
</script>
282298

283299

284300

design/json-schema-registry.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,22 @@ <h3 id="table-structure"><a class="header" href="#table-structure">Table Structu
215215

216216
</div>
217217

218+
<!-- Livereload script (if served using the cli tool) -->
219+
<script>
220+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
221+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
222+
const socket = new WebSocket(wsAddress);
223+
socket.onmessage = function (event) {
224+
if (event.data === "reload") {
225+
socket.close();
226+
location.reload();
227+
}
228+
};
229+
230+
window.onbeforeunload = function() {
231+
socket.close();
232+
}
233+
</script>
218234

219235

220236

design/light-controller.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,22 @@ <h1 id="light-controller"><a class="header" href="#light-controller">Light Contr
183183

184184
</div>
185185

186+
<!-- Livereload script (if served using the cli tool) -->
187+
<script>
188+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
189+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
190+
const socket = new WebSocket(wsAddress);
191+
socket.onmessage = function (event) {
192+
if (event.data === "reload") {
193+
socket.close();
194+
location.reload();
195+
}
196+
};
197+
198+
window.onbeforeunload = function() {
199+
socket.close();
200+
}
201+
</script>
186202

187203

188204

design/yaml-rule-registry.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,22 @@ <h1 id="yaml-rule-registry"><a class="header" href="#yaml-rule-registry">YAML Ru
183183

184184
</div>
185185

186+
<!-- Livereload script (if served using the cli tool) -->
187+
<script>
188+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
189+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
190+
const socket = new WebSocket(wsAddress);
191+
socket.onmessage = function (event) {
192+
if (event.data === "reload") {
193+
socket.close();
194+
location.reload();
195+
}
196+
};
197+
198+
window.onbeforeunload = function() {
199+
socket.close();
200+
}
201+
</script>
186202

187203

188204

0 commit comments

Comments
 (0)