-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
933.0.1
The com.cloudbees.jenkins.plugins.bitbucket.credentials.BitbucketUsernamePasswordCredentialMatcher class implements the CredentialsMatcher.CQL interface by making public String describe() return the constant string "username and password are not empty". This is not valid Credentials Query Language and cannot be parsed by the public static CredentialsMatcher parse(final String cql) method of com.cloudbees.plugins.credentials.CredentialsMatchers.
Likewise, BitbucketOAuthCredentialMatcher implements CredentialsMatcher.CQL and returns a CQL string that is invalid in several ways:
- Unbalanced parentheses
- Misspelled lenght doesn't match String.length()
- Uses a CONTAINS operator that is not defined in CQL
- is caused by
-
JENKINS-74965 Add support for Repository, Project and Workspace Access Token for Bitbucket Cloud
-
- Closed
-
-
JENKINS-34262 Support for OAuth credentials
-
- Closed
-
- relates to
-
JENKINS-35306 Credentials Providers need to be able to list credentials without retrieving the backing secret
-
- Closed
-
- links to
[JENKINS-74972] CredentialsMatcher.CQL.describe() implementations return invalid CQL
Link |
New:
This issue relates to |
Link |
New:
This issue is caused by |
Remote Link | New: This issue links to "Credentials Query Language (CQL) grammar (Web Link)" [ 30306 ] |
Remote Link | New: This issue links to "PR #940 to remove CQL support (Web Link)" [ 30308 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Assignee | Original: Nikolas Falco [ nfalco ] | New: Kalle Niemitalo [ kon ] |
Description | Original: The com.cloudbees.jenkins.plugins.bitbucket.credentials.BitbucketUsernamePasswordCredentialMatcher class implements the CredentialsMatcher.CQL interface by making public String describe() return the constant string "username and password are not empty". This is not valid Credentials Query Language and cannot be parsed by the public static CredentialsMatcher parse(final String cql) method of com.cloudbees.plugins.credentials.CredentialsMatchers. |
New:
The com.cloudbees.jenkins.plugins.bitbucket.credentials.BitbucketUsernamePasswordCredentialMatcher class implements the CredentialsMatcher.CQL interface by making public String describe() return the constant string "username and password are not empty". This is not valid Credentials Query Language and cannot be parsed by the public static CredentialsMatcher parse(final String cql) method of com.cloudbees.plugins.credentials.CredentialsMatchers.
Likewise, BitbucketOAuthCredentialMatcher implements CredentialsMatcher.CQL and returns a CQL string that is invalid in several ways: * Unbalanced parentheses * Misspelled {{lenght}} doesn't match [String.length()|https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html#length()] * Uses a {{CONTAINS}} operator that is not defined in CQL |
Summary | Original: BitbucketUsernamePasswordCredentialMatcher returns invalid CQL | New: CredentialsMatcher.CQL.describe() implementations return invalid CQL |
Ideas for how to fix this:
I don't see where CredentialsMatchers.parse is called at all, except in CredentialsMatchersTest. Perhaps public credential-provider plugins do not actually use the CQL feature and only some proprietary plugin does. For that reason, I think removing the CredentialsMatcher.CQL implementation is the best option.