Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM-51310 Implement OAuth2 Authentication (reopened) #949

Merged
merged 24 commits into from
Aug 29, 2023

Conversation

mickmister
Copy link
Contributor

Summary

Reopening of #928

This PR implements the OAuth2 authentication in the Jira Plugin.

Ticket Link

Fixes https://mattermost.atlassian.net/browse/MM-51310

Screenshots

Install OAuth2 using setup flow
Whenever the system admin runs the command /jira setup, the setup flow to configure OAuth2 client would look something like this:

Screenshot 2023-04-25 at 12 23 20 PM

Screenshot 2023-04-25 at 12 23 39 PM

Screenshot 2023-04-17 at 4 33 06 PM

Screenshot 2023-04-17 at 4 34 06 PM

@mickmister mickmister added the 3: QA Review Requires review by a QA tester label Jun 5, 2023
@mickmister mickmister requested a review from DHaussermann June 5, 2023 00:18
@mickmister mickmister changed the title MM-51310 Implement OAuth2 Authentication MM-51310 Implement OAuth2 Authentication (reopened) Jun 5, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2023

Codecov Report

Patch coverage: 3.84% and project coverage change: -1.29% ⚠️

Comparison is base (7c1b921) 31.16% compared to head (dc58dd5) 29.88%.
Report is 4 commits behind head on master.

❗ Current head dc58dd5 differs from pull request most recent head 6df75bc. Consider uploading reports for the commit 6df75bc to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #949      +/-   ##
==========================================
- Coverage   31.16%   29.88%   -1.29%     
==========================================
  Files          50       52       +2     
  Lines        7409     7734     +325     
==========================================
+ Hits         2309     2311       +2     
- Misses       4909     5231     +322     
- Partials      191      192       +1     
Files Changed Coverage Δ
server/client.go 8.04% <0.00%> (ø)
server/command.go 15.39% <0.00%> (-0.63%) ⬇️
server/instance.go 89.47% <0.00%> (-10.53%) ⬇️
server/instance_cloud.go 6.43% <0.00%> (-0.08%) ⬇️
server/instance_cloud_oauth.go 0.00% <0.00%> (ø)
server/instance_server.go 18.88% <0.00%> (-0.43%) ⬇️
server/kv.go 17.91% <0.00%> (-0.36%) ⬇️
server/plugin.go 11.56% <0.00%> (-0.05%) ⬇️
server/setup_flow.go 0.00% <0.00%> (ø)
server/user.go 26.70% <ø> (ø)
... and 6 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@raghavaggarwal2308
Copy link
Contributor

raghavaggarwal2308 commented Jun 15, 2023

@mickmister @DHaussermann Fixed issue: Comment webhook notification not working in the following PR because I didn't have the access to push the code in this PR: #953

@BlueSky-fur
Copy link

🥳 2 more to go to make work easier again! 😄

@Jawknee-cache
Copy link

Any update on when this issue will be resolved?

#945

raghavaggarwal2308 and others added 2 commits August 11, 2023 02:10
…h2 and Added PKCE code for OAuth2 (#953)

* Migrate Docs from GitBook (#948)

* Migrate Docs from GitBook

* Update readme.md

* Update readme.md

Co-authored-by: Katie Wiersgalla <[email protected]>

* Update readme.md

Co-authored-by: Katie Wiersgalla <[email protected]>

* Update readme.md

Co-authored-by: Katie Wiersgalla <[email protected]>

---------

Co-authored-by: Katie Wiersgalla <[email protected]>

* [MI-3153] Fixed issue: comment webhook notification not working

* [MI-3153] Added PKCE along with authorization code for getting the access token

* [MI-3153] Review fixes

* [MI-3159] Review fixes of comments given by Kshitij

* [MI-3159] Review fixes given by Ayush

* [MI-3159] Removed the code which was forcing the template window to close after user is connected

* [MI-3153] Review fixes

* [MI-3159] Review fixes

* [MI-3159] Review fix

* [MI-3282] Added logic to expand issue and issue with DM notification for comment webhook notification (#58)

* [MI-3282] Added logic to expand issue in comment webhook notification

* [MI-3282] Fix lint errors

* [MI-3315] Fixed issue: comment DM notification not working due to invalid API call

* [MI-3282] Review fixes

* [MI-3282] Review fix

* [MI-3331] Review fixes on PR #953 (Comment notification issue) (#60)

* [MI-3331] Review fixes on PR #953 (Comment notification issue)

* [MI-3331] Added separate condition to check if the instance is a cloud instance or not

* [MI-3335] Review fixes on Jira PR #953(Comment notification issue) (#62)

1. Added conditional for separation out the logic for jira cloud and server

---------

Co-authored-by: Carrie Warner (Mattermost) <[email protected]>
Co-authored-by: Katie Wiersgalla <[email protected]>
@hanzei
Copy link
Collaborator

hanzei commented Aug 24, 2023

@mickmister What are the next steps on this PR? Is it ready for QA testing?

@mickmister
Copy link
Contributor Author

@hanzei Yes it's ready for QA testing. Discussing in Brightscout channel next steps for testing https://community.mattermost.com/core/pl/ng4tz8stp7ynucq7bgrp9edj7y

@hanzei hanzei removed the request for review from Kshitij-Katiyar August 25, 2023 11:03
@hanzei hanzei removed 2: Dev Review Requires review by a core committer 3: Security Review Review requested from Security Team labels Aug 25, 2023
@AayushChaudhary0001
Copy link

Tested and approved, LGTM

  • This PR is tested and the setup of OAuth 2.0 is completely working fine.
  • This PR was tested on Jira cloud latest version and MM version 7.8.2.
  • During the testing, the notifications were also found working.

@mickmister
Copy link
Contributor Author

During the testing, the notifications were also found working.

@DHaussermann It seems the Jira comment events are fixed now. Merging the PR, and we can cover any more regression testing in the release testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to connect to a Jira cloud instance