I was wondering where this would go. Based on my understanding of rfc6749, Atlassian’s implementation of authorization code flow is non-standard. Specifically, the audience and prompt parameters are not in the spec. I have yet to find a good explanation for why those parameters are required when the docs say they only have 1 valid value.
That said, non-standard parameters are rather common in the world of OAuth and there is even an official registry for “bonus” parameters (which does include the ones Atlassian uses but for different authorization flows). Unfortunately, the Atlassian docs don’t have any clues how to handle extra parameters. But I wonder if it would work to put the extra parameters in the authorization path like (partial configuration only):
@ibuchanan To your question on how to path extra parameters to the authorization action, there is an option calledqueryParameters that allows you to pass in these additional parameters.
This is expected, Forge external authentication does not support Atlassian OAuth today. This is to ensure the scopes presented to the admin at app installation time reflect the scopes the app is ultimately requesting from app users. This restriction may be removed in future as we enhance admin controls around OAuth apps.
I don’t understand this. If I’m using oauth to access a separate oauth app - that doesn’t really use the same scopes. In my case I’m trying to build a confluence app that can access Jira (something that can’t be support by Forge today).
You’re not missing anything. To shed some light on why it’s currently disabled: OAuth apps today don’t go through an installation consent flow by admins as they’re not “installed into” sites.
With Forge user consent and external authentication, there’s not a clear distinction between the app asking for Forge scopes and the regular OAuth consent flow which ends up very confusing for users/admins. It’s very likely the Atlassian OAuth restriction will be removed from external authentication when we’re rolled out finer grain admin controls for OAuth apps or removed Forge user consent per We're removing the allow access prompt for Forge apps
Greetings folks, Does this mean I cannot use Bitbucket, Opsgenie etc. REST APIs in a Forge JIRA Custom UI app because of the lack of the Atlassian Oauth support?
Does this mean I cannot use Bitbucket, Opsgenie etc. REST APIs in a Forge JIRA Custom UI app because of the lack of the Atlassian Oauth support?
Not exactly. To my knowledge, Opsgenie does not have OAuth 2 so could not be reached using the external auth module. But that doesn’t rule out API tokens, which both Opsgenie and Bitbucket provide (Bitbucket calls them app tokens). Atlassian is aware this isn’t a great experience and does intend to better support cross-product apps; however, that intention is not really a plan yet so I don’t see any on the near-term horizon that will solve this problem as a Forge feature. In the meantime, your app would have to obtain API tokens.
I realize the cross-product topic is confusing so all questions are welcome. I would ask that folks create new threads to ask those questions. This one is specific to OAuth-based external auth so I’m locking it until/if Atlassian solves for the messaging that @zsims mentioned.