When I configure DVCS connection on my Jira instance and my Bitbucket account, Jira will configure a link for each repository hosted by the Bitbucket account. The link configured look like this:
From: Custom ((?<!\w)(()-\d+)(?!\w))
Each time I push a commit with a new issue key, the link is automatically edited with the new project key. For example:
From: Custom ((?<!\w)((TEST|DEMO)-\d+)(?!\w))
I can see a security problem with this, and the SmartCommits feature: if user-1 has a write access to a project-1, and a user-2 has only the read access on project-1, but has a write access on the repository-1 on bitbucket, forge a commit with user-1 as author, he can act on the project-1 issues behind the user-1 account.
Is there a way to force DVCS connection to only link a given Bitbucket repository to a given Jira project?
This is not how the integration functions. The issue links on your Bitbucket repository are only to 'dress up' the issue keys when presented on the Bitbucket website. The DVCS connector in JIRA connects commits to issues by reading the issue key on the actual commit message. The smart commit transitions will trigger if the email address associated with the commit match the user's email address in JIRA.
To be fair, there is always the possibility that your end-users could set a different username/email address to be stored on their commits. This is part of the intentional design of Git and Mercurial and outside of the control of Bitbucket or JIRA.
Marcus Bertrand - Bitbucket Support
I agree with you for the weekness introduced by DVCS for this kind of feature, but a simple way to reduce the scope of the problem is to establish a strong link between a Jira project and a Bitbucket repository, and disallow a commit pushed in the repository A to trigger an action in project B. Maybe I missed this feature in Jira/Bitbucket, can you confirm that it doesn't exist?
So there is not way isolate project and repository per team? My use case is for a compagnie with several teams which are working on different projects (each project is a Jira project associated with a Bitbucket repository). If a team has write access to a set of project, I don't want it can act on another team's project.
On a different scale, where the compagny is a big group, and the teams spreaded in different subsidiaries, it becomes difficult to base security on trust.
Beyond the previously mentioned JIRA permissions, you could also use Git/Hg signed commits. At present, no Git/Hg hosting service that I'm aware of supports the verification of signed commits, but, you can still use them and manually verify as needed that the commit in question belongs to the user you expect.
For this to be enforced as a requirement, the Bitbucket service would need to verify all incoming commits from pushes against your key(s). We have an open issue for this, but at present it isn't on the radar to be implimented in the next year. If there is significant enough interest for this as a feature, this could change of course.
If none of these options satisfy your needs at this time, Git/Hg may not be right for you. We still offer Fisheye as an option for behind the firewall. It can host subversion repositories and secure them as you need.
...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot