SaltSecurity.IIS.AzureAppServiceCollector 1.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package SaltSecurity.IIS.AzureAppServiceCollector --version 1.2.1
                    
NuGet\Install-Package SaltSecurity.IIS.AzureAppServiceCollector -Version 1.2.1
                    
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="SaltSecurity.IIS.AzureAppServiceCollector" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SaltSecurity.IIS.AzureAppServiceCollector" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="SaltSecurity.IIS.AzureAppServiceCollector" />
                    
Project file
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 SaltSecurity.IIS.AzureAppServiceCollector --version 1.2.1
                    
#r "nuget: SaltSecurity.IIS.AzureAppServiceCollector, 1.2.1"
                    
#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 SaltSecurity.IIS.AzureAppServiceCollector@1.2.1
                    
#: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=SaltSecurity.IIS.AzureAppServiceCollector&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=SaltSecurity.IIS.AzureAppServiceCollector&version=1.2.1
                    
Install as a Cake Tool

Salt Security Azure App Service Collector

NuGet License: MIT

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)

  1. Navigate to your App Service in Azure Portal
  2. Go to Development Tools → Extensions
  3. Click + Add
  4. Search for "Salt Security" and install the extension
  5. 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
  6. Restart your App Service

To remove it, see Removing the Marketplace extension.

Option 2: Manual Deployment via Kudu

  1. Download the NuGet package
  2. Extract the package contents
  3. Upload to Kudu Console at: C:\home\SiteExtensions\SaltSecurity.IISAzureAppServiceCollector\{version}\
  4. 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:

  1. App Service → Configuration → Application Settings
  2. Click + New application setting
  3. Add each variable and click Save
  4. Restart your App Service

Self-signed certificate or IP address endpoint. The collector validates the endpoint's TLS certificate. If your Salt Hybrid is reached by IP address or uses a self-signed certificate, the preferred fix is a hostname with a CA-signed certificate (for example a load balancer in front of the Hybrid). Otherwise, on a private network, add:

SALT_TLS_VERIFY=false

Every certificate check (trust, name, expiry) is then skipped for the SALT_API_ENDPOINT host and port. The connection is still encrypted, but the endpoint isn't authenticated: whoever can intercept this connection can read the captured traffic and the Salt token. The customer app's own connections are not affected. While it is set, the startup log shows TLS certificate validation: OFF for <host>:<port> and a warning, also written to the app's logger. SALT_SSL, the classic collector's older name for this setting, also works, with a warning to rename it.

Removing the Marketplace extension

  1. Extensions → select the Salt Security extension → Delete
  2. 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.
  3. Restart your App Service
  4. In Kudu, check C:\home\SiteExtensions\: if SaltSecurity.IIS.AzureAppServiceCollector is 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

  1. Check environment variables:
# In Kudu Console (https://yourapp.scm.azurewebsites.net)
echo %ASPNETCORE_HOSTINGSTARTUPASSEMBLIES%
  1. Verify installation path:
dir C:\home\SiteExtensions\SaltSecurity.IISAzureAppServiceCollector
  1. Check application logs:
type C:\home\LogFiles\Application\*.txt | findstr "SaltSecurity"

No Data Being Sent to Salt API

  1. Verify Salt API configuration:
echo %SALT_API_ENDPOINT%
echo %SALT_AUTH_TOKEN%
echo %SALT_UUID%
  1. Verify extension is enabled:
echo %SALTSECURITY_ENABLED%
# Should return "true" or nothing (defaults to true)
  1. Review application logs for middleware initialization and API connection messages

  2. A send failure such as The SSL connection could not be established is followed by the reason, for example Certificate rejected: RemoteCertificateNameMismatch, RemoteCertificateChainErrors for host 10.0.0.5 (chain: UntrustedRoot). RemoteCertificateNameMismatch means the certificate doesn't list the endpoint's hostname or IP; UntrustedRoot means it is self-signed or from a private CA. See Self-signed certificate or IP address endpoint above.

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

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.2.3 93 11/4/2026
1.2.2 94 11/4/2026
1.2.1 97 11/4/2026
1.2.0 102 11/3/2026
1.1.2 113 10/25/2026
1.1.1 110 10/21/2026
1.1.0 106 10/15/2026
1.0.2 205 5/11/2026
1.0.1 175 1/5/2026
1.0.0 742 12/17/2025

v1.2.0: SALT_TLS_VERIFY=false accepts a self-signed or non-matching certificate (for example an endpoint reached by IP address) for the Salt endpoint only; private networks only. SALT_SSL, the classic collector's older name, also works. TLS send failures log their certificate reason; redirects are no longer followed. v1.1.2: the app's response goes straight to the client while it is copied for Salt, so apps that close the response stream work and are captured; the app runs exactly once per request; streaming responses are no longer buffered. 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.