-
Bug
-
Resolution: Unresolved
-
Minor
-
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.
jglick, can we extent the list of allowed characters for IDs with things like "@", ":", maybe even "/" ? These seem to be the more likely to be desired.