TortisDev.Ocsf
0.1.0-preview.12
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
This is a prerelease version of TortisDev.Ocsf.
dotnet add package TortisDev.Ocsf --version 0.1.0-preview.12
NuGet\Install-Package TortisDev.Ocsf -Version 0.1.0-preview.12
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TortisDev.Ocsf" Version="0.1.0-preview.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TortisDev.Ocsf" Version="0.1.0-preview.12" />
<PackageReference Include="TortisDev.Ocsf" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TortisDev.Ocsf --version 0.1.0-preview.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TortisDev.Ocsf, 0.1.0-preview.12"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TortisDev.Ocsf@0.1.0-preview.12
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TortisDev.Ocsf&version=0.1.0-preview.12&prerelease
#tool nuget:?package=TortisDev.Ocsf&version=0.1.0-preview.12&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Tortis OCSF
A C#/.Net implementation of the Open Cybersecurity Schema Framework (OCSF) for creating security events in .Net applications for export to a SIEM.
User Access Management Events Example
// Create a user access management event for assigning privileges
var user = new User
{
Uid = "john.doe",
Name = "John Doe",
Domain = "example.com"
};
var resources = new[]
{
new Resource
{
Name = "financial-reports",
Type = "folder"
}
};
var userAccessEvent = new UserAccessManagementEvent(user, UserAccessManagementEvent.Activity.AssignPrivileges)
{
Resources = resources,
Privileges = new[] { "read", "write" }
};
// Publishing the event to Kafka
using var producer = new ProducerBuilder<string, string>(producerConfig).Build();
var jsonString = JsonSerializer.Serialize(userAccessEvent, new JsonSerializerOptions
{
WriteIndented = true
});
await producer.ProduceAsync("user-access-events", new Message<string, string>
{
Key = user.UserId,
Value = jsonString
});
This example demonstrates creating an event that logs when a user is granted read and write privileges to a specific resource and publishing the event to a Kafka topic using the Confluent.Kafka client.
Validation
It is recommended to validate the event before publishing.
IEnumerable<ValidationResult> results = userAccessEvent.Validate();
bool isValid = !results.Any();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 8.0.5)
-
net8.0
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 8.0.5)
-
net9.0
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 9.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.1.0-preview.12 | 116 | 6/15/2025 |
0.1.0-preview.11 | 116 | 6/15/2025 |