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

[janus-idp/backstage-showcase] Github auth is requested even if we chose as auth provider: guest

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 1.2
    • Authentication
    • 5
    • False
    • Hide

      None

      Show
      None
    • False

      [2285725107] Upstream Reporter: Charles Moulliard
      Upstream issue status: Open
      Upstream description:

      Describe the bug

      There is an auth issue as backstage requires to be authenticated using Github when we open the Component view - see screenshot.

      Expected Behavior

      No github auth should be requested

      What are the steps to reproduce this bug?

      git clone https://github.com/janus-idp/backstage-showcase; cd backstage-showcase 
      yarn install
      yarn export-dynamic -- -- --dev
      mkdir dynamic-plugins-root/_notused
      cd dynamic-plugins-root
      mv backstage-plugin-azure-devops _notused
      mv backstage-plugin-azure-devops-backend-dynamic _notused
      mv backstage-plugin-scaffolder-backend-module-azure-dynamic _notused
      • Create the app-config.local.yaml file using the following code Remark: Replace the xxxxxxxxxxxxx with your Github Access token.
      cat <<EOF > app-config.local.yaml
      organization:
        name: Quarkus Org
      
      integrations:
        gitlab:
          - host: gitlab.com
        github:
          - host: github.com
            token: xxxxxxxxxxxxx
      
      proxy:
        skipInvalidProxies: true
        endpoints:
          '/argocd/api':
            target: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/api/v1/
            changeOrigin: true
            secure: false
            headers:
              Cookie:
                $env: "argocd.token=eyJhbGciOiJIUz..EktDnyZbQA="
      
      auth:
        environment: development
        providers:
          guest: {}
      
      catalog:
        import:
          entityFilename: catalog-info.yaml
        rules:
          - allow: [Template,Location,Component,System,Resource,User,Group,Api]
        locations:
          - type: url
            target: https://github.com/ch007m/qshift-templates/blob/static-lists/qshift/all.yaml
            rules:
              - allow: [Template,Location,Component,System,Resource,User,Group,Api]
      
        providers:
          ocm:
            env:
              kubernetesPluginRef: ocp-qshift
      
      argocd:
        baseUrl: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev
        username: admin
        password: hU5ksdnFxK1qiH9gflR6jZIbz7BGQDEX
        appLocatorMethods:
          - type: config
            instances:
              - name: argocdQShift
                url: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev
      
      kubernetes:
        serviceLocatorMethod:
          type: 'multiTenant'
        clusterLocatorMethods:
          - type: 'config'
            clusters:
              - url: https://api.qshift.snowdrop.dev:6443 # https://kubernetes.default.svc
                name: ocp-qshift
                skipTLSVerify: true
                authProvider: 'serviceAccount'
                skipMetricsLookup: true
                serviceAccountToken: eyJhbGciOiJ...JZ0JU3GHV00--Eqp0xNi6Xv9Ih8ucTkQw2vnBm20
      customResources:
          - group: 'tekton.dev'
            apiVersion: 'v1'
            plural: 'pipelineruns'
          - group: 'tekton.dev'
            apiVersion: 'v1'
            plural: 'taskruns'
          - apiVersion: 'v1'
            group: 'route.openshift.io'
            plural: 'routes'
        
      ## Content hereafter is coming from the file: app-config.dynamic-plugins.yaml
      dynamicPlugins:
        frontend:
          backstage.plugin-azure-devops:
            mountPoints:
              - mountPoint: entity.page.ci/cards
                importName: EntityAzurePipelinesContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isAzureDevOpsAvailable
              - mountPoint: entity.page.pull-requests/cards
                importName: EntityAzurePullRequestsContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isAzureDevOpsAvailable
          backstage.plugin-dynatrace:
            mountPoints:
              - mountPoint: entity.page.monitoring/cards
                importName: DynatraceTab
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isDynatraceAvailable
          backstage.plugin-github-actions:
            mountPoints:
              - mountPoint: entity.page.ci/cards
                importName: EntityGithubActionsContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isGithubActionsAvailable
          backstage.plugin-github-issues:
            mountPoints:
              - mountPoint: entity.page.issues/cards
                importName: GithubIssuesCard
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - hasAnnotation: github.com/project-slug
          backstage.plugin-jenkins:
            mountPoints:
              - mountPoint: entity.page.ci/cards
                importName: EntityJenkinsContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isJenkinsAvailable
          backstage.plugin-kubernetes:
            mountPoints:
              - mountPoint: entity.page.kubernetes/cards
                importName: EntityKubernetesContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    anyOf:
                      - hasAnnotation: backstage.io/kubernetes-id
                      - hasAnnotation: backstage.io/kubernetes-namespace
          backstage.plugin-lighthouse:
            appIcons:
              - name: lighthouse
                importName: LighthouseIcon
            dynamicRoutes:
              - path: /lighthouse
                importName: LighthousePage
                menuItem:
                  icon: lighthouse
                  text: Lighthouse
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityLastLighthouseAuditCard
                config:
                  layout:
                    gridColumnEnd:
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isLighthouseAvailable
          pagerduty.backstage-plugin:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityPagerDutyCard
                config:
                  layout:
                    gridColumnEnd:
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isPluginApplicableToEntity
          backstage.plugin-sonarqube:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntitySonarQubeCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isSonarQubeAvailable
          immobiliarelabs.backstage-plugin-gitlab:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityGitlabMergeRequestStatsCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isGitlabAvailable
              - mountPoint: entity.page.ci/cards
                importName: EntityGitlabPipelinesTable
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isGitlabAvailable
              - mountPoint: entity.page.issues/cards
                importName: EntityGitlabIssuesTable
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isGitlabAvailable
              - mountPoint: entity.page.pull-requests/cards
                importName: EntityGitlabMergeRequestsTable
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isGitlabAvailable
          janus-idp.backstage-plugin-acr:
            mountPoints:
              - mountPoint: entity.page.image-registry/cards
                importName: AcrPage
                config:
                  layout:
                    gridColumn: 1 / -1
                  if:
                    anyOf:
                    - isAcrAvailable
          janus-idp.backstage-plugin-jfrog-artifactory:
            mountPoints:
              - mountPoint: entity.page.image-registry/cards
                importName: JfrogArtifactoryPage
                config:
                  layout:
                    gridColumn: 1 / -1
                  if:
                    anyOf:
                    - isJfrogArtifactoryAvailable
          janus-idp.backstage-plugin-nexus-repository-manager:
            mountPoints:
              - mountPoint: entity.page.image-registry/cards
                importName: NexusRepositoryManagerPage
                config:
                  layout:
                    gridColumn: 1 / -1
                  if:
                    anyOf:
                    - isNexusRepositoryManagerAvailable
          janus-idp.backstage-plugin-ocm:
            appIcons:
              - name: ocmIcon
                importName: OcmIcon
            dynamicRoutes:
              - path: /ocm
                importName: OcmPage
                menuItem:
                  icon: ocmIcon
                  text: Clusters
            mountPoints:
              - mountPoint: entity.page.overview/context
                importName: ClusterContextProvider
              - mountPoint: entity.page.overview/cards
                importName: ClusterAvailableResourceCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                    - isKind: resource
                    - isType: kubernetes-cluster
              - mountPoint: entity.page.overview/cards
                importName: ClusterInfoCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                    - isKind: resource
                    - isType: kubernetes-cluster
          janus-idp.backstage-plugin-quay:
            mountPoints:
              - mountPoint: entity.page.image-registry/cards
                importName: QuayPage
                config:
                  layout:
                    gridColumn: 1 / -1
                  if:
                    anyOf:
                    - isQuayAvailable
          janus-idp.backstage-plugin-tekton:
            mountPoints:
              - mountPoint: entity.page.ci/cards
                importName: TektonCI
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isTektonCIAvailable
          janus-idp.backstage-plugin-topology:
            mountPoints:
              - mountPoint: entity.page.topology/cards
                importName: TopologyPage
                config:
                  layout:
                    gridColumn: "1 / -1"
                    height: 75vh
                  if:
                    anyOf:
                      - hasAnnotation: backstage.io/kubernetes-id
                      - hasAnnotation: backstage.io/kubernetes-namespace
          roadiehq.backstage-plugin-argo-cd:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityArgoCDOverviewCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 8"
                      xs: "span 12"
                  if:
                    allOf:
                      - isArgocdAvailable
              - mountPoint: entity.page.cd/cards
                importName: EntityArgoCDHistoryCard
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isArgocdAvailable
          roadiehq.backstage-plugin-datadog:
            mountPoints:
              - mountPoint: entity.page.monitoring/cards
                importName: EntityDatadogContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isDatadogAvailable
          roadiehq.backstage-plugin-github-insights:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityGithubInsightsComplianceCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isGithubInsightsAvailable
          roadiehq.backstage-plugin-github-pull-requests:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityGithubPullRequestsOverviewCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isGithubPullRequestsAvailable
              - mountPoint: entity.page.pull-requests/cards
                importName: EntityGithubPullRequestsContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isGithubPullRequestsAvailable
          roadiehq.backstage-plugin-jira:
            mountPoints:
              - mountPoint: entity.page.issues/cards
                importName: EntityJiraOverviewCard
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isJiraAvailable
          roadiehq.backstage-plugin-security-insights:
            mountPoints:
              - mountPoint: entity.page.overview/cards
                importName: EntityDependabotAlertsCard
                config:
                  layout:
                    gridColumnEnd:
                      lg: "span 4"
                      md: "span 6"
                      xs: "span 12"
                  if:
                    allOf:
                      - isSecurityInsightsAvailable
          backstage.plugin-techdocs:
            routeBindings:
              targets:
                - importName: techdocsPlugin
              bindings:
                - bindTarget: catalogPlugin.externalRoutes
                  bindMap:
                    viewTechDoc: techdocsPlugin.routes.docRoot
                - bindTarget: scaffolderPlugin.externalRoutes
                  bindMap:
                    viewTechDoc: techdocsPlugin.routes.docRoot
            dynamicRoutes:
              - path: /docs
                importName: TechDocsIndexPage
                menuItem:
                  icon: docs
                  text: Docs
              - path: /docs/:namespace/:kind/:name/*
                importName: TechDocsReaderPage
            mountPoints:
              - mountPoint: entity.page.docs/cards
                importName: EntityTechdocsContent
                config:
                  layout:
                    gridColumn: "1 / -1"
                  if:
                    allOf:
                      - isTechDocsAvailable
              - mountPoint: search.page.results
                importName: TechDocsSearchResultListItem
              - mountPoint: search.page.filters
                importName: TechdocsSearchFilter
              - mountPoint: search.page.types
                importName: techdocsSearchType
                config:
                  props:
                    name: Documentation
                    icon: docs
          backstage.plugin-tech-radar:
            apiFactories:
              - importName: TechRadarApi
            appIcons:
              - name: techRadar
                importName: TechRadarIcon
            dynamicRoutes:
              - path: /tech-radar
                importName: TechRadarPage
                menuItem:
                  icon: techRadar
                  text: Tech Radar
                config:
                  props:
                    width: 1500
                    height: 800
          janus-idp.backstage-plugin-analytics-provider-segment:
            apiFactories:
              - importName: SegmentAnalyticsApi
      EOF
      • Launch backstage front and backend using:
      export NODE_OPTIONS=--no-node-snapshot
      yarn start

      Screenshot 2024-05-08 at 09 44 08

      Versions of software used and environment


      Upstream URL: https://github.com/janus-idp/backstage-showcase/issues/1243

              Unassigned Unassigned
              upstream-sync Upstream Sync
              RHIDP - Frontend Plugins & UI
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: