Skip to content

Support Multiple GitHub OAuth Providers #15457

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

Open
3 tasks
matifali opened this issue Nov 8, 2024 · 0 comments
Open
3 tasks

Support Multiple GitHub OAuth Providers #15457

matifali opened this issue Nov 8, 2024 · 0 comments
Labels
multi-org temporary label for multiple organizations related work

Comments

@matifali
Copy link
Member

matifali commented Nov 8, 2024

Problem Description

Coder currently supports only a single GitHub OAuth configuration, which limits flexibility for deployments involving multiple GitHub organizations, each needing distinct authentication settings. This limitation prevents different GitHub organizations from accessing the same Coder deployment while maintaining unique authentication policies.

For example, an organization might use GitHub.com for open-source work through a specific GitHub.com org, while internal developers working on proprietary tools authenticate through a separate GitHub Enterprise instance.

Desired Solution

Enable Coder to support multiple GitHub OAuth configurations, with each mapped to a different GitHub organization. This enhancement would allow users to authenticate through the appropriate provider based on their organization.

Implementation Requirements

  • Configuration:

    • Support multiple GitHub OAuth configurations by appending unique suffixes to each set of GitHub OAuth environment variables, e.g.:
      CODER_OAUTH2_GITHUB_CLIENT_ID_1="client-id-org1"
      CODER_OAUTH2_GITHUB_CLIENT_SECRET_1="secret-org1"
      CODER_OAUTH2_GITHUB_ALLOWED_ORGS_1="org1,org3"
      
      CODER_OAUTH2_GITHUB_CLIENT_ID_2="client-id-org2"
      CODER_OAUTH2_GITHUB_CLIENT_SECRET_2="secret-org2"
      CODER_OAUTH2_GITHUB_ALLOWED_ORGS_2="org2"
  • Login UI Update:

    • Update the login page to display each configured GitHub OAuth provider as a distinct option, allowing users to select the provider that corresponds to their organization.
  • Documentation:

    • Update setup documentation to include examples and instructions for configuring multiple GitHub OAuth providers and mapping each to a specific organization.

Related Issues:

@coder-labeler coder-labeler bot added the needs-triage Issue that require triage label Nov 8, 2024
@matifali matifali added multi-org temporary label for multiple organizations related work and removed needs-triage Issue that require triage labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multi-org temporary label for multiple organizations related work
Projects
None yet
Development

No branches or pull requests

1 participant