[Security Solutions][POC] Create and integrate an OpenAPI specification for rules #81964
Closed
24 tasks
Labels
Feature:Detection Rules
Anything related to Security Solution's Detection Rules
Team:Detection Rule Management
Security Detection Rule Management Team
Team:Detections and Resp
Security Detection Response Team
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
technical debt
Improvement of the software architecture and operational architecture
This is a experimental ticket/POC for uncovering any issues, problems if were to migrate to the OpenAPI specification: https://swagger.io/specification/
Other projects, tickets, discussions around OpenAPI specification:
#36575
#52284
ec-openapi-specification
Overview
As more and more people utilize rules across organizations, github repos, programming languages, data formats, etc... we are wanting to support solving problems where moving to a declarative and parseable specification such as OpenAPI would be helpful for everyone.
Our hope is to have a centralized definition for the most common sections of a rule when it exists on a file system, Kibana alerting Saved Object, http endpoint, a git repo, etc... and to be able to encode this within the OpenAPI specification. Other OpenAPI specifications would then include this specification such as our Kibana REST route request/response which would include put/post/patch/_import/_export specs, Kibana alerting storage specs, our pre-packaged rules file system spec, and future specs such as CDN based specs. OpenAPI's oneOf, anyOf, allOf, not look like they all would fit nicely for our needs and provide a path forward for unions based on alerting types with their
discriminator
feature.Other repo's today outside of Kibana also have their own evolving rule specs which do data transforms into our existing rule spec and might benefit from being able to read from this specification for their own needs such as validations after a transform before an import.
Free things we get from OpenAPI we need
Goals:
$ref
for REST specs and other non-REST specs/validations$ref
and pull from this single rule specdiscriminator
if we get type unions or partials or etc...Constraints:
Bridges still too far:
Unknowns that should be checked off as we know them:
discriminator
feature are we getting strong union types between alert types?is guard
usages of existing exception lists and other areas? Is that possible/easy?common
folder or are they split up between common, public, server? Or can we use a derived type based system where it's "automatic" liketypeOf
?The text was updated successfully, but these errors were encountered: