elastic / elastic/logstash

Elasticsearch credentials with special character not accepted in modules

Open
#7,952 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
1d 4h
Merged PRs (30d)
88

Description

I have an ES and Kibana instance whose password has `$` char in it. Some thing like `$foobar`. When I use this with modules, I get a configuration error.

```sh
bin/logstash --modules netflow -M "netflow.var.elasticsearch.password=$foobar" -M "netflow.var.kibana.password=$foobar" -M "netflow.var.kibana.username=elastic"
```

```sh
An unexpected error occurred! {:error=>#, :backtrace=>["/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/modules/cli_parser.rb:41:in `get_kv'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/modules/cli_parser.rb:61:in `parse_vars'", "org/jruby/RubyArray.java:1613:in `each'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/modules/cli_parser.rb:58:in `parse_vars'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/modules/cli_parser.rb:70:in `parse_it'", "org/jruby/RubyArray.java:1613:in `each'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/modules/cli_parser.rb:69:in `parse_it'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/modules/cli_parser.rb:14:in `initialize'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/runner.rb:250:in `execute'", "/home/ubuntu/logstash-5.6.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/home/ubuntu/logstash-5.6.0/logstash-core/lib/logstash/runner.rb:199:in `run'", "/home/ubuntu/logstash-5.6.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/home/ubuntu/logstash-5.6.0/lib/bootstrap/environment.rb:71:in `(root)'"]}
```

Contributor guide

Open the contributing guide

Research direction

First reproduce the reported bin/logstash --modules netflow invocation, then inspect logstash-core/lib/logstash/modules/cli_parser.rb and the get_kv/parse_vars path named in the backtrace. Done means module variables are accepted when the password contains $, without the reported configuration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, ruby
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.