Hi,
I’m building a Forge app with the devops:securityInfoProvider module to show security data in Jira’s Security tab. It has the read:security:jira and write:security:jira scopes.
My understanding is that this works in two steps. First the app links its workspace by calling POST /rest/security/1.0/linkedWorkspaces/bulk, so that Jira knows the workspace exists. After that, Jira calls the app back (fetchWorkspaces, searchContainers) so an admin can connect a container to a project. The vulnerabilities themselves are pushed separately with POST /rest/security/1.0/bulk.
The problem is that linking always fails. Using the app’s own token (api.asApp().requestJira), I get:
POST /rest/security/1.0/bulk(push vulnerabilities) → 400 “At least one vulnerability is required”. So the API is reachable and the scope is accepted (I just sent an empty list).GET /rest/security/1.0/linkedWorkspaces→ 401 “Unauthorized; scope does not match”POST /rest/security/1.0/linkedWorkspaces/bulk→ 401 “Unauthorized; scope does not match”
So the same token is fine on /bulk but rejected on every linkedWorkspaces endpoint.
I checked the two things that usually cause “scope does not match”, and both are fine:
- The scope is there. I decoded the token the app actually sends, and it contains
write:security:jiraandread:security:jira. - The URL is correct. It’s exactly
/rest/security/1.0/linkedWorkspaces/bulk, no trailing slash and no encoding.
The API documentation also explicitly states that “these APIs are available to Forge apps with the devops:securityInfoProvider module”, and lists no Forge-specific restriction on the linkedWorkspaces endpoints, so as far as I can tell this should work from Forge.
Because linking fails, Jira never learns about my workspace, so it never calls my callbacks (fetchWorkspaces / searchContainers). The provider just stays on “Set up” in the Security tab and never moves forward.
I put a minimal app that reproduces this here: EnduIf/forge-securityinfoprovider-401-repro
My questions:
- Is this a known limitation while the
devops:securityInfoProvidermodule is in preview? - If a Forge app can’t call
linkedWorkspaces, how is it supposed to link its workspace so Jira starts calling it back? Is there another way I’m missing?
Thanks!