GitHub Upstream Auth
This guide shows you how to create a GitHub OAuth application for use with Easy OIDC.
Prerequisites
- A GitHub account (personal or organization)
- Admin access to create OAuth applications
Step 1: Create a GitHub OAuth App
- Go to GitHub Settings
- In the left sidebar, click OAuth Apps
- Click New OAuth App (or Register a new application)
Step 2: Configure the OAuth App
Fill in the application details:
- Application name:
Easy OIDC - Homepage URL:
https://auth.example.com- Replace
auth.example.comwith your actual OIDC hostname
- Replace
- Application description (optional):
OIDC provider for Kubernetes authentication - Authorization callback URL:
https://auth.example.com/callback/github- Replace
auth.example.comwith your actual OIDC hostname
- Replace
Click Register application.
Step 3: Generate a Client Secret
After creating the OAuth app, GitHub will show you the Client ID.
- Click Generate a new client secret
- Copy the generated secret immediately—you won’t be able to see it again
You should now have:
- Client ID:
Iv1.abc123def456 - Client Secret:
abc123def456789...(long string)
Important: Copy these values now—you’ll need them in the next step.
Step 4: Store Credentials in AWS Secrets Manager
Use the AWS CLI to store your GitHub OAuth credentials:
aws secretsmanager create-secret \
--name easy-oidc-connector-secret \
--secret-string '{
"client_id": "Iv1.abc123def456",
"client_secret": "abc123def456789..."
}'Replace the client_id and client_secret values with your actual credentials from Step 3.
Organization OAuth Apps (Alternative)
If you’re using GitHub Organizations, you can create an organization-owned OAuth app:
- Go to your organization:
https://github.com/organizations/YOUR_ORG/settings/applications - Click OAuth Apps → New OAuth App
- Follow the same configuration steps as above
Organization OAuth apps are recommended for teams, as they provide better access control and audit logging.
GitHub Enterprise
If you’re using GitHub Enterprise Server (self-hosted):
- Follow the same OAuth app creation steps on your GitHub Enterprise instance
- When configuring Easy OIDC via Terraform, specify your GitHub Enterprise hostname:
module "easy_oidc" {
source = "easy-oidc/easy-oidc/aws"
# ... other config ...
connector_type = "github"
connector_github_hostname = "github.yourcompany.com"
}Verification
To verify your OAuth app is configured correctly:
- Note your callback URL:
https://auth.example.com/callback/github - After deploying Easy OIDC (see Deploy to AWS), test authentication:
kubectl oidc-login setup \
--oidc-issuer-url=https://auth.example.com \
--oidc-client-id=kubelogin-prod \
--oidc-use-pkceYou should be redirected to GitHub’s authorization page.
Important Notes
Email Privacy: If users have enabled email privacy in their GitHub settings, their primary email may not be accessible. Easy OIDC uses the primary verified email from GitHub for authentication.
Group Mappings: GitHub’s OAuth flow doesn’t provide organization/team membership by default. Easy OIDC requires you to configure static group mappings (see Configuration Reference).