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

Store a stable unique ID for each credential

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently the "project name" is the only way to refer to a credential, e.g. via GoogleRobotCredentials.getById(projectName);

      However as this is a free text field, users can rename the credential, and jobs configured to use that credential (having stored the "project name" value, aka "id" in the job config) will no longer work.

      Other credential types seem to use the id field to store a stable UUID value (which isn't shown to the user), e.g.
      https://github.com/jenkinsci/credentials-plugin/blob/a6c40a1/src/main/java/com/cloudbees/plugins/credentials/impl/BaseStandardCredentials.java#L73

      So it seems like id here should really be projectName — it would be nice if this plugin used the id field in the same way as other credential plugins.

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          Note that this issue also means (according to this comment) it's not possible to create multiple Google Service Account credentials with the same project name (not that that's a great idea to start with).

          Show
          orrc Christopher Orr added a comment - Note that this issue also means (according to this comment ) it's not possible to create multiple Google Service Account credentials with the same project name (not that that's a great idea to start with).
          Show
          craigbarber Craig Barber added a comment - Migrated to: https://github.com/jenkinsci/google-oauth-plugin/issues/42

            People

            Assignee:
            mattmoor Matthew Moore
            Reporter:
            orrc Christopher Orr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: