Issue/573 OAuth2 support for Bitbucket DC
(Bloody Hell it works.)
Bitbucket DC 7.20 now supports OAuth 2.0 connections from external applications. https://confluence.atlassian.com/bitbucketserver/bitbucket-data-center-and-server-7-20-release-notes-1101934428.html
This means OAuth 2.0 access_tokens can be used as authentication between Git and Bitbucket DC.
The PR refactors the Bitbucket module provide a more generic framework for supporting OAuth 2.0 and providing implementations for both Bitbucket Cloud and Bitbucket DC as they are unfortunately not exactly the same.
Because each Bitbucket DC installation is a unique instance the OAuth 2.0 ClientId and ClientSecret are unique to each installation and therefore GCM must be configured to support each Bitbucket DC instance.
Documentation is updated to describe how to configure and use the feature.
Tests are extended to cover Bitbucket DC.
I've been dogfooding it for the last month.
I'm currently dogfooding this and awaiting some minor tweaks to the OAuth2 support in Bitbucket, once I'm happy it working and the OAuth2 support has been publicly released in Bitbucket I'll open up this PR.
I've been dogfooding this for a month and I believe its al working.
Apologies for the size. A significant chunk is refactoring and tests.
Thanks
Thanks for the feedback, I'll start taking a look this week 👍
Thanks for the feedback, I'll start taking a look this week 👍
Thanks so much Mike! We're also working on aligning with the Git project on commit formatting/organization. While you're making your changes, would you mind updating the format/organization of your commits per the guidance in this presentation? (There's also an awesome talk you can watch, but the slides are quicker if you're under time constraints 😊).
Rebased first 👍
Also apologies for the surprising number of typos/comments/TODOs etc 😬
OK, I think I've addressed the issues mentioned above, I'm just working on restructuring the commits.
OK,I think I have a much better structure for the commits.
I'm going to dogfood for a couple of days next week before pushing the rebase, fixes and revised commits.
Have a good weekend.
Thanks so much for all your efforts here Mike. Take all the time you need to dogfood - I'll keep an eye out for your next push.
I've updated the PR. I've covered the issues raised, hopefully. I've restructured the commits, hopefully this will make the review easier.
But please flag anything you think still needs looking at.
Thanks for the feedback, hopefully it feels like we're making progress :)
I've been away but I'll pick it up again this week. 👍
Rebased after the latest changes to the Btbucket UI then I'll address the remaining comments 👍
Still a few comments to address 👍
Well that was a useful way to fill 2 hours of airport hell :)
I believe I've addressed the key comments, let me know if there are any other issues.
I'm dogfooding it as well.
Thanks
Thanks for the quick response.
My dogfooding will be a bit thinner than planned, I'm off with Covid for the next few days :(
Ah build failures. Everything tests OK on my mac and the error looks systematic, but I'm afraid I can't re-run CI checks.
I slightly cheated to re-trigger the CI, I rebased all of the commit messages to give them a meaningful first line.
Fingers crossed CI completes this time :)
I slightly cheated to re-trigger the CI, I rebased all of the commit messages to give them a meaningful first line.
That's exactly what I would have done 😊.
FYI I think there is a bug after all the refactoring.
I'm just investigating
FYI I think there is a bug after all the refactoring.
I'm just investigating
This should be fixed now, my dogfooding is working now.
Hi just checking in to see if there is any timeline for merging this PR? Cheers 👍
Just a few comments on the
OAuth2Clientctor and some broken links in the doc updates; but looks good other than that!
+1! We'll plan to go ahead and merge after the links are fixed up.
Thanks for the feedback. I'll address those issues for the start of next week. 👍
🤞
😄
Awesome, thank you.
I started messing around with this in 2018 and started looking at it in Git Credential Manager for Windows in 2019 https://github.com/microsoft/Git-Credential-Manager-for-Windows/issues/837 https://github.com/mminns/Git-Credential-Manager-for-Windows/tree/mminns/issue-837-Bitbucket-Server-Support
So it's brilliant to finally get it done.
Thanks for all your help, @ldennington , @mjcheetham 👏
🙇
Good
Good