Skip to content

Org definition using incorrect case can silently fail to pull github groups. #2499

@fivovic

Description

@fivovic

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

v2.30.0-dirty

Storage Type

Kubernetes

Installation Type

Custom Helm chart

Expected Behavior

A warning would be logged if the defined org within the github connector does not match the case used in the login name (as returned by the github api).

Actual Behavior

Defining A1Example in the config when the org name is a1example will allow successful authentication but with an empty group list, and subsequently fail to apply any group specific access policies.

Steps To Reproduce

No response

Additional Information

This was discovered using dex bundled within the following helm chart:
https://artifacthub.io/packages/helm/argo/argo-cd/3.29.5#dex

Configuration

argo-cd:
  server:
    configEnabled: true
    config:
      url: https://argo.a1example.com
      dex.config: |-
        connectors:
        - type: github
          id: github
          name: GitHub
          config:
            clientID: $GITHUB_CLIENT_ID
            clientSecret: $GITHUB_CLIENT_SECRET
            orgs:
            - name: A1Example

Logs

Correct case:
`time="2022-04-26T15:02:55Z" level=info msg="login successful: connector \"github\", username=\"Fil Ivovic\", preferred_username=\"fivovic\", email=\"f.ivovic@a1example.co.uk\", groups=[\"a1example:admins\"]"`

Incorrect case:
`time="2022-04-26T15:02:55Z" level=info msg="login successful: connector \"github\", username=\"Fil Ivovic\", preferred_username=\"fivovic\", email=\"f.ivovic@a1example.co.uk\", groups=[]"`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions