Skip to content

Added Secondary token support for Raw Http input#25544

Open
Nithin-Kasam wants to merge 3 commits intomasterfrom
issue-13702
Open

Added Secondary token support for Raw Http input#25544
Nithin-Kasam wants to merge 3 commits intomasterfrom
issue-13702

Conversation

@Nithin-Kasam
Copy link
Copy Markdown
Collaborator

Description

This change introduces support for a secondary token in Raw HTTP input. It allows users to include an additional authentication token alongside the primary token when making HTTP requests.

The implementation ensures that both tokens are properly parsed and handled without affecting existing workflows. Backward compatibility is maintained for users who rely on a single token.

Motivation and Context

Previously, when the token is invalid the user needs to update to new token ,But now user can specify additional token such that when first token is invalid it will use the second token and process the request.

closes https://github.com/Graylog2/graylog-plugin-enterprise/issues/13702

How Has This Been Tested?

Configured input with both tokens token1 and token2 and sent request using curl,
curl -X POST http://localhost:5555/raw \n -H "Content-Type: application/json" \n -H "Authorization: Bearer old-token" \n -d '{"version":"1.1","host":"test","short_message":"primary token test"}'
curl -X POST http://localhost:5555/raw \n -H "Content-Type: application/json" \n -H "Authorization: Bearer new-token" \n -d '{"version":"1.1","host":"test","short_message":"secondary token test"}'
curl -X POST http://localhost:5555/raw \n -H "Content-Type: application/json" \n -H "Authorization: Bearer new-token" \n -d '{"version":"1.1","host":"test","short_message":"secondary token test 2 by deleting old token"}'

verfied the logs in Graylog dashboard.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@Nithin-Kasam Nithin-Kasam requested a review from a team April 2, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant