Open achrinza opened 4 years ago
@achrinza, thanks for the suggestion. I'm thinking whether it would fit better as a community extension.
@raymondfeng @bajtos, WDYT?
I'm leaning towards making this a built-in extension point for 2 reasons:
WDYT?
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS
file at the top-level of this repository. This issue will be closed within 30 days of being stale.
Table of Contents
Suggestion
Add an extension point to accept an Auditor.
The
Auditor
can take up 2 auditing roles, Static and Dynamic, and may adopt the following interface(s):Use Cases
LoopBack 4 is designed as a framework to build a wide variety of applications. This means opportunities for the developers' hardening routines to miss potentially-important areas of security concern.
There are 3 main user stories:
Overall, these users stories share the need to increase discoverability. By introducing a common audit framework, we would be able to shift more of the effort on to the framework and extension developers instead.
The above implementation idea caters to all 3 user stories by providing a simple, common interface that can be adopted.
Examples
This is more of an implementation idea, less of a concrete example:
From the perspective of a developer, I do not need to do anything beyond creating a
AuditorConfig
to inform LoopBack 4 of how to enforce the rules. This is similar toeslint
rules.A
Component
should be able to register new auditors with anauditors
property.The core framework should automatically register new auditors.
Auditors should be
off
by default, but the application should log a warning if anAuditorConfig
does not exist.To manually register an auditor in the
Application
constructor:Additional Expansion: Security Content Automation Protocol (SCAP) v1
SCAP v1 is an open standard created by the National Institute of Standards and Technology (NIST) that is a suite of specifications that standardize the format and nomenclature by which software flaw and security configuration information is communicated, both to machines and humans.
The LoopBack 4 auditor extension point is an ideal candidate for adopting SCAP v1 as:
The
@loopback/core
package's auditor extension point can expose a customizable SCAP v1 implementation. This would enable developers to quickly integrate the enabled auditors with their security solution without needing a third-party scanner or custom code.Acceptance criteria
TBD - will be filled by the team.