[JIRA] (JENKINS-61277) Document that Bitbucket Server admin token credential secures itself by forcing to SYSTEM scope

3 views
Skip to first unread message

Kalle.Niemitalo@procomp.fi (JIRA)

unread,
Feb 29, 2020, 3:34:03 AM2/29/20
to jenkinsc...@googlegroups.com
Kalle Niemitalo created an issue
 
Jenkins / Improvement JENKINS-61277
Document that Bitbucket Server admin token credential secures itself by forcing to SYSTEM scope
Issue Type: Improvement Improvement
Assignee: Kristy Hughes
Components: atlassian-bitbucket-server-integration-plugin
Created: 2020-02-29 08:33
Environment: Bitbucket Server Integration 1.1.0
Priority: Minor Minor
Reporter: Kalle Niemitalo

The Bitbucket Server integration plugin expects an administrator to create a personal access token in Bitbucket Server and add it to Jenkins as a credential. The help text of this feature says:

Providing this token will allow your users to automatically set up build triggers when creating Jenkins jobs. They won't be able to use it for anything else.

At a first glance, this seems to fly against what is taught in Limitations of Credentials Masking and JENKINS-50242 (comment): that global credentials can be freely used by jobs.

However, from looking at the credentials.xml file in the Jenkins master, the Bitbucket Server admin token actually has SYSTEM scope rather than GLOBAL scope, and there is no way to change the scope to GLOBAL in the user interface. I think the credential is actually secure as advertised, and the security does not depend on whether e.g. Credentials Binding Plugin can call methods of the com.atlassian.bitbucket.jenkins.internal.config.BitbucketTokenCredentialsImpl class via some interface.

On the other hand, because the scope field does not appear in the UI for this type of credential, it is not obvious to a Jenkins administrator that the scope is SYSTEM, especially when other types of credentials in the credential store "System" and domain "Global credentials (unrestricted)" can have either GLOBAL or SYSTEM scope.

Please edit the help text or other parts of the UI to make it clear that this type of credential always has SYSTEM scope and that is the mechanism with which the credential is protected from authors of jobs. Such an explanation would let the Jenkins administrator be more confident that the Bitbucket Server access token truly is secure, as both Jenkins administrators and plugin authors have made mistakes in this area in the past.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

Kalle.Niemitalo@procomp.fi (JIRA)

unread,
Feb 29, 2020, 3:49:02 AM2/29/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages