Malfunctioning integration with error unable to invoke cipher due to bad padding

Modified on Thu, 3 Jul at 12:02 PM

Symptoms

- A build job in a CI system cannot be started from Allure TestOps UI.

- There are error messages in the logs of testops service


unable to invoke cipher due to bad padding

Cause

A bad padding error appearing in the logs of testops service is caused by the misconfiguration: not all the settings are transferred from old configuration to the new one.


Please refer to this article where the ciphering of the secrets in the database was introduced: https://docs.qameta.io/allure-testops/migrations/to-3-184-2/


The reason you are getting bad padding is that you either forgot to transfer the encryption key from ALLURE_CRYPTO_PASSWORD configuration parameter of your old config or it was transferred with additional symbols (like an unnecessary space character at the end).


How to fix


  1. Take your old configuration files and check the content of configuration files by searching for `ALLURE_CRYPTO_PASSWORD`.
  2. You need to take the old string and apply it to the new configuration.


References to the deployments

docker compose deployment

the content of old ALLURE_CRYPTO_PASSWORD needs to be added to '.env' file to the env variable

TESTOPS_CRYPTO_PASSWORD

Kubernetes deployment

the content of old ALLURE_CRYPTO_PASSWORD needs to be added to 'values.yaml' file to the env variable cryptoPass

packages deployment

the content of old ALLURE_CRYPTO_PASSWORD needs to be added to the configuration files testops service to the same variable.


How to fix if ALLURE_CRYPTO_PASSWORD cannot be recovered

In this case you need to re-enteer the credentials for the failing integration on the level of your project. 

The credentials will be saved and encrypted in the DB with new ALLURE_CRYPTO_PASSWORD.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article