OpnsenseConnection
OPNsense REST endpoint + API credentials. Built by the caller from whatever credentials store they own (file, secrets manager, env, …). The OPNsense API uses HTTP Basic auth with apiKey:apiSecret.
public sealed class OpnsenseConnection
1. Properties
1.1. AllowSelfSignedCertificate
Allow self-signed TLS cert (LAN-only OPNsense, default true).
public bool AllowSelfSignedCertificate { get; init; }
1.2. ApiKey
OPNsense API key (system user apikey).
public required string ApiKey { get; init; }
1.3. ApiSecret
OPNsense API secret (system user apisecret).
public required string ApiSecret { get; init; }
1.4. BaseUrl
Base URL of the OPNsense API (e.g. https://10.1.0.1). The /api prefix is appended internally.
public required Uri BaseUrl { get; init; }