@mdf.js/openc2-core
Version:
MMS - API Core - OpenC2
52 lines • 1.96 kB
JavaScript
"use strict";
/**
* Copyright 2024 Mytra Control S.L. All rights reserved.
*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
* or at https://opensource.org/licenses/MIT.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Checker = void 0;
const tslib_1 = require("tslib");
const doorkeeper_1 = require("@mdf.js/doorkeeper");
const Schemas = tslib_1.__importStar(require("./control"));
// *************************************************************************************************
// #region Command and control JSON Schemas hierarchy
// *************************************************************************************************
// #region Common Schemas
const common = [
Schemas.Properties.to,
Schemas.Properties.from,
Schemas.Properties.contentType,
Schemas.Properties.status,
Schemas.Properties.requestId,
Schemas.Properties.created,
Schemas.Properties.port,
Schemas.Properties.l4protocol,
Schemas.Properties.ipv4net,
Schemas.Properties.ipv6net,
Schemas.Properties.ipv4connection,
Schemas.Properties.ipv6connection,
Schemas.Properties.hashes,
Schemas.Properties.payload,
Schemas.Properties.artifact,
Schemas.Properties.device,
Schemas.Properties.file,
Schemas.Properties.process,
Schemas.Properties.target,
Schemas.Properties.targets,
Schemas.commandContent,
Schemas.responseContent,
];
// #endregion
// *************************************************************************************************
// #region Command and control message schema
const schemas = {
'Control.Message.Command': Schemas.commandMessage,
'Control.Message.Response': Schemas.responseMessage,
'Control.Message': Schemas.message,
};
exports.Checker = new doorkeeper_1.DoorKeeper({ $data: true, strict: false })
.register(common)
.register(schemas);
//# sourceMappingURL=index.js.map