GitHub Upstream Auth
This guide connects GitHub as a sign-in provider. GitHub verifies the user’s GitHub account; Truster then decides whether to accept that identity and what downstream identity and groups to issue.
Prerequisites
- A GitHub account (personal or organization)
- Admin access to create OAuth applications
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)
2. Configure the OAuth App
Fill in the application details:
- Application name:
Truster - 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
githubwhen your configured connector ID is different
- Replace
Click Register application.
The callback URL is where GitHub returns the browser after sign-in. It must exactly match the public Truster URL and connector ID.
3. Generate and store the credentials
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)
The client ID identifies Truster to GitHub. The client secret proves that Truster is that registered application; copy it immediately because GitHub does not show it again, and do not put it in source control. Store both values using the secret provider for your chosen deployment, then reference that credential from the connector. See the configuration reference and your deployment documentation.
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
- Set the hostname on that connector:
"user_login_connectors": {
"github": {
"type": "github",
"display_name": "GitHub Enterprise",
"credentials_secret": "truster-github-credentials",
"github": {"hostname": "github.yourcompany.com"}
}
}Verification
To verify your OAuth app is configured correctly:
- Note your callback URL:
https://auth.example.com/callback/github(replacegithubwith your connector ID) - After deploying Truster, test authentication:
kubectl oidc-login setup \
--oidc-issuer-url=https://auth.example.com \
--oidc-client-id=kubelogin-prod \
--oidc-pkce-method=S256You should be redirected to GitHub’s authorization page.
Important Notes
Email selection: Truster requests the account’s email list. If GitHub
returns more than one address, the user chooses which identity to use; primary
and verified status are shown rather than silently selecting an address. An
unverified selection is subject to the configured email-verification policy.
GitHub-generated users.noreply addresses are excluded because they cannot
receive verification codes.
Identity acceptance: GitHub confirms the account and email information, but Truster’s policy determines whether to accept it and which downstream groups to issue. GitHub’s OAuth flow does not provide organization/team membership by default, so configure group mappings explicitly. Disabling this connector does not necessarily block the same person or email address through another enabled connector. See the configuration reference.