dtp-tripwire-agent
v1.0.7
Published
A service for protecting your node against malicious attacks and scans.
Maintainers
Keywords
Readme
DTP Tripwire
🛡️ Your Web Server's First Line of Defense
Tripwire monitors and blocks malicious HTTP/HTTPS requests before they can cause harm to your web server. It acts as a protective shield against various attack vectors, including protocol confusion attacks, malformed requests, and scanning attempts.
Key Features:
- Intelligent Detection: Uses pattern recognition and anomaly detection to identify suspicious traffic.
- Customizable Rules: Define your own protection policies based on specific threats you want to block.
- Real-time Blocking: Immediate action against detected threats without compromising legitimate traffic.
- Flexible Integration: Works seamlessly with popular web servers like NGINX, Apache, etc.
- Detailed Reporting: Comprehensive logs and analytics for security monitoring and compliance.
Use Cases:
- Protecting APIs from malicious requests
- Securing web applications against protocol abuse
- Blocking scanning attempts by automated tools
- Preventing tunneling attacks via HTTP/HTTPS
- Adding an extra layer of security to existing defenses
Getting Started:
- Install Tripwire:
npm install dtp-tripwireConfiguration
It is important to let the configuration download from tripwire.digitaltelepresence.com before binding your ExpressJS app to a listen socket to accept new connections and reqeusts. The service middleware will block all incoming requests if the configuration isn't loaded.
import tripwire "dtp-tripwire";
// Load Tripwire Configuration from tripwire.digitaltelepresence.com
await tripwire.loadConfig();
app.use(tripwire.middleware());
// Bind your ExpressJS app to a listen socket to accept new connections and requests
app.listen(3000);Configurations (when received successfully) are always valid, always provide protection, and will always be locally cached on disk. This enables Tripwire to provide protective services even when it can't fetch an updated configuration data from the Tripwire API.
Tripwire will continuously try to download updated configurations as part of normal operation at runtime. When it fetches any successful configuration, it will automatically also update the local cache on disk.
Environment Configuration
Tripwire makes use of environment variables to configure its behavior. These can be set in a .env file or passed directly to NodeJS when running your application.
| Variable | Description |
| -------------------------- | ----------------------------------------------------------------------------------- |
| TRIPWIRE_API_URL | The URL (string) of the API to use for fetching configurations and reporting events |
| TRIPWIRE_API_CLIENT_ID | Your assigned Client ID (string) from the API |
| TRIPWIRE_API_CLIENT_SECRET | Your assigned Client Secret (string) from the API |
| TRIPWIRE_N8N_AUTH_TOKEN | Your assigned N8N Auth Token (string) from the API |
| TRIPWIRE_N8N_EVENT_URL | The URL (string) of the N8N Webhook for reporting events |
| TRIPWIRE_N8N_ERROR_URL | The URL (string) of the N8N Webhook for reporting errors |
| TRIPWIRE_LOG | Set to enabled or disabled to enable or disable logging to the console |
| TRIPWIRE_LOG_DEBUG | Set to enabled or disabled to enable or disable detailed debug logs |
| TRIPWIRE_LOG_INFO | Set to enabled or disabled to enable or disable info level logs |
| TRIPWIRE_LOG_WARN | Set to enabled or disabled to enable or disable warning level logs |
