Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-2249

SCM Auth provider does not support custom host configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.8.0
    • 1.6.0
    • Authentication, Security
    • None
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      = Fixed SCM integration failures for self-hosted enterprise SCM providers

      Previously, SCM integration failed for self-hosted enterprise SCM providers because the system could not identify the configured host. This resulted in a _No auth provider available_ error. With this release, the SCM integration now correctly uses the configured authentication provider for the corresponding enterprise host. As a result, end users can now successfully perform actions requiring enterprise SCM access.
      Show
      = Fixed SCM integration failures for self-hosted enterprise SCM providers Previously, SCM integration failed for self-hosted enterprise SCM providers because the system could not identify the configured host. This resulted in a _No auth provider available_ error. With this release, the SCM integration now correctly uses the configured authentication provider for the corresponding enterprise host. As a result, end users can now successfully perform actions requiring enterprise SCM access.
    • Bug Fix
    • Done

      Description of problem:

      When attempting to create a PR in a GitHub Enterprise repo via the “Register Existing Component” flow, it fails with an error stating that no auth provider is available for the enterprise host, despite the host being correctly configured in `integrations.github`.

      Fix: We would have to read the configs here, and instead of calling ScmAuth.createDefaultApiFactory(), we would need to create a custom API factory for SCM auth like this (and pass in the host config)

      Steps to Reproduce

      1. Configure GitHub Enterprise integration in app-config
      2. Register existing component
      3. Try to register a GitHub repo that does not have an existing catalog-info.yaml
      4. The catalog import plugin will try to create a catalog-info.yaml and create a PR in the repo, but error will occur here because the SCM auth provider for the enterprise host does not exist

      Actual results:

      `No auth provider available for https://github-\

      {enterprise_host_url}

      ', see https://backstage.io/link?scm-auth`
       

      Expected results:

      The enterprise host configs should be used to create the required SCM auth provider

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

              rh-ee-jhe Jessica He
              rh-ee-jhe Jessica He
              RHIDP - Security
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: