Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
zeus-proto
Advanced tools
The goal of this project is twofold;
javascript
and php
boilerplate code that applications will use when serializing / deserializing the API contract data to validate its correctness.The schemas found in the schemas
folder are language agnostic and are either Protobuf or OpenAPI / JSON Schemas. Protobuf has been chosen as it can represent a wide range of technologies including GRPC
and Kafka
- which is the underlying messaging bus for the entire internal CBH banking infrastructure. OpenApi / JSON Schema has been chosen for the remaining HTTPS requests between the remote frontend applications and backend microservices exposing 'external' APIs.
nvm is a pre-requisite
To generate the code for the Protobuf schemas, run the following commands:
nvm use
npm i
docker-compose up
The javascript part of this library uses OpenAPI schema 3.0.3 due to limitations of the available tooling at creation. It is planned to eventually migrate to at least OpenApi schema 3.1 as it has full compatibility with JSON Schema draft 2020-12.
As such, OpenAPI schemas should be created with 3.1 in mind.
The JSON Schema part of this library is using draft 2020-12.
With OpenAPI 3.1 and JSON Schema draft 2020-12, the schema
object is now an 'extended subset of the JSON Schema Specification'. As such, eventually JSON Schemas can be used in their entirity in this part of the OpenAPI specification.
With the current use of OpenAPI 3.0.3 and JSON Schema draft 2021-12, there are some minor incompatibilities. Current limitations are listed below.
Some of the tooling has not yet implemented OpenAPI 3.1 or JSON Schema draft 2020-12, so there are some workarounds in place;
$id
tags have been removed for now as an underlying library json-schema-ref-parser
doesn't implement $id
logic correctly yet.$ref
s are relative paths instead of referencing full $ids
due to the issue above.$ref
s in some cases are relative to the root directory and other times relative to their parent directory.json-generate-schemas
which creates de-referenced schemas for the reasons above.$schema
properties as they as seen as additional properties in version 3.0.3
, which are forbidden.json-schema-ref-parser
library issues.?filter[search][eq]=something
Install protoc
either directly as explained here here or as a docker image
Then install the javascript development packages;
nvm use
npm i
And the php development packages; TODO
To generate the validation code, dereferenced OpenAPI schemas and more, simply run the following command;
npm run generate
This command simply combines the following commands;
Typescript boilerplate code is generated for each micro-service using javascript npm
commands via another CBH code generation library.
To generate the javascript validation module files and the typescript definition files, run the following command;
npm run generate-json
Compiled output will be output to lib/microservice-name/
.
TODO
The fully dereferenced OpenAPI schema for each micro-service is generated using javascript npm
commands.
The intermediary JSON Schema must be compiled first by the npm
commands above.
To generate the micro-service openapi.json files, run the following command;
npm run generate-openapi
Compiled output will be output to lib/microservice-name/
.
The library can validate all the generated .openapi.json
files after generation with the following npm
command;
npm run openapi-validate
Php boilerplate code is generated for each micro-service using php composer
commands.
TODO
TODO
Compiled output will be output to lib/php/
.
TODO
OpenAPI 3.0.3 Spec JSON Schema TS Proto CLI options Migrating from OpenAPI 3.0 to 3.1
FAQs
The goal of this project is twofold;
The npm package zeus-proto receives a total of 0 weekly downloads. As such, zeus-proto popularity was classified as not popular.
We found that zeus-proto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.