Problem in using filter-cipher

Hi,

I'm working on logstash-filter-cipher to encode and decode the data. But nothing is coming up.

I have an "ID" field and I want to encode it. The code that I was using is as follows.

input {
elasticsearch {
host => [ "localhost" ]
index => "test
}
}

filter {
cipher {
algorithm => "aes-256-cbc"
cipher_padding => 1
iv => "1234567890123456"
key => "12345678901234567890123456789012"
key_size => 32
mode => "encrypt"
source => "ID"
target => "ID_crypted"
base64 => true
}
cipher {
algorithm => "aes-256-cbc"
cipher_padding => 1
iv => "1234567890123456"
key => "12345678901234567890123456789012"
key_size => 32
mode => "decrypt"
source => "ID_crypted"
target => "ID_decrypted"
base64 => true
}
}

output {
elasticsearch_http
{
host => "localhost"
index => "new_test"
index_type => "new_test"
}
stdout {
codec => json
#codec => rubydebug
}
}

Please look in to the code and please suggest me if any modifications required :slight_smile:

Regards,
Sanjay Reddy

What does your input look like.

@warkolm

Here I'm providing the data in ELK log format and also csv format

 {
 "_index": "test",
 "_type": "test",
 "_id": "AVUL9hUOkpaHCVuxxRNi",
 "_version": 1,
 "_score": 1,
 "_source": {
      "ID": "1323",
      "Age": "23",
      "Gender": "M",
      "Remarks": "Good",
      "Improvement": "Yes"
   }
 }

please help