AP.context.getToken doesn't work for certain module types

It looks like AP.context.getToken doesn’t work from workflow extension configuration pages (e.g. workflow validator configuration pages). When you can AP.context.getToken from such a page, it logs an error in the browser console:
ACJS: content resolver failed to get context jwt token
and on the Network tab, it shows that the HTTP call that it makes to the Jira instance fails with a 404 error for this request:
https://jmwe-dev-local.atlassian.net/plugins/servlet/ac/com.innovalog.mwec/LinkedIssuesValidator

This is a blocker for us, as this means we cannot get a fresh JWT token from our configuration pages, which forces us to use the initial JWT token and significantly increase the token TTL, which is a major security issue.

We haven’t checked all module types yet, but I think Atlassian should test them all - and fix them all!

@dmorrow can you please look into this?

Thanks,
David

2 Likes

I have created https://ecosystem.atlassian.net/browse/ACJIRA-2176 for this.

Hi @david2,

I have brought this to the attention of the Jira Cloud ecosystem team so hopefully they might be able to address this.

As a side note, when we introduced cacheable app iframes, we didn’t document the locations that support the context module. I’ve created https://ecosystem.atlassian.net/browse/ACJS-1141 to fix this.

Regards,
Dugald