wulf-pulse/docs
root a093f8787c feat: add IP address logging to webhooks for whitelisting
Implements comprehensive IP logging for webhook requests to enable
IP whitelisting and security monitoring.

Features:
- Capture source IP from webhook requests (x-forwarded-for, x-real-ip)
- Capture user agent for identification
- Store in webhook_logs table
- New API endpoint: GET /api/webhooks/ips
- View unique IPs with request counts and statistics
- Identify Autotask IPs for whitelisting

Database Changes:
- Added source_ip column (VARCHAR 45) to webhook_logs
- Added user_agent column (TEXT) to webhook_logs
- Added index on source_ip for efficient queries
- Migration 005 for existing installations

API Endpoints:
- GET /api/webhooks/ips?hours=168&entityType=Tickets
  Returns unique IPs with:
  * Request counts (total, successful, failed)
  * First/last seen timestamps
  * Entity types accessed
  * User agent strings

Use Cases:
1. Identify Autotask webhook IPs
2. Configure IP whitelist in nginx/Pangolin/Cloudflare
3. Monitor for unauthorized webhook attempts
4. Audit webhook sources
5. Detect IP changes from Autotask

Security Benefits:
- Enable IP whitelisting for webhook endpoint
- Block unauthorized webhook attempts
- Monitor for suspicious activity
- Audit trail of webhook sources

Documentation:
- Complete IP whitelisting guide (WEBHOOK_IP_WHITELISTING.md)
- Configuration examples for nginx, Pangolin, Cloudflare
- Monitoring queries and best practices
- Troubleshooting guide

Files Modified:
- migrations/004_webhook_support.sql - Added IP columns
- migrations/005_add_webhook_ip_logging.sql - Migration for existing installs
- lib/types/webhook.ts - Added IP fields to WebhookLog
- lib/services/webhook-service.ts - Capture and log IPs
- app/api/webhooks/autotask/route.ts - Extract IP from headers
- app/api/webhooks/ips/route.ts - New IP viewing endpoint
- docs/WEBHOOK_IP_WHITELISTING.md - Complete guide

Next Steps:
1. Run migration (004 for new, 005 for existing)
2. Deploy updated code
3. Receive webhooks from Autotask
4. View IPs via /api/webhooks/ips
5. Configure IP whitelist in proxy/tunnel
2026-01-24 17:28:56 -05:00
..
fixes Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
addigy-mapping-implementation.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
AUVIK_TENANT_MAPPING.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
AUVIK_TESTING_GUIDE.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
CHUNKED_SYNC_IMPLEMENTATION.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
configuration-item-goals.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
datto-rmm-device-example.json Add Datto RMM device API documentation 2025-12-04 23:16:01 -05:00
datto-rmm-device-schema.json Add Datto RMM device API documentation 2025-12-04 23:16:01 -05:00
DATTO_RMM_DEVICE_API.md Add Datto RMM device API documentation 2025-12-04 23:16:01 -05:00
rmm-multi-site-integration.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
SYNC_BEHAVIOR.md docs: add comprehensive sync behavior documentation 2026-01-24 08:43:35 -05:00
SYNC_DATE_FILTER_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
SYNC_INTERFACE_GUIDE.md docs: add comprehensive sync interface user guide 2026-01-23 08:32:11 -05:00
SYNC_LOGGING_IMPROVEMENTS.md feat: implement structured logging for sync operations 2026-01-23 08:02:02 -05:00
SYNC_PROGRESS_TRACKING.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TICKET_SYNC_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_ANALYTICS_IMPLEMENTATION.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_ENRICHMENT.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_SORTING_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRY_FIELD_MAPPING.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
WEBHOOK_IP_WHITELISTING.md feat: add IP address logging to webhooks for whitelisting 2026-01-24 17:28:56 -05:00
WEBHOOK_PANGOLIN_SETUP.md docs: add Pangolin tunnel setup guide for webhook endpoint 2026-01-24 17:18:27 -05:00
WEBHOOK_REVERSE_PROXY.md docs: add reverse proxy configuration guide for webhook endpoint 2026-01-24 17:14:55 -05:00
WEBHOOK_SETUP.md feat: add webhook support for real-time Autotask updates 2026-01-24 10:07:20 -05:00
WEBHOOKS_README.md feat: add webhook support for real-time Autotask updates 2026-01-24 10:07:20 -05:00