Graylog2 / Graylog2/graylog2-server

Allow adding basic authentication to data adapter in URL

Open
#5,282 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

Adding basic authentication credentials to the URL of an HTTP JSONPath data adapter does not work as expected, as the username and password are ignored used in the URL and no `Authorization` header is generated from them.

This means that to use basic authentication, the user must calculate the `Authorization` header manually and set it up in the HTTP headers.

## Expected Behaviour
Using a URL with credentials in it should generate the `Authorization` header.

## Current Behaviour
Using a URL with credentials does not generate an `Authorization` header.

## Steps to Reproduce (for bugs)
1. Create HTTP JSONPath data adapter
2. Add a URL with basic authentication credentials, e.g. `https://username:password@myserver.com?key=${key}`
3. Testing the data adapter fails with a 401 error, no information is retrieved from the endpoint

## Your Environment
* Graylog Version: 2.4.6, 3.0.0-alpha.4-SNAPSHOT

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.