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

S153 Jira Cloud docs #416

Merged
merged 5 commits into from
Nov 6, 2024
Merged

S153 Jira Cloud docs #416

merged 5 commits into from
Nov 6, 2024

Conversation

davidfq
Copy link
Contributor

@davidfq davidfq commented Jul 10, 2023

⚠️ rc-v0.4.29 as base to compare, but this needs an initial release of: https://github.com/Worklytics/psoxy-oauth-setup-tool

Fixes

.

Features

  • Updates Jira Cloud docs and TODO file: references the OAuth helper tool

Change implications

  • dependencies added/changed? no

It references the psoxy-oauth-setup-tool
Copy link
Contributor

@aperez-worklytics aperez-worklytics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestion about order and content of the doc steps


### Worklytics Psoxy OAuth setup tool

Assuming you've created a Jira Cloud OAuth 2.0 (3LO) integration as described above, from the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be better if we distribute the doc in following sections instead and in this order:

  • App configuration: where we explain how to setup the Jira app covering following steps:
1. Go to the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/) and
   click on "Create" (OAuth 2.0 integration).

2. Now navigate to "Permissions" and click on "Add" for Jira. Once added, click on "Configure".
   Add the following scopes as part of "Classic Scopes":
   - `read:jira-user`
   - `read:jira-work`

   And these from "Granular Scopes":
   - `read:group:jira`
   - `read:avatar:jira`
   - `read:user:jira`

   Then repeat the same but for "User Identity API", adding the following scope:
   - `read:account`

3. Go to the "Authorization" section and add an OAuth 2.0 (3LO) authorization type: click on "Add"
   and you will be prompted to provide a "Callback URI". At this point, you could add
   `http://localhost` as value and follow the rest of steps on this guide, 
  • Worklytics Psoxy OAuth setup tool: instrutions for using the tool with jira
  • Manual steps:
go to "Settings" and copy the "Client ID" and "Secret". You will use these to
   obtain an OAuth `refresh_token`.

5. Build an OAuth authorization endpoint URL by copying the value for "Client Id" obtained in the
   previous step into the URL below. Then open the result in a web browser:

   `https://auth.atlassian.com/authorize?audience=api.atlassian.com&client_id=<CLIENT ID>&scope=offline_access%20read:group:jira%20read:avatar:jira%20read:user:jira%20read:account%20read:jira-user%20read:jira-work&redirect_uri=http://localhost&state=YOUR_USER_BOUND_VALUE&response_type=code&prompt=consent`

6. Choose a site in your Jira workspace to allow access for this application and click "Accept".
   As the callback does not exist, you will see an error. But in the URL of your browser you will
   see something like this as URL:

   `http://localhost/?state=YOUR_USER_BOUND_VALUE&code=eyJhbGc...`

   Copy the value of the `code` parameter from that URI. It is the "authorization code" required
   for next step.

   **NOTE** This "Authorization Code" is single-use; if it expires or is used, you will need to
   obtain a new code by  again pasting the authorization URL in the browser.

7. Now, replace the values in following URL and run it from command line in your terminal. Replace
   `YOUR_AUTHENTICATION_CODE`, `YOUR_CLIENT_ID` and `YOUR_CLIENT_SECRET` in the placeholders:

   `curl --request POST --url 'https://auth.atlassian.com/oauth/token' --header 'Content-Type: application/json' --data '{"grant_type": "authorization_code","client_id": "YOUR_CLIENT_ID","client_secret": "YOUR_CLIENT_SECRET", "code": "YOUR_AUTHENTICATION_CODE", "redirect_uri": "http://localhost"}'`

8. After running that command, if successful you will see a
   [JSON response](https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/#2--exchange-authorization-code-for-access-token) like this:

```json
{
Expand All
	@@ -72,10 +80,10 @@ And following granular scopes:
  1. Set the following variables in AWS System Manager parameters store / GCP Cloud Secrets (if default implementation):

    • PSOXY_JIRA_CLOUD_ACCESS_TOKEN secret variable with value of access_token received in previous response
    • PSOXY_JIRA_CLOUD_REFRESH_TOKEN secret variable with value of refresh_token received in previous response
    • PSOXY_JIRA_CLOUD_CLIENT_ID with Client Id value.
    • PSOXY_JIRA_CLOUD_CLIENT_SECRET with Client Secret value.
  2. Optional, obtain the "Cloud ID" of your Jira instance. Use the following command, with the
    access_token obtained in the previous step in place of <ACCESS_TOKEN> below:
    Expand All
    @@ -96,6 +104,21 @@ And following granular scopes:
    ]


Add the `id` value from that JSON response as the value of the `jira_cloud_id` variable in the
`terraform.tfvars` file of your Terraform configuration. This will generate all the test URLs with
a proper value

The idea would be to have as first option the tool and if not, using the manual steps

Base automatically changed from rc-v0.4.29 to main July 11, 2023 23:45
@eschultink eschultink changed the base branch from main to rc-v0.4.30 July 12, 2023 00:04
Base automatically changed from rc-v0.4.30 to main July 17, 2023 18:44
@eschultink eschultink changed the base branch from main to rc-v0.4.31 July 18, 2023 17:53
Base automatically changed from rc-v0.4.31 to main July 26, 2023 21:23
@eschultink eschultink changed the base branch from main to rc-v0.4.32 July 27, 2023 14:41
Base automatically changed from rc-v0.4.32 to main August 3, 2023 17:48
@eschultink eschultink changed the base branch from main to rc-v0.4.33 August 3, 2023 22:30
Base automatically changed from rc-v0.4.33 to main August 10, 2023 14:54
@eschultink eschultink changed the base branch from main to rc-v0.4.34 August 10, 2023 16:23
Base automatically changed from rc-v0.4.34 to main August 11, 2023 17:29
@eschultink eschultink changed the base branch from main to rc-v0.4.35 August 11, 2023 18:34
Base automatically changed from rc-v0.4.35 to main August 16, 2023 20:21
@eschultink eschultink changed the base branch from main to rc-v0.4.36 August 16, 2023 21:26
Base automatically changed from rc-v0.4.36 to main September 1, 2023 16:16
@eschultink eschultink changed the base branch from main to rc-v0.4.37 September 1, 2023 16:46
Base automatically changed from rc-v0.4.37 to main September 5, 2023 15:29
@eschultink eschultink changed the base branch from main to rc-v0.4.38 September 5, 2023 15:35
Base automatically changed from rc-v0.4.38 to main September 19, 2023 17:32
@eschultink eschultink changed the base branch from main to rc-v0.4.39 September 21, 2023 18:37
Base automatically changed from rc-v0.4.39 to main September 27, 2023 17:06
@eschultink eschultink changed the base branch from main to rc-v0.4.40 September 27, 2023 17:22
@eschultink eschultink changed the base branch from rc-v0.4.40 to rc-v0.4.42 November 24, 2023 17:28
Base automatically changed from rc-v0.4.48 to main February 16, 2024 22:19
@eschultink eschultink changed the base branch from main to rc-v0.4.50 March 5, 2024 18:10
Base automatically changed from rc-v0.4.50 to main March 6, 2024 23:09
@eschultink eschultink changed the base branch from main to rc-v0.4.51 March 7, 2024 03:48
Base automatically changed from rc-v0.4.51 to main March 23, 2024 16:48
@eschultink eschultink changed the base branch from main to rc-v0.4.52 March 25, 2024 16:33
Base automatically changed from rc-v0.4.52 to main April 16, 2024 15:26
@eschultink eschultink changed the base branch from main to rc-v0.4.53 April 24, 2024 02:34
Base automatically changed from rc-v0.4.53 to main May 22, 2024 17:08
@eschultink eschultink changed the base branch from main to rc-v0.4.54 May 22, 2024 17:18
Base automatically changed from rc-v0.4.54 to main June 3, 2024 21:39
@eschultink eschultink changed the base branch from main to rc-v0.4.55 June 3, 2024 22:35
Base automatically changed from rc-v0.4.55 to main July 1, 2024 23:22
@eschultink eschultink changed the base branch from main to rc-v0.4.56 July 2, 2024 13:23
Base automatically changed from rc-v0.4.56 to main July 4, 2024 10:44
@eschultink eschultink changed the base branch from main to rc-0.4.57 July 5, 2024 17:51
Base automatically changed from rc-0.4.57 to main July 11, 2024 21:27
@eschultink eschultink changed the base branch from main to rc-v0.4.58 July 11, 2024 21:55
Base automatically changed from rc-v0.4.58 to main August 19, 2024 15:36
@eschultink eschultink changed the base branch from main to rc-v0.4.61 September 19, 2024 18:11
Base automatically changed from rc-v0.4.61 to main October 3, 2024 20:41
@eschultink eschultink changed the base branch from main to rc-v0.5.0 October 3, 2024 21:25
@davidfq davidfq mentioned this pull request Oct 31, 2024
@eschultink eschultink enabled auto-merge (squash) November 6, 2024 19:47
@eschultink eschultink merged commit bc71751 into rc-v0.5.0 Nov 6, 2024
26 checks passed
@eschultink eschultink deleted the S153-jira-cloud-docs-tool-ref branch November 6, 2024 19:51
eschultink added a commit that referenced this pull request Dec 4, 2024
* Update Jira Cloud docs and TODO

It references the psoxy-oauth-setup-tool

* Reorganize docs @aperez-worklytics CR

* Update docs

---------

Co-authored-by: Erik Schultink <eschultink@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants