Credentials do not propagate from Operations Center to Controller after Credentials plugin version 2.5

Article ID:4406989115035
2 minute readKnowledge base

Issue

  • If a version 2.289.1.2 or later (Credentials plugin version >= 2.5) Operations Center is paired with a Controller with a version less than 2.249.1.2, credentials will not propagate to the connected Controller. The controller logs shows failures like the following:

      WARNING c.c.o.c.p.OperationsCenterCredentialsProvider#getCredentials: Cannot lookup credentials of type interface com.cloudbees.plugins.credentials.common.IdCredentials from Operations Center
      java.io.InvalidClassException: com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl; local class incompatible: stream classdesc serialVersionUID = -XXXXXXXXXXXXXX, local class serialVersionUID = YYYYYYYYYYYYYYY

Explanation

A new field was added to com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl in Credentials plugin version 2.5 through credentials-plugin #205.

It was then integrated into CloudBees CI and was released in version 2.289.1.2.

Since com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl doesn’t have a serialVersionUID declared, adding a field changes its value, which makes it incompatible for java serialization. This causes exceptions when trying to propagate the credentials to the controller and prevents their use.

Resolution

To resolve this problem there are a few supported options:

  • Match Operations Center and Controller versions by upgrading your controllers. We can help plan this via an assisted update.

  • Ensure your controllers are upgraded to at least version 2.249.1.2. Please reach out for an assisted update.

  • Stop the Operations Center, restore the old Operations Center version (war,rpm,deb,Docker image) as well as the JENKINS_HOME backup of your Operations Center taken before the Operations Center was upgraded, and start the Operations Center.

  • If none of those supported options are possible, please reach out to CloudBees support so we can discuss alternative options.