Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use slug in GitHub dex config #82

Merged
merged 4 commits into from
Sep 14, 2023
Merged

Conversation

mogottsch
Copy link
Contributor

@mogottsch mogottsch commented Sep 12, 2023

This PR updates the default GitHub connector config to include teamNameField: slug.
See the dex docs for details.

As the only team we are currently using is giantswarm-admins, whose name and slug are equal, this won't have any effect.

Towards giantswarm/roadmap#1205

Note

I've also changed the yaml marshalling. The config is converted to JSON first, so that the json annotations on the config struct are actually used and not just a lower-case representation of the key's name.

before:

- type: github
  id: giantswarm-github
  name: Github for Giant Swarm
  config:
    org: ""
    orgs:
      - name: giantswarm
        teams:
          - giantswarm-admins
    hostname: ""
    rootca: ""
    teamnamefield: ""

after:

- type: github
  id: giantswarm-github
  name: Github for Giant Swarm
  config:
    hostName: ""
    org: ""
    orgs:
      - name: giantswarm
        teams:
          - giantswarm-admins
    rootCA: ""
    teamNameField: slug

@mogottsch mogottsch marked this pull request as ready for review September 12, 2023 12:06
@mogottsch mogottsch requested a review from a team as a code owner September 12, 2023 12:06
Copy link
Contributor

@vvondruska vvondruska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Personally I am not aware of any other way to marshal YAML using JSON tags.

@mogottsch mogottsch merged commit f02ad1b into main Sep 14, 2023
@mogottsch mogottsch deleted the use-slug-in-github-dex-config branch September 14, 2023 07:39
@renovate renovate bot mentioned this pull request Nov 9, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants