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

support private keys from new google developer console

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The new Google Developer Console provides two kind of private keys.

      the first one is a json file which contains all the information that is necessary to authenticate with a service account. this file gets downloaded when you create a new service account in the Google Developer Console.

      it's structure is as follows:

      {
        "private_key_id": "...",
        "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
        "client_email": "...@developer.gserviceaccount.com",
        "client_id": "...apps.googleusercontent.com",
        "type": "service_account"
      }
      

      the second type of private key is a .p12 file. it can be also downloaded in the Google Developer Console. this file is a PKCS12 keystore and contains a private key that can be used to authenticate a service account. the keystore password and key password is "notasecret". the key alias is "privatekey".

      it would be nice to let the user choose between this two options when creating google oauth credentials in jenkins.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: David Hamm
          Path:
          src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyLegacy.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKey.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentialsTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyTypeTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKeyUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12KeyTypeTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/SerializationUtil.java
          http://jenkins-ci.org/commit/google-oauth-plugin/6e67cd969bc712c3c5a6cbecccb519c15b13474c
          Log:
          JENKINS-24571 - support private keys from new google developer console - improved upgrade process of legacy credentials

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Hamm Path: src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyLegacy.java src/main/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKey.java src/test/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentialsTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyTypeTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKeyUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12KeyTypeTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/SerializationUtil.java http://jenkins-ci.org/commit/google-oauth-plugin/6e67cd969bc712c3c5a6cbecccb519c15b13474c Log: JENKINS-24571 - support private keys from new google developer console - improved upgrade process of legacy credentials
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: David Hamm
          Path:
          src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKey.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyType.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/KeyType.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/P12KeyType.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonKeyType/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonKeyType/help-jsonKeyFile.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/help-jsonKeyFile.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/Messages.properties
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12KeyType/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12KeyType/help-emailAddress.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12KeyType/help-p12KeyFile.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-emailAddress.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-p12KeyFile.html
          src/test/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentialsTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyTypeTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTestUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKeyUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonServiceAccountConfigUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12KeyTypeTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12KeyUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTestUtil.java
          http://jenkins-ci.org/commit/google-oauth-plugin/f74bf21868c0eee7f040a964821a67ecb475bcb8
          Log:
          JENKINS-24571 - support private keys from new google developer console - changes after review - part 1

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Hamm Path: src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKey.java src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyType.java src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java src/main/java/com/google/jenkins/plugins/credentials/oauth/KeyType.java src/main/java/com/google/jenkins/plugins/credentials/oauth/P12KeyType.java src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonKeyType/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonKeyType/help-jsonKeyFile.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/help-jsonKeyFile.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/Messages.properties src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12KeyType/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12KeyType/help-emailAddress.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12KeyType/help-p12KeyFile.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-emailAddress.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-p12KeyFile.html src/test/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentialsTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyTypeTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonKeyUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTestUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKeyUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonServiceAccountConfigUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12KeyTypeTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12KeyUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTestUtil.java http://jenkins-ci.org/commit/google-oauth-plugin/f74bf21868c0eee7f040a964821a67ecb475bcb8 Log: JENKINS-24571 - support private keys from new google developer console - changes after review - part 1
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nghia Tran
          Path:
          pom.xml
          src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotSecrets.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKey.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKey.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java
          src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/help-p12File.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/help-secretsFile.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/help-jsonKeyFile.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/Messages.properties
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/config.jelly
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-emailAddress.html
          src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-p12KeyFile.html
          src/test/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentialsTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTestUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonServiceAccountConfigUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTest.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTestUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/SerializationUtil.java
          src/test/java/com/google/jenkins/plugins/credentials/oauth/TestGoogleOAuth2DomainRequirement.java
          http://jenkins-ci.org/commit/google-oauth-plugin/5f91bf7862a930209ff4a801e5591a306b6138bf
          Log:
          Merge pull request #3 from DavidHamm/JENKINS-24571

          fixes #24571 - support private keys from new google developer console

          Compare: https://github.com/jenkinsci/google-oauth-plugin/compare/e2f4b8ad0d67...5f91bf7862a9

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nghia Tran Path: pom.xml src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials.java src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotSecrets.java src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonKey.java src/main/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig.java src/main/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonKey.java src/main/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig.java src/main/java/com/google/jenkins/plugins/credentials/oauth/ServiceAccountConfig.java src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/help-p12File.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentials/help-secretsFile.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfig/help-jsonKeyFile.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/Messages.properties src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/config.jelly src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-emailAddress.html src/main/resources/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfig/help-p12KeyFile.html src/test/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotPrivateKeyCredentialsTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/JsonServiceAccountConfigTestUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/LegacyJsonServiceAccountConfigUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTest.java src/test/java/com/google/jenkins/plugins/credentials/oauth/P12ServiceAccountConfigTestUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/SerializationUtil.java src/test/java/com/google/jenkins/plugins/credentials/oauth/TestGoogleOAuth2DomainRequirement.java http://jenkins-ci.org/commit/google-oauth-plugin/5f91bf7862a930209ff4a801e5591a306b6138bf Log: Merge pull request #3 from DavidHamm/ JENKINS-24571 fixes #24571 - support private keys from new google developer console Compare: https://github.com/jenkinsci/google-oauth-plugin/compare/e2f4b8ad0d67...5f91bf7862a9
          Hide
          orrc Christopher Orr added a comment -

          This is included in version 0.3 of the plugin.

          Show
          orrc Christopher Orr added a comment - This is included in version 0.3 of the plugin.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            davidhamm David Hamm
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: