Setting up Web Server Log Delivery

RTLD may automatically deliver compressed log data to a web server by submitting HTTPS POST requests to it. The body for each of these requests will be a JSON or CSV document that uniquely identifies a set of log data and describes one or more log entries.

Learn more: RTLD CDN | RTLD Rate Limiting | RTLD WAF

RTLD applies gzip compression to log data. Each HTTPS POST request includes a Content-Encoding header set to gzip.

To create a log delivery profile

  1. Configure your web server(s) to:

    • Support the HTTPS protocol.

      Log delivery requires a certificate whose trust anchor is a publicly trusted certificate authority (CA). Additionally, the certificate must include a chain of trust for all intermediate certificate(s) and a leaf certificate.

    • Allow HTTPS POST requests.
    • Return a 2xx response (e.g., 200 OK) whenever data is successfully received.

      If your web server responds with any other status code, then our service will retransmit the same log data at regular intervals. This may result in the delivery of duplicate log data.

  2. Configure your firewall to allow POST requests from the following IP blocks:

    198.7.21.0/24

    If you plan to deliver log data via a custom port, then you should also configure your firewall to allow requests on that port.

  3. Set up a workflow for handling or processing the log data that will be posted to your web server(s).

    Example:

    Create a listener for HTTPS POST requests that mines specific data from log entries.

  4. Navigate to the Real-Time Log Delivery CDN | Rate Limiting | WAF page. From the main menu, navigate to More and then find Real-Time Log Delivery under Analytics. Select either CDN, WAF, or RL.

  5. Click Add Profile.
  6. From the Log Delivery Method option, select HTTP Post.
  7. Set the Request URL option to a URL that may leverage the workflow defined in step 3. This URL must use the HTTPS protocol.

    Specify a custom port to deliver log data over that port instead of 443.

    Sample URL:

    https://logs.mydomain.com/cdn/logs.aspx
  8. From the Authentication option, select one of the following modes:

    • Custom Authentication: Select this mode when your web server(s) expects the Authorization request header to be set to a custom token value. Set the Token option to a value that will authorize requests to your web server(s).

      Log data will be posted to your web server(s) via HTTPS POST requests with an Authorization request header set to the specified value.

      Authorization header syntax:

      Authorization: Token
    • HTTP Basic: Select this mode if your web server(s) allow content to be uploaded via standard HTTP basic authentication. Set the desired credentials via the Username and Password options.

      Base-64 encoding will applied to the specified credentials. After which, the encoded value will be passed via the Authorization header.

      Authorization header syntax:

      Authorization: Basic Base64-Encoded-Credentials
    • None: Select this mode if your web server(s) allow content to be posted without authorization.
  9. From the Log Format option, select whether to format log data using our standard JSON format, as a JSON array, as JSON lines, or as a CSV (RTLD CDN only).

    Learn more: RTLD CDN | RTLD Rate Limiting | RTLD WAF

  10. From the Downsample the Logs option, determine whether all or downsampledReduces the amount of log data that will be delivered. For example, you may choose to only deliver 1% of your log data. log data will be delivered.

    • All Log Data: Verify that the Downsample the Logs option is disabled.
    • Downsampled Log Data: Downsample logs to 0.1%, 1%, 25%, 50%, or 75% of total log data by enabling the Downsample the Logs option and then selecting the desired rate from the Downsampling Rate option.

      Use this capability to reduce the amount of data that needs to be processed or stored within your web server(s).
      RTLD CDN Only: Downsampling log data also reduces usage charges for this service.

  11. Log delivery setup varies according to whether you are delivering log data for CDN traffic, threats identified by WAF, or rate limited requests.

  12. Set the Log Delivery Enabled option to the "on" position.

  13. Click Save.
More Information