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

Resolve Jira API requests between JSM/JS/Jira to correct permission map/resolver #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dxu2atlassian
Copy link
Contributor

@dxu2atlassian dxu2atlassian commented Dec 23, 2024

JSM/JS/Jira all seem to be bundled within requestJira inside Forge, this will separate those requests and route them to the proper permission map/resolver for classification.

@dxu2atlassian dxu2atlassian force-pushed the feat/EAS-2549 branch 6 times, most recently from fecbc4d to 7de9e27 Compare January 3, 2025 20:53
@dxu2atlassian dxu2atlassian marked this pull request as ready for review January 3, 2025 21:16
}
_ => {
warn!("First parameter to requestJira() is invalid");
IntrinsicName::RequestJira // TODO: how should we handle this edge case?
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to produce the least amount of false positives, then we should conservatively assume it can use any of Jira APIs if we can't statically determine which one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to clarify, do you mean create another IntrinsicName enum like IntrinsicName::RequestJiraAny and then have that correspond to a combined resolver/regex map of JS + Jira + JSM here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that works.

@dxu2atlassian dxu2atlassian marked this pull request as draft January 7, 2025 21:33
@dxu2atlassian dxu2atlassian marked this pull request as ready for review January 8, 2025 18:54
url if url.starts_with("/rest/servicedeskapi/") => {
Some(IntrinsicName::RequestJiraServiceManagement)
}
url if url.starts_with("/rest/agile/") => Some(IntrinsicName::RequestJiraSoftware),
Copy link
Contributor

Choose a reason for hiding this comment

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

There are other Jira Software URL patterns like /rest/devinfo and /rest/builds. See the API docs for others.

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.

2 participants