Security Logging
Connect Gateway provides Security Logging to record security-relevant API failures, including malformed requests, unknown endpoints, authentication and authorization failures, rate limit violations, and server or upstream service errors.
Security events are generated in structured JSON using the Open Cybersecurity Schema Framework (OCSF) 1.9.0, supporting security audits, investigations, and integration with external Security Information and Event Management (SIEM) platforms.
Security logging is separate from the service-level execution logging configured under Gateway Features.
Security Events
Connect Gateway automatically records security-relevant events for the following HTTP response statuses through its built-in security logging middleware. No separate configuration is required to enable logging for individual status codes.
| Event | HTTP Status | Description |
|---|---|---|
| Bad Request | 400 Bad Request | The request cannot be processed because of invalid syntax, malformed input, or request validation failures. |
| Resource Not Found | 404 Not Found | The requested API endpoint or resource cannot be found. Repeated failures may indicate endpoint discovery or scanning attempts. |
| Authentication Failure | 401 Unauthorized | The request cannot be authenticated, such as when credentials are missing, invalid, or expired. |
| Authorization Failure | 403 Forbidden | An authenticated client does not have the required permissions or scopes. |
| Rate Limit Exceeded | 429 Too Many Requests | The client exceeds an applicable rate limit or request quota. |
| Internal Server Error | 500 Internal Server Error | An unexpected server-side failure prevents the request from completing. |
| Not Implemented | 501 Not Implemented | The server does not support the functionality required to fulfill the request. |
| Bad Gateway | 502 Bad Gateway | The gateway receives an invalid response from an upstream service. |
| Service Unavailable | 503 Service Unavailable | The gateway or upstream service is temporarily unable to handle the request. |
| Gateway Timeout | 504 Gateway Timeout | The gateway does not receive a timely response from an upstream service. |
Note: HTTP status codes identify the response outcome; they do not by themselves prove a security incident. A 400 may result from an ordinary client integration error, while a 404 may result from an outdated or incorrect URL. Repeated 400 or 404 responses across a client, IP address, or endpoint can warrant investigation. In particular, 5xx errors are operational failures that can provide valuable context for security investigations. Connect records these response statuses automatically when they pass through the security logging middleware.
Security event records can include:
- Event timestamp, classification, and severity
- HTTP request method and requested URL
- HTTP response status
- Client IP address and user agent, where available
- Correlation identifier for request tracing
- Gateway product, version, and log source information
The fields populated depend on the information available for the request.
OCSF Event Format
Connect uses OCSF version 1.9.0 to standardize security events.
OCSF defines a common structure for security data, allowing events generated by different systems to be processed consistently by security analytics platforms.
Connect uses the API Activity event class (Class UID 6003, Category UID 6) for API security events. Events use Activity ID 99 (Other) and Type UID 600399, with structured HTTP request and response information. The api.operation field identifies the original client-facing HTTP method and upstream path.
The JSON records include event metadata identifying Connect as the originating product, together with request context and the applicable security outcome.
This format supports downstream parsing, filtering, correlation, and analysis without requiring a proprietary Connect log format.
Security Log Storage
Connect writes security events to dedicated JSON log files using Serilog.
- Security events are separated from standard application logs
- Events are stored in a structured format suitable for automated collection
- Log files can be collected by external monitoring agents
- File locations, rotation, and retention are managed through deployment logging configuration
Security log storage and access should be protected according to the organization's security and retention policies.
SIEM Integration
Connect security logs can be collected and forwarded to Security Information and Event Management (SIEM) platforms for centralized monitoring and investigation.
A SIEM platform can ingest the structured JSON records and apply parsing, correlation rules, dashboards, and alerts according to its configuration.
Wazuh Integration
Connect can be integrated with Wazuh using a log collection agent or another supported collection mechanism.
A typical integration follows these steps:
- Generate Events – Connect records security events in dedicated JSON log files.
- Collect Logs – Configure the Wazuh agent to monitor the security log file location.
- Forward Events – The agent sends collected events to the Wazuh manager.
- Parse and Classify – Configure the necessary JSON field mappings and detection rules.
- Monitor and Alert – Use Wazuh to investigate activity and trigger alerts based on configured rules.
With appropriate detection rules, Wazuh can help identify repeated malformed requests (400), attempts to access unknown endpoints (404), authentication failures (401), authorization denials (403), excessive rate-limit responses (429), and unusual patterns of server or upstream errors (5xx) across collected events. These patterns may indicate abuse, service instability, or an incident requiring investigation.
Note: Connect generates security events; alerting, event correlation, and incident detection are performed by the SIEM platform and require appropriate configuration.
Other SIEM Platforms
The structured JSON format can also be ingested by other SIEM or centralized log management solutions.
Integration requirements depend on the destination platform's collection methods, schema mapping, and supported detection capabilities. OCSF formatting does not by itself guarantee native compatibility with every SIEM.
Security Auditing and Compliance
Security logging provides records that can support:
- Investigation of unauthorized API access attempts
- Review of malformed requests, unknown endpoints, authentication failures, and authorization failures
- Correlation of related requests across systems
- Security audits and incident investigations
- Centralized monitoring through external security platforms
The organization remains responsible for configuring appropriate log retention, access restrictions, integrity protection, and monitoring procedures.
Best Practices
- Collect security logs centrally for monitoring and investigation.
- Restrict access to security log files and collected events.
- Configure log retention in line with organizational and regulatory requirements.
- Use correlation identifiers to connect related gateway and application activity.
- Configure and validate SIEM detection rules before relying on security alerts.
- Monitor log collection health to detect gaps in event ingestion.
- Avoid recording credentials, tokens, or sensitive request payloads in security events.
- Treat individual 400 and 404 responses as low-priority signals unless correlated with suspicious activity.
Summary
Security Logging in Connect provides standardized records of API request failures—including 400, 401, 403, 404, 429, and relevant 5xx responses—using OCSF 1.9.0 and the API Activity event class.
These events can be collected by SIEM platforms such as Wazuh to support centralized security monitoring, incident investigation, and auditing.