Skip to content

Commit 81fd233

Browse files
committed
updates
1 parent 30aa33a commit 81fd233

14 files changed

+114
-194
lines changed

404.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,6 @@ <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>
192176

193177

194178

architecture.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,6 @@ <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>
202186

203187

204188

chapter_1.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,6 @@ <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>
196180

197181

198182

design.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -185,22 +185,6 @@ <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>
204188

205189

206190

design/authentication-authorization.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -303,22 +303,6 @@ <h3 id="sequence-diagram"><a class="header" href="#sequence-diagram">Sequence Di
303303

304304
</div>
305305

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>
322306

323307

324308

design/fine-grained-authorization.html

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,62 @@ <h2 id="streamlining-fga-by-implementing-rule-based-access-control"><a class="he
249249
<p><strong>Infer Relationships</strong>: Automatically deduce relationships between entities. For instance, the rule engine could grant a user access to a file if they already have permission for the containing folder.</p>
250250
</li>
251251
</ul>
252+
<h2 id="principle-of-least-privilege"><a class="header" href="#principle-of-least-privilege">Principle of Least Privilege</a></h2>
253+
<p>The <a href="https://www.cyberark.com/what-is/least-privilege/">principle of least privilege access control</a> widely referred to as least privilege, and PoLP is the security concept in which user(s) (employee(s)) are granted the minimum level of access/permissions to the app, data, or system that is required to perform his/her job functions.</p>
254+
<p>To ensure PoLP is effectively enforced, we've compiled a list of best practices:</p>
255+
<ul>
256+
<li>
257+
<p><strong>Conduct a thorough privilege audit</strong>: As we know, visibility is critical in an access environment, so conducting regular or periodic access audits of all privileged accounts can help your team gain complete visibility. This audit includes reviewing privileged accounts and credentials held by employees, contractors, and third-party vendors, whether on-premises, accessible remotely, or in the cloud. However, your team must also focus on default and hard-coded credentials, which IT teams often overlook.</p>
258+
</li>
259+
<li>
260+
<p><strong>Establish the least privilege as the default</strong>: Start by granting new accounts the minimum privileges required for their tasks and eliminate or reconfigure default permissions on new systems or applications. Further, use role-based access control to help your team determine the necessary privileges for a new account by providing general guidelines based on roles and responsibilities. Also, your team needs to update and adjust access level permissions when the user's role changes; this will help prevent privilege creep.</p>
261+
</li>
262+
<li>
263+
<p><strong>Enforce separation of privileges</strong>: Your team can prevent over-provisioning by limiting administrator privileges. Firstly, segregate administrative accounts from standard accounts, even if they belong to the same user, and isolate privileged user sessions. Then, grant administrative privileges (such as read, write, and execute permissions) only to the extent necessary for the user to perform their specific administrative tasks. This will help your team prevent granting users unnecessary or excessive control over critical systems, which could lead to security vulnerabilities or misconfigurations.</p>
264+
</li>
265+
<li>
266+
<p><strong>Provide just-in-time, limited access</strong>: To maintain least-privilege access without hindering employee workflows, combine role-based access control with time-limited privileges. Further, replace hard-coded credentials with dynamic secrets or use one-time-use/temporary credentials. This will help your team grant temporary elevated access permissions when users need it, for instance, to complete specific tasks or short-term projects.</p>
267+
</li>
268+
<li>
269+
<p><strong>Keep track and evaluate privileged access</strong>: Continuously monitor authentications and authorizations across your API platform and ensure all the individual actions are traceable. Additionally, record all authentication and authorizaiton sessions comprehensively, and use automated tools to swiftly identify any unusual activity or potential issues. These best practices are designed to enhance the security of your privileged accounts, data, and assets while ensuring compliance adherence and improving operational security without disrupting user workflows.</p>
270+
</li>
271+
</ul>
272+
<h2 id="openapi-specification-extensions"><a class="header" href="#openapi-specification-extensions">OpenAPI Specification Extensions</a></h2>
273+
<p>OpenAPI uses the term security scheme for authentication and authorization schemes. OpenAPI 3.0 lets you describe APIs protected using the following <a href="https://swagger.io/docs/specification/v3_0/authentication/">security schemes</a>. The fine-grained authorization is just another layer of security and it is natural to define the fine-grained authorization in the same specification. It is can be done with OpenAPI specification extensions.</p>
274+
<p>Extensions (also referred to as specification extensions or vendor extensions) are custom properties that start with x-, such as x-logo. They can be used to describe extra functionality that is not covered by the standard OpenAPI Specification. Many API-related products that support OpenAPI make use of extensions to document their own attributes, such as Amazon API Gateway, ReDoc, APIMatic and others.</p>
275+
<p>As OpenAPI specification openapi.yaml is loaded during the light-4j startup, the extensions will be available at runtime in cache for each endpoint just like the scopes definition. The API owner can define the following two extensions for each endpoint:</p>
276+
<ul>
277+
<li>
278+
<p><strong>x-request-access</strong>: This section allows designer to specify one or more <strong>rules</strong> as well as one or more security <strong>attributes</strong> for the input of the rules. For example, roles, location etc. The rule result will decide if the user has access to the endpoint based on the security attributes from the JWT token in the request chain.</p>
279+
</li>
280+
<li>
281+
<p><strong>x-response-filter</strong>: This section is similar to the above; however, it works on the response chain. The rule result will decide which row or column of the response JSON will return to the user based on the security profile from the JWT token.</p>
282+
</li>
283+
</ul>
284+
<p>Example of OpenAPI specification with fine-grained authorization.</p>
285+
<pre><code>paths:
286+
/accounts:
287+
get:
288+
summary: "List all accounts"
289+
operationId: "listAccounts"
290+
x-request-access:
291+
rule: "account-cc-group-role-auth"
292+
roles: "manager teller customer"
293+
x-response-filter:
294+
rule: "account-row-filter"
295+
teller:
296+
status: open
297+
customer:
298+
status: open
299+
owner: @user_id
300+
rule: "account-col-filter"
301+
teller: ["num","owner","type","firstName","lastName","status"]
302+
customer: ["num","owner","type","firstName","lastName"]
303+
security:
304+
- account_auth:
305+
- "account.r"
306+
307+
</code></pre>
252308

253309
</main>
254310

@@ -279,22 +335,6 @@ <h2 id="streamlining-fga-by-implementing-rule-based-access-control"><a class="he
279335

280336
</div>
281337

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>
298338

299339

300340

design/json-schema-registry.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,6 @@ <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>
234218

235219

236220

design/light-controller.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,6 @@ <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>
202186

203187

204188

design/yaml-rule-registry.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,6 @@ <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>
202186

203187

204188

index.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,6 @@ <h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h
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>
196180

197181

198182

0 commit comments

Comments
 (0)