A .NET SDK for integrating with Pangea services. Supports .NET 6, .NET Standard 2.0, .NET Framework v4.6.1, and any other target framework that's compatible with these.
Via .NET CLI:
$ dotnet add package Pangea.SDK
Via PackageReference:
<PackageReference Include="Pangea.SDK" Version="*" />
Pre-release versions may be available with the beta
denotation in the version
number. These releases serve to preview beta services and APIs. Per Semantic
Versioning, they are considered unstable and do not carry the same compatibility
guarantees as stable releases. Beta changelog.
Via .NET CLI:
$ dotnet add package Pangea.SDK --version 3.8.0-beta.3
Via PackageReference:
<PackageReference Include="Pangea.SDK" Version="3.8.0-beta.3" />
General usage would be to create a token for a service through the Pangea Console and then construct an API client for that respective service. The below example shows how this can be done for Secure Audit Log to log a simple event:
using PangeaCyber.Net;
using PangeaCyber.Net.Audit;
// Load client configuration from environment variables `PANGEA_AUDIT_TOKEN` and
// `PANGEA_DOMAIN`.
var config = Config.FromEnvironment(AuditClient.ServiceName);
// Create a Secure Audit Log client.
var client = new AuditClient.Builder(config).Build();
// Create a basic event.
var event = new StandardEvent.Builder("Hello World!")
.WithAction("Login")
.WithActor("Terminal")
.Build();
// Optional configuration.
var logConfig = new LogConfig.Builder()
.WithVerbose(true)
.Build();
// Log the event.
var response = await client.Log(event, logConfig);