Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examine and clarify the desired behavior of overlaying profiles on existing attributes #977

Open
alanisaac opened this issue Mar 5, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation framework Structures, conventions, requirements, data types, etc.

Comments

@alanisaac
Copy link
Contributor

alanisaac commented Mar 5, 2024

Background

In OCSF's schema definition files, there is the concept of a profile. As documented here, a profile is akin to an overlay or mixin:

Profiles overlay additional related attributes into event classes and objects allowing for cross-category event class augmentation and filtering. Event classes register for profiles that when optionally applied, can be mixed into event classes and objects, by a producer or mapper.

As described further on in the documentation, classes may explicitly declare attributes that overlap with a profile. The described behavior is that the class defined attribute requirement (e.g. required, recommended, optional) takes precedence over that of the profile:

However some classes, such as System Activity classes, build-in the attributes of a profile, for example the Host profile attributes device and actor are defined in the class. When a class definition includes the profile attributes, it still registers for that profile in the class definition so as to match any searches across events for that profile. In this case the class defined attribute requirement definitions take precedence.

As discussed in the working group call on 03/05/2024, this behavior may or may not be desired. Specifically, it was not clear if a profile with a more restrictive requirement should be overridden by an explicitly declared attribute with a less restrictive requirement.

Examples

1. when a profile attribute is more restrictive than an event attribute

This can be seen in action today with the combination of the rdp_activity event in the network category and the host profile:

Note how the host profile includes a recommended device attribute, but the rdp_activity event includes a less restrictive optional device attribute.

On the schema server, the "device" attribute is not shown unless the host profile is active, and when the profile is active, it is shown with the less restrictive optional requirement.

2. when a profile attribute is less restrictive than an event attribute

This can be seen in several cases, but here we'll use the same host profile and the patch_state event in the discovery category:

Note how the host profile includes a recommended device attribute, but the patch_state event includes a more restrictive required device attribute.

On the schema server, the "device" attribute is shown with the more restrictive required regardless of whether the host profile is active. When the profile is active, interestingly the additional actor attribute from the profile does not seem to appear.

To Do

The above behavior in the OCSF schema server does conform to what is stated in the documentation, in a way: the requirement of the event is always preferred over the requirement of the profile. However, there does seem to be some inconsistency on whether attributes exist or not based on whether the profile is applied. Why doesn't the device attribute exist on rdp_activity without the host profile applied, and why does the actor attribute not exist on patch_state when it is?

@alanisaac alanisaac added documentation Improvements or additions to documentation framework Structures, conventions, requirements, data types, etc. labels Mar 5, 2024
@alanisaac
Copy link
Contributor Author

Why doesn't the device attribute exist on rdp_activity without the host profile applied

I recently learned that preventing this behavior is the purpose of "profile": null, though this feature does not seem to be well-documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation framework Structures, conventions, requirements, data types, etc.
Projects
None yet
Development

No branches or pull requests

1 participant