SaltSecurityCollectorExtension 1.2.5
dotnet add package SaltSecurityCollectorExtension --version 1.2.5
NuGet\Install-Package SaltSecurityCollectorExtension -Version 1.2.5
<PackageReference Include="SaltSecurityCollectorExtension" Version="1.2.5" />
<PackageVersion Include="SaltSecurityCollectorExtension" Version="1.2.5" />
<PackageReference Include="SaltSecurityCollectorExtension" />
paket add SaltSecurityCollectorExtension --version 1.2.5
#r "nuget: SaltSecurityCollectorExtension, 1.2.5"
#:package SaltSecurityCollectorExtension@1.2.5
#addin nuget:?package=SaltSecurityCollectorExtension&version=1.2.5
#tool nuget:?package=SaltSecurityCollectorExtension&version=1.2.5
Salt Security Traffic Collector for Azure App Services
An ASP.NET Core middleware extension that automatically captures HTTP request/response traffic from Azure App Services and transmits it to Salt Security API for real-time security analysis and threat detection.
Features
✅ Zero Latency Impact - Fire-and-forget async pattern with <1ms overhead ✅ Auto-Activation - Uses IHostingStartup, no code changes required ✅ Production Ready - Circuit breaker pattern with graceful degradation ✅ High Performance - Lock-free queue with concurrent background workers ✅ Multi-Framework - Supports .NET 6.0, 8.0, and 9.0
Quick Start
Installation
Install as Azure Site Extension or add to your ASP.NET Core project:
dotnet add package SaltSecurityCollectorExtension
Configuration
Add to your appsettings.json:
{
"SaltSecurity": {
"Uuid": "your-unique-identifier",
"ApiEndpoint": {
"BaseUrl": "https://your-salt-api.com",
"token": "your-token"
},
"Labels": {
"env": "production",
"region": "us-east-1"
}
}
}
Environment Variables (Azure App Service)
Configure via Azure Portal Application Settings:
SaltSecurity__Uuid = "your-uuid"
SaltSecurity__ApiEndpoint__BaseUrl = "https://api.example.com"
SaltSecurity__Token= token
Automatic Activation
The middleware activates automatically via IHostingStartup when the assembly is loaded. No code changes needed!
For Azure Site Extensions, the XDT transform automatically configures the hosting startup assembly.
How It Works
- Middleware intercepts HTTP requests/responses with minimal overhead
- Fire-and-forget enqueue to high-performance async queue (<0.1ms)
- Background workers process queue and send to Salt Security API
- Circuit breaker protects against API failures (graceful degradation)
- Zero impact on your application's response time or reliability
Architecture
HTTP Request → Middleware (capture) → Async Queue → Background Workers → Salt API
↓
Response (unaffected)
Configuration Options
| Option | Default | Description |
|---|---|---|
MaxRequestBodySize |
1 MB | Maximum request body to capture |
MaxResponseBodySize |
1 MB | Maximum response body to capture |
Queue.MaxQueueSize |
10,000 | Queue capacity (drop-oldest policy) |
Queue.MaxConcurrentWorkers |
5 | Number of background workers |
CircuitBreaker.FailureThreshold |
5 | Failures before circuit opens |
CircuitBreaker.DurationOfBreakSeconds |
30 | Circuit open duration |
EnableStartupTracing |
false | Enable detailed startup/initialization logs |
Performance
- Latency: <1ms added to request/response pipeline
- Throughput: ~5,000 requests/second (with 5 workers)
- Memory: ~Queue size × Average payload size (configurable limits)
- CPU: Minimal impact from async background processing
Security
- Sensitive headers automatically redacted (Authorization, Cookie, API keys)
- Configurable body size limits prevent memory exhaustion
- Basic authentication over HTTPS
- Secure credential storage via Azure Key Vault recommended
Troubleshooting
Middleware Not Activating
Enable Startup Tracing for detailed debugging:
{
"SaltSecurity": {
"EnableStartupTracing": true
}
}
This will log:
[SALT-TRACE] IHostingStartup.Configure() called- Confirms hosting startup is loading[SALT-TRACE] Services registered successfully- Confirms DI registration[SALT-TRACE] Adding SaltSecurityTrafficCollectorMiddleware to pipeline- Confirms middleware registration[SALT-TRACE] Middleware instance constructed- Confirms middleware instantiation with configuration
Then check:
- Verify
SaltSecuritysection exists inappsettings.json - Check required fields:
Uuid,BaseUrl,Username,Password - Review application logs for
[SALT-TRACE]entries - Ensure extension is installed in Azure Site Extensions
High Memory Usage
- Reduce
MaxQueueSize(10000 → 5000) - Reduce
MaxRequestBodySizeandMaxResponseBodySize - Increase
MaxConcurrentWorkersto drain queue faster
Circuit Breaker Opening
- Check network connectivity to Salt Security API
- Verify API credentials are correct
- Review Salt API logs for authentication errors
- Increase
TimeoutSecondsif API is slow
Logging
Configure logging level in appsettings.json:
{
"Logging": {
"LogLevel": {
"SaltSecurityCollectorExtension": "Information"
}
}
}
Levels: Trace (dev), Debug (dev), Information (prod), Warning (prod), Error (always)
Requirements
- .NET 6.0, 8.0, or 9.0
- ASP.NET Core application
- Azure App Service (for site extension) or any hosting environment
Documentation
📖 Full Documentation 🔧 Configuration Reference 📊 Architecture Deep Dive
Support
- Issues: GitHub Issues
- Documentation: Salt Security Docs
- Email: support@saltsecurity.com
License
Copyright © 2025 Salt Security, Inc. All rights reserved.
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without express written permission from Salt Security, Inc.
See LICENSE file for details.
Version
Current version: 1.1.1
See Release Notes for version history.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
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 |
|---|
v1.2.5 - MAJOR STRUCTURAL IMPROVEMENTS: Redesigned NuGet package structure following Microsoft Azure Site Extension best practices analyzed from production Microsoft.AspNetCore.AzureAppServices.SiteExtension. Simplified single-framework approach (.NET 8.0 LTS) eliminates duplicate files and complex runtime detection. Fixed XDT transform to use app-pool-wide environment variables with standard system.webServer/runtime/environmentVariables pattern (removed problematic site-specific location targeting). Added scmApplicationHost.xdt to prevent extension activation in Kudu/SCM build processes. Uses safer InsertIfMissing XDT transforms instead of Remove+Insert pattern. Removed PowerShell framework detection for more reliable, maintenance-free installation. Clean, production-ready package structure optimized for Azure App Services deployment.