feat(ocsf): configurable schema version for SIEM backward compatibility - #2717
feat(ocsf): configurable schema version for SIEM backward compatibility#2717zanetworker wants to merge 1 commit into
Conversation
34073ea to
8fdaeec
Compare
E2E Verification: Splunk CIM mapping with v1.1 downgraded eventsTested the full pipeline on a live cluster with Splunk Enterprise:
Splunk CIM query: Result: 13 events mapped to CIM Network Traffic data model with This proves the "plug OpenShell into your existing SIEM and it just works" story for customers running Splunk with the OCSF-CIM Add-On on v1.1 schemas. |
|
Related: #2664 adds AI inference events via the |
|
@zanetworker does this configuration need to be addressed in the docs? |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Validation: Project-valid implementation of accepted issue #2662; the author also supplied live Splunk v1.1 integration evidence.
Head SHA: 8fdaeece2ce7396ade50850d4de6765a01c01985
Base SHA: dd2b4e3bc0688bdd59f90030f7c1d52511d6e354
Merge base SHA: dd2b4e3bc0688bdd59f90030f7c1d52511d6e354
Patch ID: 99ebca72e7706c76032c9ed2d3289e7b3ea8930c
Gator payload: 4
Review mode: initial
Previous reviewed SHA: none
Review budget exhausted: no
Maintainer decision required: no
Thanks @zanetworker, I checked the live Splunk verification and the note that #2664 is independent; those support the feature's validation. @johntmyers's question about documentation is also well-founded: the existing published OCSF export contract becomes inaccurate at this head.
Blocking findings:
GATOR-8fdaeece-01: Unsupported and malformed target versions are accepted; see the inline finding.GATOR-8fdaeece-02— Warning: Published OCSF export guidance must accurately document selectable output versions and the supported configuration workflow.- Prerequisite: An operator follows
/observability/ocsf-json-exportto configure or integrate JSON export. - Entry point → sink: Published OCSF export docs and
openshell settings→ schema-aware SIEM ingestion of the emitted JSONL. - Base → head: The page accurately promised complete v1.7.0 objects before schema selection existed; this head adds field-stripping, schema-selectable output while the page still promises every record is complete v1.7.0 and gives no selection workflow.
- Impact: The primary integration page materially misstates the emitted contract and leaves operators unable to discover or correctly configure the feature.
- Reproducer: Follow
docs/observability/ocsf-json-export.mdx, then setocsf_schema_version; downgraded records contradict its v1.7.0 guarantee, and the page has no 1.1/1.3 instructions. - PR ownership: The contradiction is created by this PR's new public setting; the relevant docs page already exists but is unchanged, so this blocker cannot be anchored to a docs diff line. The unchanged contract is at
docs/observability/ocsf-json-export.mdx:42and:164;.agents/skills/openshell-cli/SKILL.md:616also documents the neighboring settings workflow but omits this key. - Requested change: Update the export page with global/per-sandbox commands, exact supported values, default/unset behavior, hot-reload timing, metadata rewriting, and omitted fields; update the CLI skill guidance; reference the new screenshot or remove it.
- Prerequisite: An operator follows
Carried findings:
- None
Non-blocking suggestions:
- None
Docs: Missing for a direct user-facing gateway setting; the current export page is materially false.
Next state: gator:in-review
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Validation: Project-valid implementation of accepted issue #2662; the author also supplied live Splunk v1.1 integration evidence.
Head SHA: da10094fda901b31d2ead35f8e6c243b921ac291
Base SHA: dd2b4e3bc0688bdd59f90030f7c1d52511d6e354
Merge base SHA: dd2b4e3bc0688bdd59f90030f7c1d52511d6e354
Patch ID: c14374c353d8b1657f1c4dcdcf47a657a40a6bf9
Gator payload: 4
Review mode: follow_up
Previous reviewed SHA: 8fdaeece2ce7396ade50850d4de6765a01c01985
Review budget exhausted: no
Maintainer decision required: no
Thanks @zanetworker. I checked the validation and documentation update in your latest commit. The allow-list and tests resolve GATOR-8fdaeece-01, but the published configuration guidance still needs one consistency pass.
Blocking findings:
GATOR-8fdaeece-02— Warning (carried): Published OCSF export guidance must document only configuration paths and target versions that the runtime accepts.- Prerequisite: An operator follows the new OCSF export documentation to configure the downgrade through
gateway.tomlor for a v1.5 SIEM integration. - Entry point → sink: the documented gateway
--config/OPENSHELL_GATEWAY_CONFIGpath oropenshell settings set→ gateway TOML deserialization orRegisteredSetting::validate_string_value. - Base → head: The previous head omitted the setting. This head documents
[openshell.gateway].ocsf_schema_version, but the gateway file schema has no such field and rejects it; it also recommends1.5for CrowdStrike and Datadog even though the new allow-list accepts only empty,1.1, and1.3. - Impact: Following the TOML example deterministically prevents gateway startup, while following either v1.5 recommendation produces a settings validation error and cannot configure the advertised integration.
- Reproducer: Start the gateway with
[openshell.gateway]containingocsf_schema_version = "1.1"; parsing rejects the unknown field. Separately runopenshell settings set --global --key ocsf_schema_version --value "1.5"; the new allow-list rejects it. - PR ownership: This PR introduces the setting, and the latest delta adds these incompatible examples while resolving the existing docs obligation.
- Locations:
docs/observability/ocsf-json-export.mdx:160,:181,:182, and:196;docs/reference/gateway-config.mdx:81. - Requested change: Remove the
gateway.tomlexample and gateway-config reference unless that entry point is implemented. Remove or clearly mark the v1.5 workflows as unsupported, and state that selectable downgrade targets are1.1and1.3through global or per-sandbox settings.
- Prerequisite: An operator follows the new OCSF export documentation to configure the downgrade through
Carried findings:
GATOR-8fdaeece-02: still open as described above.
Docs: Present, but currently advertises unsupported configuration paths and values.
Next state: gator:in-review
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Validation: Project-valid implementation of accepted issue #2662; the author also supplied live Splunk v1.1 integration evidence.
Head SHA: 12d577fe83d0b7783aa990b3681263c15d781acb
Base SHA: dd2b4e3bc0688bdd59f90030f7c1d52511d6e354
Merge base SHA: dd2b4e3bc0688bdd59f90030f7c1d52511d6e354
Patch ID: c080fb79f09d08592568aab8d1fc92191a44020c
Gator payload: 4
Review mode: follow_up
Previous reviewed SHA: da10094fda901b31d2ead35f8e6c243b921ac291
Review budget exhausted: no
Maintainer decision required: no
Thanks @zanetworker. I checked your latest documentation-only delta against the runtime setting allow-list and configuration path. It removes the unsupported gateway.toml field, removes the gateway configuration reference, and marks the unsupported v1.5 targets accurately. That resolves GATOR-8fdaeece-02 and addresses @johntmyers's documentation question.
Blocking findings:
- No blocking findings remain.
Carried findings:
- None.
GATOR-8fdaeece-01andGATOR-8fdaeece-02are resolved by the latest patch.
Docs: Fern documentation and the related CLI skill now describe the supported global/per-sandbox settings workflow, supported values, default behavior, and hot-reload timing. No navigation change is needed for the existing page.
Next state: gator:in-review pending required E2E workflow dispatch; advance to gator:watch-pipeline only after the current-head workflow is queued.
|
Label |
|
/ok to test 12d577f |
|
On @johntmyers 's docs question — the thing most worth calling out is that the downgrade is lossy in one specific way. Would it be worth having a lossy downgrade leave a breadcrumb — stash the elided fields (or just |
|
Label |
I'm a bit ambivalent on this. Curious what @zanetworker thinks as he's closest to the use case. I usually default to "doing less" when able. Operators working with OCSF should know what version they are on and also understand there are other versions out there that they are missing the benefits from. IMHO we could call this out in the actual docs pages "OpenShell supports up to version 1.8 in order support newer AI properties, if you need this data you should upgrade." or something to that effect. |
Author Follow-Up NudgeThis PR has been in @zanetworker, @johntmyers asked that the lossy downgrade be documented clearly for operators and auditors. I checked the unchanged current head: downgraded JSONL still strips Please clarify whether downgraded JSONL is intentionally a lossy export with a full-fidelity record retained elsewhere, or update the documentation or implementation so auditors can distinguish “no model involved” from “model attribution stripped.” |
|
@johntmyers was on PTO, will work on the latest feedback |
12d577f to
5f5f094
Compare
|
/ok to test 5f5f094 |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Thanks @zanetworker. I checked the rebased author patch after your update and verified that the new unmapped.downgraded_from breadcrumb and corrected lossy-export documentation address @johntmyers's feedback about distinguishing absent AI attribution from attribution stripped during downgrade. The bounded critical-only review found no new blocking defect, and both prior Gator findings remain resolved.
Blocking findings:
- No blocking findings remain.
Carried findings:
- None.
GATOR-8fdaeece-01andGATOR-8fdaeece-02remain resolved.
Gator metadata
- Validation: Project-valid implementation of accepted issue #2662 with author-supplied Splunk integration evidence.
- Docs: Fern documentation now accurately describes the supported settings workflow, downgrade targets, lossy behavior, omitted AI attribution, and the audit breadcrumb; no navigation change is needed for the existing page.
- Checks: Required current-head Branch Checks, Helm Lint, and E2E gates are pending, but their workflows have not yet been queued.
- E2E:
test:e2eis applied. The copy-pr mirror was stale at the previous SHA;/ok to test 5f5f0944996d5a60556804c11580f355e6d4bb43was posted and mirror refresh is pending. - Head SHA:
5f5f0944996d5a60556804c11580f355e6d4bb43 - Base SHA:
74960ebfaeec4673885089ed995fad902459749f - Merge base SHA:
74960ebfaeec4673885089ed995fad902459749f - Patch ID:
72d177e27bd48b6ddb6e6f05122952e999af9d5d - Gator payload:
8 - Review mode:
critical_only - Previous reviewed SHA:
12d577fe83d0b7783aa990b3681263c15d781acb - Review budget exhausted: yes
- Maintainer decision required: no
- Next state:
gator:blocked - Blocked reason:
copy_pr_mirror_pending
|
Label |
Add a gateway-configurable OCSF schema version target that downgrades JSONL output for SIEMs that only support older schema versions. AWS Security Lake requires v1.1.0, Splunk CIM Add-On targets v1.1-v1.3. The downgrade filter strips profile-gated fields (ai_model, container, observation_point_id), removes unknown profiles from metadata.profiles, rewrites metadata.version, and adds an unmapped.downgraded_from breadcrumb so auditors can distinguish "no model involved" from "model attribution stripped." Supported target versions (1.1, 1.3) are enforced by an allow-list in the settings registry. Invalid values are rejected with a clear error. The setting flows to sandboxes via the settings bundle and takes effect on the next poll cycle. The shorthand log output is unaffected. Closes NVIDIA#2662 Signed-off-by: Adel Zaalouk <zanetworker@gmail.com> Signed-off-by: Adel Zaalouk <azaalouk@redhat.com>
5f5f094 to
1c3d1fa
Compare
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Thanks @zanetworker. I checked the rebased author patch against the previously reviewed tree. The OCSF setting guidance now follows the repository's move from the old internal CLI skill path to the public skills/openshell-cli path, both prior Gator findings remain resolved, and the bounded critical-only review found no new blocking defect.
Blocking findings:
- No blocking findings remain.
Carried findings:
- None.
GATOR-8fdaeece-01andGATOR-8fdaeece-02remain resolved.
Gator metadata
- Validation: Project-valid implementation of accepted issue #2662 with author-supplied Splunk integration evidence.
- Docs: Fern documentation and the public CLI skill accurately describe supported settings, downgrade targets, lossy behavior, omitted AI attribution, and the audit breadcrumb.
- Checks: Current-head Branch Checks, Helm Lint, and E2E gates are pending and not yet dispatched.
- E2E:
test:e2eis applied; current-head copy-pr mirror authorization and workflow dispatch are pending. - Head SHA:
1c3d1fab515b50ec88097988788c30a1abd53af8 - Base SHA:
64a858dadebc23cf715bc4292c8c4970f2e9a3d2 - Merge base SHA:
64a858dadebc23cf715bc4292c8c4970f2e9a3d2 - Patch ID:
501a5efe160e411930608f2df8651f0bc25d9b9d - Gator payload:
8 - Review mode:
critical_only - Previous reviewed SHA:
5f5f0944996d5a60556804c11580f355e6d4bb43 - Review budget exhausted: yes
- Maintainer decision required: no
- Next state:
gator:blocked - Blocked reason:
copy_pr_mirror_pending
|
/ok to test 1c3d1fa |

Summary
Add a gateway-configurable OCSF schema version target that downgrades JSONL output for SIEMs that only support older schema versions. AWS Security Lake requires v1.1.0, Splunk CIM Add-On targets v1.1-v1.3, CrowdStrike FDR uses v1.5.0. OpenShell's internal model stays at the current version; only the JSONL serialization is transformed.
Related Issue
Closes #2662
Approach
A downgrade filter in the JSONL layer runs after event serialization and before writing. Based on a field-by-field diff across v1.1.0, v1.3.0, and v1.7.0 (analysis), the filter is small:
ai_model,container,observation_point_idmetadata.profiles:ai_operation,containermetadata.versionto the target versionNo field renames needed. The core event structure (class UIDs, activity IDs, HTTP/network fields) is identical across all versions. The differences are all profile-gated additions.
The shorthand log output is unaffected (human-readable, not consumed by SIEMs).
Gateway Configuration
The setting flows to sandboxes via the settings bundle (same mechanism as
ocsf_json_enabled). Empty or unset means no downgrade.Changes
openshell-ocsfcrate:format/downgrade.rs—downgrade_event()function that strips fields and profiles based on target versiontracing_layers/jsonl_layer.rs—with_target_version()method; applies downgrade before writingopenshell-sandboxcrate:main.rs— creates sharedocsf_schema_versionmutex, passes to JSONL layerlib.rs—apply_ocsf_schema_version_setting()reads the gateway setting and updates the shared versionSIEM Compatibility Matrix
Testing
cargo test -p openshell-ocsf— 134 passed (7 new downgrade tests)cargo clippy --all-targets -- -D warnings— cleancargo check -p openshell-sandbox— compiles with settings wiringChecklist