Logstash logstash-filter-cipher plugin

Hi.

logstash-filter-cipher plugin is error.

It does not decrypt normally.
What is the problem?

case1. I want hex to bin!

ruby {
  code => "
    event.set('binary_ip', Array(event.get('encrypt_ip')).pack('H*'))
  "
}

case2. I want decrypt

code:

  ruby {
    code => "
      event.set('binary_ip', Array(event.get('encrypt_ip')).pack('H*'))
    "
  }

  cipher {
    algorithm => "aes-128-cbc"
    cipher_padding => 1

    iv_random_length => 16

    key => "****************"
    key_size => 16
  
    mode => "decrypt"
    source => "binary_ip"
    target => "ip_decrypted"
  }

debug:

[2018-12-05T10:53:27,451][WARN ][logstash.filters.cipher  ] Exception catch on cipher filter {:event=>#<LogStash::Event:0x53fe73c8>, :error=>#<ArgumentError: data must not be empty>}
{
 "message" => "_d7fcfefb1bef6f315602957c17c6d5df",
 "binary_ip" => "\xD7\xFC\xFE\xFB\e\xEFo1V\x02\x95|\x17\xC6\xD5\xDF",
 "encrypt_ip" => "d7fcfefb1bef6f315602957c17c6d5df"
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.