Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Web API
    • Labels:
      None
    • Production Notes:
      None

      Description

      • GET
      • internal: yes
      • requires: authentication
      • response:
        {
         "alm_integration": {
            "installed": true,
            "installationUrl": "blablabl"
          }
        }
        
      • errors:
        • 400 if user is neither from github nor bitbucket cloud

      This WS must check whether an installation of the Github or BitBucket Cloud application exists for the team/organization whose name is equal to USERS.EXTERNAL_LOGIN.
      "installed" if populated according to the result of this test.
      "installationUrl" is always populated with the URL to install the Github or BitBucket Cloud application for the team/organization whose name is equal to USERS.EXTERNAL_LOGIN.

      Note for BitBucket Cloud

      • the redirectUrl parameter of the "instalationUrl" must point to the create project page on the current sonarqube instance (see SONAR-11061)

      Note for Github authentication plugin

      Current release of the Github Authentication plugin does not correctly populate the gitbub user id in DB. This is fixed by SQAUTHGITH-19. Therefor, MMF-1140 depends on the release and deployment of a new version of this plugin

      Note for BitBucket authentication plugin

      Current version (not released by deployed on SonarCloud) of the BitBucket Authentication plugin is populated the user's external id with the Atlassian account id, which is incorrect. Issue #15 has been reopened and fixed to populate the external user id with the BBC user UUID.

      Installation URL patterns

      • Github: https://github.com/apps/<app_slug>/installations/new/permissions?target_id=<organisation_id>
        • what we refer to as "personal organization" is actually a user at GitHub. Which means the id of the personal organization of a user is actually the user id (which we get from authentication)
      • BBC: https://bitbucket.org/site/addons/authorize?descriptor_uri=<descriptor_uri>&redirect_uri=<redirect_uri>&account=<team_key>
        • for the personal team of a user, the key is the same as the user's login on BitBucket Cloud
        • descriptor_uri and redirect_uri are mandatory
        • account is an undocumented parameter (which, therefor, can be changed and/or removed without notice)
        • until SONAR-11061 is done, we will use "/onboarding" as the redirect URI

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sebastien.lesaint Sebastien Lesaint
              Reporter:
              sebastien.lesaint Sebastien Lesaint
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: