-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: main
Are you sure you want to change the base?
Conversation
fecbc4d
to
7de9e27
Compare
} | ||
_ => { | ||
warn!("First parameter to requestJira() is invalid"); | ||
IntrinsicName::RequestJira // TODO: how should we handle this edge case? |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that works.
7de9e27
to
8becec8
Compare
7e81927
to
32f1b4f
Compare
url if url.starts_with("/rest/servicedeskapi/") => { | ||
Some(IntrinsicName::RequestJiraServiceManagement) | ||
} | ||
url if url.starts_with("/rest/agile/") => Some(IntrinsicName::RequestJiraSoftware), |
There was a problem hiding this comment.
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.
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.