SaltSecurity.IIS.AzureAppServiceCollector
1.1.2
See the version list below for details.
dotnet add package SaltSecurity.IIS.AzureAppServiceCollector --version 1.1.2
NuGet\Install-Package SaltSecurity.IIS.AzureAppServiceCollector -Version 1.1.2
<PackageReference Include="SaltSecurity.IIS.AzureAppServiceCollector" Version="1.1.2" />
<PackageVersion Include="SaltSecurity.IIS.AzureAppServiceCollector" Version="1.1.2" />
<PackageReference Include="SaltSecurity.IIS.AzureAppServiceCollector" />
paket add SaltSecurity.IIS.AzureAppServiceCollector --version 1.1.2
#r "nuget: SaltSecurity.IIS.AzureAppServiceCollector, 1.1.2"
#:package SaltSecurity.IIS.AzureAppServiceCollector@1.1.2
#addin nuget:?package=SaltSecurity.IIS.AzureAppServiceCollector&version=1.1.2
#tool nuget:?package=SaltSecurity.IIS.AzureAppServiceCollector&version=1.1.2
Salt Security Azure App Service Collector
Automatic HTTP traffic collection middleware for Azure App Services - Zero code changes required for comprehensive API security monitoring.
Overview
Salt Security Azure App Service Collector is a site extension that automatically captures HTTP request/response traffic from your ASP.NET Core applications running on Azure App Services. It uses ASP.NET Core's IHostingStartup pattern to inject middleware without requiring any code modifications to your application.
Key Features
- Zero Code Changes - Automatically injects into ASP.NET Core applications via Hosting Startup
- Complete Traffic Capture - Records full HTTP requests and responses including:
- Headers and query parameters
- Request and response bodies
- Status codes and timing information
- Client IP addresses
- Multi-Framework Support - Compatible with .NET 6.0, 7.0, 8.0, 9.0, and 10.0
- Salt API Integration - Sends data in real-time to Salt Security API for comprehensive security analysis
- Non-Blocking Design - Fire-and-forget pattern ensures zero impact on application performance
- Fail-Safe Architecture - Critical exception handling prevents middleware failures from affecting your application
- Coexistence Ready - Works alongside APM tools like Datadog, New Relic, and Application Insights
Installation
Option 1: Azure Portal (Site Extensions)
- Navigate to your App Service in Azure Portal
- Go to Development Tools → Extensions
- Click + Add
- Search for "Salt Security" and install the extension
- Add the App Settings in Configuration: the three
SALT_*settings, and any of the three hosting-startup settings that the App Service doesn't already have - Restart your App Service
To remove it, see Removing the Marketplace extension.
Option 2: Manual Deployment via Kudu
- Download the NuGet package
- Extract the package contents
- Upload to Kudu Console at:
C:\home\SiteExtensions\SaltSecurity.IISAzureAppServiceCollector\{version}\ - Restart your App Service
Option 3: Offline package (no NuGet access from the App Service)
Download salt-core-collector-offline-<version>.zip from the GitHub Release and follow CORE_OFFLINE_INSTALL.md inside it (source: offline/CORE_OFFLINE_INSTALL.md).
Moving from the classic collector or an older install
If the App Service already has Salt pieces (the classic IIS collector, a SaltSecurityHttpModule line in a web.config, an earlier offline install, or another Marketplace install), follow offline/MIGRATION_RUNBOOK.md before installing with either option above. It removes them in the right order; it also ships inside the offline zip. The classic and Core collectors share App Setting names, so removing one after installing the other silently disables it.
Option 4: Direct Package Reference (Advanced)
For local development or custom deployment scenarios:
dotnet add package SaltSecurity.IISAzureAppServiceCollector
Configuration
Hosting-startup settings
These three settings load the collector. Other agents (Application Insights, or a customer's own hosting startup) can use them too, so each is a ;-separated list and Salt only adds or removes its own item.
The extension's applicationHost.xdt adds Salt's item itself and keeps the App Setting's value in front of it. An App Setting with each name must exist; if one is missing, the extension still works but every app start logs a misleading Hosting startup assembly exception.
- Marketplace install: add any of the three that the App Service doesn't already have, with Salt's value below. Leave a setting that already has a value as it is.
- Offline install: the installer sets them, appending Salt's item to an existing value. For the manual offline install, see
CORE_OFFLINE_INSTALL.md.
| Setting | Salt's value (Marketplace install) |
|---|---|
ASPNETCORE_HOSTINGSTARTUPASSEMBLIES |
SaltSecurityCollectorExtension |
DOTNET_ADDITIONAL_DEPS |
C:\home\SiteExtensions\SaltSecurity.IIS.AzureAppServiceCollector\additionalDeps |
DOTNET_SHARED_STORE |
C:\home\SiteExtensions\SaltSecurity.IIS.AzureAppServiceCollector\store |
Salt API Integration Configuration
To send traffic data to Salt Security API for real-time security analysis:
SALT_API_ENDPOINT=https://hybrid-us.salttesting.click/api/v1/http/exchange
SALT_AUTH_TOKEN=your-authentication-token
SALT_UUID=your-unique-identifier
Add these in Azure Portal:
- App Service → Configuration → Application Settings
- Click + New application setting
- Add each variable and click Save
- Restart your App Service
Removing the Marketplace extension
- Extensions → select the Salt Security extension → Delete
- In Configuration → Application Settings, delete the
SALT_*settings, and delete each hosting-startup setting that holds only Salt's value (the ones added for Salt). Leave a setting that holds another agent's value. - Restart your App Service
- In Kudu, check
C:\home\SiteExtensions\: ifSaltSecurity.IIS.AzureAppServiceCollectoris still there (Azure can't delete files a running .NET Core 3.1 app has loaded), delete it now
If a hosting-startup setting still names Salt after the extension is gone, every app start logs a misleading Hosting startup assembly exception.
How It Works
Architecture
Azure App Service Start
↓
ASP.NET Core Runtime loads IHostingStartup
↓
SaltSecurityCollectorExtension auto-injects
↓
Middleware captures HTTP traffic (non-blocking)
↓
Salt API Integration
(Real-time Analysis)
What Gets Captured
Request Data:
- HTTP method (GET, POST, PUT, DELETE, etc.)
- Full URI including query parameters
- All headers (with sensitive data redaction)
- Request body content
- Client IP address
- Timestamp with millisecond precision
Response Data:
- Status code (200, 404, 500, etc.)
- All response headers
- Response body content
- Processing duration
Special Handling for Different Connection Types:
- Standard HTTP Requests: Full headers and body captured
- Streaming/SSE (Server-Sent Events): Headers only, body excluded to avoid memory issues
- WebSocket Connections: Completely skipped - no headers or body captured (WebSocket upgrade requests are not processed)
What is NOT Captured:
- WebSocket frame data and messages
- Streaming response bodies (SSE, chunked transfer encoding)
- Static file responses may be handled differently based on configuration
- Health check endpoints can be filtered (if configured)
Security Features
- Sensitive Data Redaction - Authorization headers and tokens are automatically masked
- Fail-Safe Design - Middleware exceptions never impact your application
- Async Processing - Traffic data transmission happens in background threads
- Configurable Disable - Can be turned off instantly via environment variable
Compatibility
Supported Frameworks
- .NET Core 3.1 (LTS - End of support: December 2022)
- .NET 6.0 (LTS - End of support: November 2024)
- .NET 7.0 (STS - End of support: May 2024)
- .NET 8.0 (LTS - Active)
- .NET 9.0 (STS - Active)
- .NET 10.0 (Latest)
Platform Support
- Azure App Services (Windows)
- IIS virtual applications: every ASP.NET Core virtual application of the App Service is covered by the same installation, and its traffic is reported with the virtual application's path prefix (for example
/person/api/...) - Azure App Services (Linux) - Experimental
- Local development environments
Compatible with APM Tools
- Datadog APM
- New Relic
- Application Insights
- Any middleware-based monitoring tools
Troubleshooting
Extension Not Activating
- Check environment variables:
# In Kudu Console (https://yourapp.scm.azurewebsites.net)
echo %ASPNETCORE_HOSTINGSTARTUPASSEMBLIES%
- Verify installation path:
dir C:\home\SiteExtensions\SaltSecurity.IISAzureAppServiceCollector
- Check application logs:
type C:\home\LogFiles\Application\*.txt | findstr "SaltSecurity"
No Data Being Sent to Salt API
- Verify Salt API configuration:
echo %SALT_API_ENDPOINT%
echo %SALT_AUTH_TOKEN%
echo %SALT_UUID%
- Verify extension is enabled:
echo %SALTSECURITY_ENABLED%
# Should return "true" or nothing (defaults to true)
- Review application logs for middleware initialization and API connection messages
Performance Impact
The extension is designed for zero blocking impact:
- All traffic data transmission is async (fire-and-forget)
- Exceptions are caught and never propagate
- HTTP API calls use background tasks with timeouts
- No synchronous I/O blocking
If you experience issues, temporarily disable:
SALTSECURITY_ENABLED=false
Development
Building from Source
# Clone the repository
git clone https://github.com/saltsecurity/azure-app-service-collector.git
cd azure-app-service-collector/SaltSecurityCollectorExtension
# Build for all target frameworks
dotnet build --configuration Release
# Create NuGet package
powershell -ExecutionPolicy Bypass -File build-nuget.ps1
Local Testing
# Set environment variables
$env:ASPNETCORE_HOSTINGSTARTUPASSEMBLIES = "SaltSecurityCollectorExtension"
$env:DOTNET_ADDITIONAL_DEPS = "path\to\additionalDeps"
$env:DOTNET_SHARED_STORE = "path\to\store"
# Run your ASP.NET Core app
dotnet run
Support
- Documentation: Salt Security Docs
- Issues: GitHub Issues
- Email: support@saltsecurity.com
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
See RELEASE_NOTES.md for version history and updates.
Made with ❤️ by Salt Security
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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 Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- No dependencies.
-
net10.0
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
-
net6.0
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 6.0.0)
- Microsoft.Extensions.Http (>= 6.0.0)
-
net7.0
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
-
net8.0
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
-
net9.0
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.1.1: keeps values other agents (for example a customer's own hosting startup) set in ASPNETCORE_HOSTINGSTARTUPASSEMBLIES, DOTNET_ADDITIONAL_DEPS and DOTNET_SHARED_STORE; Marketplace installs add any missing one of these App Settings (see the README). v1.1.0: .NET Core 3.1 support; virtual-app path prefix in captured URIs. See RELEASE_NOTES.md for complete details.