Skip to content

in_splunk with http2 enabled fails to accept correct token #10483

@lecaros

Description

@lecaros

Bug Report

Describe the bug

When HTTP/2 is enabled, Fluent Bit may fail to accept a correct token under certain circumstances.

The authentication will wrongly return unauthorized if the following conditions are met.

  • in_splunk has more than one token (splunk_token: 'token,anotherToken')
  • The token sent in the header matches one other than the first one on the list.
  • The size of the first token is different than the one sent.

The exact same configuration works if http2 is disabled ( http2: false )

To Reproduce

This can be reproduced by running two instances of Fluent Bit

  • Steps to reproduce the problem:
fluent-bit.yml
pipeline:
  inputs:
    - name: splunk
      http2: true
      port: '7443'
      splunk_token: 'token,anotherToken'
      splunk_token_key: SPLUNK_HEC_TOKEN
      store_token_in_metadata: false
  outputs:
    - name: stdout
      match: '*'
sender.yml
pipeline:
  inputs:
    - name: dummy
  outputs:
    - name: splunk
      host: localhost
      port: 7443
      splunk_token: anotherToken

Expected behavior
in_splunk must correctly authenticate if any of the allowed tokens are sent

Your Environment

  • Version used: latest from master (version=4.0.4, commit=067c0642fe)
  • Filters and plugins: in_splunk

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions