We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logstash 7.6.2 Plugin version logstash-filter-http (1.0.2)
The http filter is not interpolating the variables for the parameters username / password.
http
username
password
input { exec { command => 'echo "myusername mypassword something else as message"' interval => 30 } } filter { grok { match => { "message" => "(?<username>.*?) (?<password>.*?) %{GREEDYDATA:message}" } overwrite => [ "message" ] } http { url => "https://postman-echo.com/post" verb => "POST" body_format => text body => "%{[message]}" headers => { "mytest" => "logstash" } user => "%{[username]}" password => "%{[password]}" } } output { stdout { codec => rubydebug } }
The header should contain Basic bXl1c2VybmFtZTpteXBhc3N3b3Jk
Basic bXl1c2VybmFtZTpteXBhc3N3b3Jk
The header contains Basic JXtbdXNlcm5hbWVdfTole1twYXNzd29yZF19 (represents %{[username]}:%{[password]}).
Basic JXtbdXNlcm5hbWVdfTole1twYXNzd29yZF19
%{[username]}:%{[password]}
ruby { init => "require 'base64'" code => "event.set('auth_header', 'Basic ' + Base64.strict_encode64(event.get('username')+':'+event.get('password')))" } http { url => "https://postman-echo.com/post" verb => "POST" body_format => text body => "%{[message]}" headers => { "authorization" => "%{[auth_header]}" "mytest" => "logstash" } remove_field => [ "auth_header"] }
From https://discuss.elastic.co/t/http-filter-plugin-authorization-as-parameter-values/232085/6
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Logstash 7.6.2
Plugin version logstash-filter-http (1.0.2)
Summary
The
http
filter is not interpolating the variables for the parametersusername
/password
.How to reproduce
Expected
The header should contain
Basic bXl1c2VybmFtZTpteXBhc3N3b3Jk
Output
The header contains
Basic JXtbdXNlcm5hbWVdfTole1twYXNzd29yZF19
(represents%{[username]}:%{[password]}
).Workaround
From https://discuss.elastic.co/t/http-filter-plugin-authorization-as-parameter-values/232085/6
The text was updated successfully, but these errors were encountered: