Configure application-layer authentication

Configure application-layer authentication that adds an exchange to Splunk-to-Splunk (S2S) connections between forwarders and indexers.

Application-layer authentication adds an exchange to Splunk-to-Splunk (S2S) connections between a forwarder and an indexer. The exchange runs at the application layer, above Transport Layer Security (TLS). For more information, see Application-layer authentication for forwarders and indexers.

Note: The exchange doesn't authenticate peer identity or prove software authenticity. TLS certificate validation remains the method for authenticating the identity of a forwarder or indexer.

If the data source doesn't run Splunk software, use HTTP Event Collector (HEC) to send data to Splunk Cloud Platform. Application-layer authentication doesn't affect HEC.

For Splunk Cloud Platform, set the authentication mode on the forwarders that send data to your deployment. Splunk Cloud Platform manages the receiving indexers.

Configure application-layer authentication on forwarders

Application-layer authentication is supported on universal forwarders running on the following operating systems:
  • Linux on x86_64 or ARM64
  • 64-bit Windows
  • macOS on Apple silicon
Note: Application-layer authentication isn't supported on universal forwarders running on AIX, Solaris on SPARC or x86_64, FreeBSD, Linux on s390x or ppc64le, or 32-bit Windows.

You can set one mode for all target groups on a forwarder, or set a different mode for a specific target group. Follow these steps:

  1. On the forwarder, open outputs.conf. To set the mode for all target groups, use the [tcpout] stanza. To set a different mode for one group, use the [tcpout:<group>] stanza.
  2. Set s2sAuthMode to one of the modes in the table:
    Mode (value) Description
    audit Default. Use audit to log handshake failures while continuing to forward data after a rejection or timeout.
    auto The forwarder requires a successful handshake if the indexer indicates during connection setup that it supports the handshake. If the indexer doesn't indicate support, the forwarder proceeds without a handshake. The forwarder closes the connection after a rejection or timeout.
    disabled The forwarder doesn't indicate during connection setup that it supports the handshake, and it doesn't perform the handshake. A receiver in strict mode rejects the connection.
    strict
    The forwarder requires a successful handshake. It closes the connection if any of the following occurs:
    • The peer doesn't indicate during connection setup that it supports the handshake.
    • The peer rejects the proof.
    • The peer doesn’t report an outcome before the timeout expires.
    Note: If you set s2sAuthMode to a value other than disabled, audit, auto, or strict, the forwarder uses disabled and logs a warning.
    CODE
    # Configure the default mode for all target groups on a forwarder.
    [tcpout]
    s2sAuthMode = audit
    
    # Configure the strict mode for a target group to override the default mode for that group.
    [tcpout:your_group]
    s2sAuthMode = strict
  3. Reload the configuration for the change to take effect.
    You don't need to restart the forwarder.

The forwarder uses the configured authentication mode for new S2S connections.

Troubleshoot application-layer authentication

Restore forwarding when an application-layer authentication handshake causes a forwarder to close its connection to an indexer.

A forwarder stops forwarding after you set s2sAuthMode to auto or strict.

In auto and strict modes, the forwarder closes a connection if the handshake is rejected or times out. When the indexer indicates during connection setup that it supports the handshake, the forwarder holds event data until the indexer reports an outcome. The forwarder waits for the number of seconds specified by s2sAuthHandshakeTimeout in outputs.conf, which defaults to 30 seconds. An unresponsive indexer can delay a new connection by up to this value.

  1. In the applicable [tcpout] or [tcpout:<group>] stanza in outputs.conf, set s2sAuthMode to audit.
  2. Reload the forwarder's configuration.

    The forwarder gracefully closes its existing connections and reconnects in audit mode. Events already sent complete their acknowledgment on the old connections. In audit mode, the forwarder logs a handshake timeout and continues forwarding.