Sidekiq: Sidekiq Ent encryption - last argument is encrypted multiple times on retries

Created on 3 Mar 2017  路  1Comment  路  Source: mperham/sidekiq

Ruby version: 2.3.1
Sidekiq / Pro / Enterprise version(s): Sidekiq 4.2.7 / Pro 3.4.3 / Ent 1.5.1

When using encryption feature, if a job fails, when it retries it will contain an invalid value for the encrypted argument.

class PrivateWorker
  include Sidekiq::Worker
  sidekiq_options encrypt: true

  def perform(x, y, secret_bag)
    puts "secret bag: #{secret_bag}"
    raise "Error"
  end
end
PrivateWorker.perform_async(1, 2, {"ssn" => "123-45-6789"})

Output on first execution:

secret bag: {"ssn"=>"123-45-6789"}

Output on first retry:

secret bag: BAhTOhFTaWRla2lxOjpFbmMKOgZjSSIQYWVzLTI1Ni1nY20GOgZFVDoIdGFnIhXWsnWEUi75i5Ummecjer8lOgdpdiIRuvSUBYQSRm45aup8OgZ2aQY6CWJsb2IiJsO5evYXFyx9aaympvIszn0usQ7xL81g186zlsDM0195pA==

For each retry, the already encrypted last argument is encrypted again.

Working app to reproduce: https://github.com/renanborgescampos/sidekiq-encryption-test

enterprise

Most helpful comment

Thank you, will be fixed in 1.5.2 very soon.

>All comments

Thank you, will be fixed in 1.5.2 very soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikhilm492 picture nikhilm492  路  4Comments

mperham picture mperham  路  3Comments

fatcatt316 picture fatcatt316  路  4Comments

mperham picture mperham  路  4Comments

homanchou picture homanchou  路  3Comments