Application-layer authentication between forwarders and indexers

Application-layer authentication adds a handshake to each Splunk-to-Splunk connection between a forwarder and an indexer. Review handshake outcomes in logs and metrics.

Application-layer authentication adds a handshake to each Splunk-to-Splunk (S2S) connection between a forwarder and an indexer. The handshake runs at the application layer, above Transport Layer Security (TLS). Splunk software records an outcome for each handshake in logs and metrics.

Note: The exchange doesn't authenticate peer identity or prove software authenticity. Use TLS certificate validation to authenticate the identity of a forwarder or indexer.

You configure application-layer authentication on forwarders only. Splunk software manages the receiving indexers.

By default, application-layer authentication operates in audit mode. No additional configuration is required to use this mode. In audit mode, Splunk software logs handshake failures while allowing the forwarder to continue forwarding after a rejection or timeout. For more information about the modes, see Configure application-layer authentication on forwarders.

Benefits of application-layer authentication

Application-layer authentication provides the following benefits:

  • Connection-specific outcomes - Each forwarder-to-indexer connection has a separate handshake outcome.

  • Auditability and monitoring - Administrators can use recorded authentication outcomes and metrics to monitor authentication across S2S connections.

How application-layer authentication works

Each forwarder-to-indexer connection performs an independent authentication exchange. This includes new connections that a forwarder establishes when automatically load balancing data across receivers.

During connection establishment, the forwarder and indexer exchange random values and derive a session key from embedded keying material.

The authentication exchange is bound to the negotiated TLS session so that authentication is specific to that connection. Splunk software uses exported keying material (EKM) to bind the exchange to the TLS session. The RFC 5705 standard defines a TLS exporter mechanism that lets both sides derive the same EKM from the TLS connection for use by the application-layer authentication exchange.

When the indexer indicates during connection setup that it supports the handshake, the forwarder holds event data until the indexer reports an outcome or the timeout specified by s2sAuthHandshakeTimeout in outputs.conf expires. This setting specifies how long the forwarder waits for the handshake outcome. The default is 30 seconds. An unresponsive indexer can delay a new connection by up to this value.

Security assurance and monitoring

Splunk software logs S2S authentication outcomes and metrics on both indexers and forwarders so that administrators can monitor authentication exchanges without exposing sensitive keying material.

The authentication outcome for each forwarder-to-indexer connection indicates whether the application-layer authentication exchange completed successfully. Splunk software records these outcomes on both sides of the connection to internal logs.

On the indexer, authentication outcomes are logged by the TcpInputProc component. On the forwarder, authentication outcomes are logged by the AutoLoadBalancedConnectionStrategy component.

Log entries provide information about the authentication exchange, including authentication outcomes and, depending on the event, details such as the receiving host, authentication mode, and negotiated protocol version. Some information, including failure reasons, can appear as prose in the log message rather than as structured fields.

Note: Sensitive authentication data, including keying material, derived keys, and proof values, isn't written to logs. The logs contain only metadata about the authentication exchange.

Splunk software records S2S authentication metrics in metrics.log under group=s2s_auth. Administrators can use these metrics to track authentication handshake success rates and identify connections that haven't completed the authentication exchange.

Verify the authentication exchange

Verify application-layer authentication by checking S2S log messages and metrics.

To verify that the authentication exchange completes successfully, review the S2S authentication metrics in metrics.log.

In a healthy deployment where all applicable authentication exchanges succeed, s2s_auth.handshake_success is greater than zero and handshake_success_rate is 100%.

To investigate individual connections, review the application-layer authentication log messages. The following table describes the possible authentication outcomes and their corresponding log messages. For more information about authentication modes, see Configure application-layer authentication on forwarders.

Note: Debug-level messages appear only when debug logging is turned on for the relevant component. For information on how to turn on debug logging, see Enable debug logging.
Outcome Message What it means
Successful authentication S2S auth validated src=<source> mode=<authMode> ...

The authentication exchange completed successfully.

This is a debug-level message.

Forwarder doesn't support application-layer authentication (audit mode)

Forwarder did not advertise S2S auth support

The forwarder didn't support application-layer authentication.

This is a debug-level message.

This message is expected if the forwarder runs a lower Splunk software version or runs on AIX, Solaris, FreeBSD, Linux on s390x or ppc64le, or 32-bit Windows. It doesn't indicate a fault. See Prerequisites in Configure application-layer authentication on forwarders .

Forwarder doesn't support application-layer authentication (strict mode)

S2S auth strict: forwarder did not advertise S2S auth before the handshake timeout

The forwarder didn't support application-layer authentication before handshake timeout. In strict mode, the forwarder closes the connection.

Indexer doesn't support application-layer authentication S2S auth: indexer did not advertise support

The indexer didn't support application-layer authentication.

Authentication exchange failed (audit mode) S2S auth failure, continuing src=<source> reason=<reason> mode=<mode> <handshake-fields...>

The authentication exchange failed. In audit mode, Splunk software logs the failure and continues forwarding data.

Authentication exchange failed (auto or strict modes)

S2S auth failure src=<source> reason=<reason> mode=<mode> <handshake-fields...>

Example reason: reason="client proof verification failed"

The authentication exchange failed. In auto and strict modes, the forwarder closes the connection.

Indexer authentication proof verification failed (audit mode) S2S auth: handshake failed, continuing idxHost=<ip> reason=indexer proof verification failed mode=<mode> <handshake>

The forwarder couldn't validate the authentication proof received from the indexer. In audit mode, the forwarder logs a warning and continues forwarding data.

Indexer authentication proof verification failed (auto and strict modes) S2S auth: handshake failed idxHost=<ip> reason=indexer proof verification failed mode=<mode> <handshake>

The forwarder couldn't validate the authentication proof received from the indexer. In strict and auto modes, the forwarder logs an error and closes the connection.

Search for outcomes of application-layer authentication

Use these searches to review application-layer authentication events, summarize S2S handshake outcomes, and monitor S2S authentication fleet metrics.

You can use the following searches to review application-layer authentication outcomes and metrics.

Objective Search syntax

Find application-layer authentication events logged by the TcpInputProc component on indexers.

CODE
index=_internal sourcetype=splunkd component=TcpInputProc "S2S auth"

Find application-layer authentication events logged by the AutoLoadBalancedConnectionStrategy component on forwarders.

CODE
index=_internal sourcetype=splunkd component=AutoLoadBalancedConnectionStrategy "S2S auth"

Summarize S2S authentication handshake attempts, successes, and failure types by host.

CODE
index=_internal sourcetype=splunkd group=s2s_auth
| stats sum(handshake_failure) as handshake_failure,
        sum(invalid_proof) as invalid_proof,
        sum(no_common_epoch) as no_common_epoch,
        sum(handshake_timeout) as handshake_timeout,
        sum(strict_rejection) as strict_rejection,
        sum(downgrade) as downgrade,
        sum(handshake_success) as handshake_success,
        sum(handshake_attempts) as handshake_attempts
  by host

Review S2S authentication metrics across the deployment.

Search results include successful authentication handshakes and authentication-capable connections.

CODE
index=_internal source=*metrics.log group=s2s_auth