Connect app for Jira integration broken for gitlab.com

Behavior

Trying to authenticate against gitlab.com in the GitLab for Jira app is currently failing.

From: #359940 (comment 1219034059)

Today I tried again, but noticed that the UI changed and also the error changed. Today I'm getting this:

image

relevant errors

This is likely related to https://gitlab.com/gitlab-com/gl-infra/feature-flag-log/-/issues/16010

Analysis

Here's my thoughts:

  • there are a combination 3 states that an instance can be in based on feature flags
    • jira_connect_oauth => jira app instance uses oauth to hit the gitlab apis.
    • jira_connect_ouath_self_managed => for a self managed instance to configure an application id for the gitlab project, and respond to a request for (i'm not sure if it has other functions).
    • no feature flag => just use the iframe session? (legacy)
  • When the feature flags jira_connect_oauth and jira_connect_ouath_self_managed are enabled, we render the MultiVersion sign in from the jira app.
    • This renders a button that will try to fetch the oauth client id from the (self hosted?) instance at /-/jira_connect/oauth_application_id
      • if the gitlabBasePath prop is provided, it will try to reach out to /-/jira_connect/oauth_application_id otherwise it will use props to grab the client id.
        • gitlabBasePath appears to always be provided, by being set to either dotcom or the selfmanaged url
      • that endpoint (/-/jira_connect/oauth_application_id) only will get a response from instances that are not dotcom and have an application key.
Edited by Sean Gregory