Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50216

Google Auth Plugin is incompatible with Jenkins 2.102+

      11:53:59 FATAL: Could not call com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject() : Failed to serialize com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials for class com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
      11:53:59 ---- Debugging information ----
      11:53:59 message             : Could not call com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject()
      11:53:59 cause-exception     : java.lang.RuntimeException
      11:53:59 cause-message       : Failed to serialize com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials for class com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
      11:53:59 -------------------------------
      11:53:59 java.lang.UnsupportedOperationException: Refusing to marshal org.joda.time.chrono.ISOChronology$Stub for security reasons; see https://jenkins.io/redirect/class-filter/
      11:53:59 	at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:81)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      11:53:59 	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      11:53:59 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      11:53:59 Caused: java.lang.RuntimeException: Failed to serialize org.joda.time.base.BaseDateTime#iChronology for class org.joda.time.DateTime
      11:53:59 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      11:53:59 	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      11:53:59 	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      11:53:59 	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      11:53:59 	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      11:53:59 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      11:53:59 Caused: java.lang.RuntimeException: Failed to serialize com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials#expiration for class com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials
      11:53:59 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      11:53:59 	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      11:53:59 	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      11:53:59 	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      11:53:59 	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      11:53:59 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      11:53:59 Caused: java.lang.RuntimeException: Failed to serialize com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials for class com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
      11:53:59 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      11:53:59 	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      11:53:59 	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      11:53:59 	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.SerializableConverter$1.writeToStream(SerializableConverter.java:140)
      11:53:59 	at com.thoughtworks.xstream.core.util.CustomObjectOutputStream.writeObjectOverride(CustomObjectOutputStream.java:84)
      11:53:59 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
      11:53:59 	at com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject(GoogleRobotUsernamePassword.java:165)
      11:53:59 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:53:59 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      11:53:59 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      11:53:59 	at java.lang.reflect.Method.invoke(Method.java:498)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteObject(SerializationMethodInvoker.java:135)
      11:53:59 Caused: com.thoughtworks.xstream.converters.ConversionException: Could not call com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject() : Failed to serialize com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials for class com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
      11:53:59 ---- Debugging information ----
      11:53:59 message             : Could not call com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject()
      11:53:59 cause-exception     : java.lang.RuntimeException
      11:53:59 cause-message       : Failed to serialize com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials for class com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
      11:53:59 -------------------------------
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteObject(SerializationMethodInvoker.java:141)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:259)
      11:53:59 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:83)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      11:53:59 	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
      11:53:59 	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      11:53:59 	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
      11:53:59 	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
      11:53:59 	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
      11:53:59 	at com.cloudbees.plugins.credentials.CredentialsProvider.getOrCreateFingerprintOf(CredentialsProvider.java:1399)
      11:53:59 	at com.cloudbees.plugins.credentials.CredentialsProvider.trackAll(CredentialsProvider.java:1457)
      11:53:59 	at com.cloudbees.plugins.credentials.CredentialsProvider.track(CredentialsProvider.java:1421)
      11:53:59 	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:818)
      11:53:59 	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:786)
      11:53:59 	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1154)
      11:53:59 	at hudson.scm.SCM.checkout(SCM.java:504)
      11:53:59 	at hudson.model.AbstractProject.checkout(AbstractProject.java:1203)
      11:53:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
      11:53:59 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      11:53:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
      11:53:59 	at hudson.model.Run.execute(Run.java:1727)
      11:53:59 	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      11:53:59 	at hudson.model.ResourceController.execute(ResourceController.java:97)
      11:53:59 	at hudson.model.Executor.run(Executor.java:429)
      

          [JENKINS-50216] Google Auth Plugin is incompatible with Jenkins 2.102+

          Jesse Glick added a comment -

          Filed a simpler revision: PR 17.

          Jesse Glick added a comment - Filed a simpler revision: PR 17.

          Jesse Glick added a comment -

          I suspect that the compatibility impact on even the unimportant fingerprint issue is zero: from what I can tell, the fingerprints were hashing based on an expiration timestamp which is different every time the credentials are used, so it would never have matched to begin with. Since the problematic class is supposed to be ephemeral and apparently for Remoting only, this indicates a design flaw in the plugin. Perhaps it needed to implement CredentialsSnapshotTaker rather than rolling its own GoogleRobotCredentials.forRemote.

          Jesse Glick added a comment - I suspect that the compatibility impact on even the unimportant fingerprint issue is zero: from what I can tell, the fingerprints were hashing based on an expiration timestamp which is different every time the credentials are used, so it would never have matched to begin with. Since the problematic class is supposed to be ephemeral and apparently for Remoting only, this indicates a design flaw in the plugin. Perhaps it needed to implement CredentialsSnapshotTaker rather than rolling its own GoogleRobotCredentials.forRemote .

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java
          src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentialsIntegrationTest.java
          src/test/resources/com/google/jenkins/plugins/credentials/oauth/jodaDateTimeBroken.xml
          src/test/resources/com/google/jenkins/plugins/credentials/oauth/jodaDateTimeXML.xml
          http://jenkins-ci.org/commit/google-oauth-plugin/c47f47226c036b6f25d252877a34e68a0b1af99e
          Log:
          JENKINS-50216 - Introduce a custom serializer for org.joda.time.DateTime

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java src/test/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentialsIntegrationTest.java src/test/resources/com/google/jenkins/plugins/credentials/oauth/jodaDateTimeBroken.xml src/test/resources/com/google/jenkins/plugins/credentials/oauth/jodaDateTimeXML.xml http://jenkins-ci.org/commit/google-oauth-plugin/c47f47226c036b6f25d252877a34e68a0b1af99e Log: JENKINS-50216 - Introduce a custom serializer for org.joda.time.DateTime

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          Jenkinsfile
          pom.xml
          http://jenkins-ci.org/commit/google-oauth-plugin/5e0448e8d183f26aaf056a79aa11129e73bb3329
          Log:
          JENKINS-50216 - Add Jenkinsfile to verify JEP-200 regressions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile pom.xml http://jenkins-ci.org/commit/google-oauth-plugin/5e0448e8d183f26aaf056a79aa11129e73bb3329 Log: JENKINS-50216 - Add Jenkinsfile to verify JEP-200 regressions

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/google-oauth-plugin/51fb71acab97b80be2b1cc27aae19d9203a09a09
          Log:
          JENKINS-50216 - Add BouncyCastle API dependency to enable tests against 2.107.2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/google-oauth-plugin/51fb71acab97b80be2b1cc27aae19d9203a09a09 Log: JENKINS-50216 - Add BouncyCastle API dependency to enable tests against 2.107.2

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java
          src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentialsIntegrationTest.java
          http://jenkins-ci.org/commit/google-oauth-plugin/bb9c2cc5ca5940b2043ee35bf6afb3ac3c7c68af
          Log:
          JENKINS-50216 - Cleanup codestyle and re-enable Checkstyle

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java src/test/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentialsIntegrationTest.java http://jenkins-ci.org/commit/google-oauth-plugin/bb9c2cc5ca5940b2043ee35bf6afb3ac3c7c68af Log: JENKINS-50216 - Cleanup codestyle and re-enable Checkstyle

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentialsIntegrationTest.java
          src/test/resources/com/google/jenkins/plugins/credentials/oauth/jodaDateTimeNull.xml
          http://jenkins-ci.org/commit/google-oauth-plugin/dbdef9b760d3c1d21be7d8199022b1bae60864e0
          Log:
          JENKINS-50216 - Joda DateTime converter now has higher priority than JEP-200 blacklist

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java src/test/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentialsIntegrationTest.java src/test/resources/com/google/jenkins/plugins/credentials/oauth/jodaDateTimeNull.xml http://jenkins-ci.org/commit/google-oauth-plugin/dbdef9b760d3c1d21be7d8199022b1bae60864e0 Log: JENKINS-50216 - Joda DateTime converter now has higher priority than JEP-200 blacklist

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java
          src/main/resources/META-INF/hudson.remoting.ClassFilter
          http://jenkins-ci.org/commit/google-oauth-plugin/498b54bb486d4a5dfd91ca47cfb04fbbf946502f
          Log:
          JENKINS-50216 - Whitelist org.joda.time.DateTime so that there is no need to tweak converter priorities

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/google/jenkins/plugins/util/JodaDateTimeConverter.java src/main/resources/META-INF/hudson.remoting.ClassFilter http://jenkins-ci.org/commit/google-oauth-plugin/498b54bb486d4a5dfd91ca47cfb04fbbf946502f Log: JENKINS-50216 - Whitelist org.joda.time.DateTime so that there is no need to tweak converter priorities

          Code changed in jenkins
          User: astroilov
          Path:
          .gitignore
          Jenkinsfile
          checkstyleJavaHeader
          pom.xml
          src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotMetadataCredentials/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/config.jelly
          http://jenkins-ci.org/commit/google-oauth-plugin/e68bbcc00395124e4b27e90b84e1edeaff33fc74
          Log:
          Merge pull request #17 from jglick/RemotableGoogleCredentials.expiration-JENKINS-50216

          JENKINS-50216 - RemotableGoogleCredentials.expiration fix

          Compare: https://github.com/jenkinsci/google-oauth-plugin/compare/62126a657c2d...e68bbcc00395
          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: astroilov Path: .gitignore Jenkinsfile checkstyleJavaHeader pom.xml src/main/java/com/google/jenkins/plugins/credentials/oauth/RemotableGoogleCredentials.java src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotMetadataCredentials/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/config.jelly http://jenkins-ci.org/commit/google-oauth-plugin/e68bbcc00395124e4b27e90b84e1edeaff33fc74 Log: Merge pull request #17 from jglick/RemotableGoogleCredentials.expiration- JENKINS-50216 JENKINS-50216 - RemotableGoogleCredentials.expiration fix Compare: https://github.com/jenkinsci/google-oauth-plugin/compare/62126a657c2d...e68bbcc00395 * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          Oleg Nenashev added a comment -

          The fix has been released in 0.6

          Oleg Nenashev added a comment - The fix has been released in 0.6

            jglick Jesse Glick
            dmn_dbernardy Dennis Bernardy
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: