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

credential ID accepts a too narrow set of characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • credentials-plugin
    • None

      It seems that there is hardcoded format enforcement for credentials ID which is very limiting for no clear technical reasons. See https://github.com/jenkinsci/credentials-plugin/blob/master/src/main/java/com/cloudbees/plugins/credentials/impl/BaseStandardCredentials.java#L206

      The current regex is [a-zA-Z0-9_.-]+ which prevents people from using logical names like "user@host".

      The current pattern allows only for simple characters which can normally exist in the username, making impossible to use some kind of safe separator when adding IDs.

      This requests for enlarging set of allowable characters and also to document the restriction pattern in the UI, so people would know what they can use.

      Please note that I would not mind raising a PR myself for addressing this but first I need some feedback regarding which are the real limitations regarding the ID. Sadly the source code does not indicate any reasons why this regex was added in the first place. 

            Unassigned Unassigned
            ssbarnea Sorin Sbarnea
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: