fingerprint filter fails on Windows for SHA & MD5

Description

Using this filter causes an exception to be thrown for SHA* and MD5 (MURMUR3 worked)

fingerprint { source => "message" method => "SHA256" }

The error is:

NotImplementedError: (TypeError) can't convert nil into String hexdigest at org/jruby/ext/openssl/HMAC.java:99 anonymize_openssl at J:/ELK/logstash/lib/logstash/filters/fingerprint.rb:93 filter at J:/ELK/logstash/lib/logstash/filters/fingerprint.rb:76 each at org/jruby/RubyArray.java:1613 filter at J:/ELK/logstash/lib/logstash/filters/fingerprint.rb:71 initialize at (eval):87 call at org/jruby/RubyProc.java:271 filter at J:/ELK/logstash/lib/logstash/pipeline.rb:262 filterworker at J:/ELK/logstash/lib/logstash/pipeline.rb:203 start_filters at J:/ELK/logstash/lib/logstash/pipeline.rb:143

Web links

Gliffy Diagrams

Activity

Show:

Tal Levy February 6, 2015 at 11:21 PM

Jason Kendall June 2, 2014 at 6:27 PM

The documentation here sucks.. key is listed as optional, however, it's not truly optional at all.

"When used with IPV4_NETWORK method fill in the subnet prefix length Not required for MURMUR3 or UUID methods With other methods fill in the HMAC key."

This needs to be clarified, and highlighted better.

Brady Vidovic June 2, 2014 at 6:27 PM
Edited

After reading the docs, this looks to be a problem where I don't specify a key in the config. It would be nice if the documentation was clearer on what the key is and when it needs to be specified.

Also a simple error throw when user omits a key and it's required instead of the hard-to-decipher stacktrace.

Fixed

Details

Assignee

Reporter

Affects versions

Created June 2, 2014 at 6:08 PM
Updated February 6, 2015 at 11:22 PM
Resolved February 6, 2015 at 11:22 PM