Google Upstream Auth
This guide connects Google as a sign-in provider. Google verifies the user’s Google account; Truster then decides whether to accept that identity and what downstream identity and groups to issue.
Prerequisites
- A Google account (Google Workspace or personal Gmail)
- Admin access to create OAuth applications
1. Create a Google project
- Go to the Google Cloud Console
- Click Select a project → New Project
- Enter a project name (e.g.,
truster) - Click Create
2. Configure the OAuth consent screen
- In the Google Cloud Console, navigate to APIs & Services → OAuth consent screen
- Select Internal if you have a Google Workspace account (recommended), or External for personal Gmail
- Click Create
- Fill in the required fields:
- App name:
Truster - User support email: Your email address
- Developer contact information: Your email address
- App name:
- Click Save and Continue
- On the Scopes page, click Add or Remove Scopes
- Select the following scopes:
openidemailprofile
- Click Update → Save and Continue
- Review and click Back to Dashboard
3. Create OAuth credentials
- Navigate to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Select Application type: Web application
- Enter a Name:
Truster - Under Authorized redirect URIs, click Add URI
- Add the callback URL:
https://auth.example.com/callback/google- Replace
auth.example.comwith your actual OIDC hostname - Replace
googlewhen your configured connector ID is different
- Replace
- Click Create
The callback URL is where Google returns the browser after sign-in. It must exactly match the public Truster URL and connector ID.
4. Store the client ID and secret
Google displays two credentials:
- Client ID:
123456789-abcdefghijklmnop.apps.googleusercontent.com - Client Secret:
GOCSPX-xxxxxxxxxxxxxxxxxxxx
The client ID identifies Truster to Google. The client secret proves that Truster is that registered application, so 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.
Optional: Hint a Google Workspace Domain
If you’re using Google Workspace, you can hint your organization’s domain in Google’s account chooser:
- Set
google.hdon that connector:
"user_login_connectors": {
"google": {
"type": "google",
"display_name": "Google",
"credentials_secret": "truster-google-credentials",
"google": {"hd": "example.com"}
}
}The hd setting only improves Google’s account chooser; it is not an access
control. Google confirms the account, but Truster’s policy determines whether
to accept it. Configure allowed users and groups in the configuration
reference.
Disabling this connector blocks Google sign-in through this route, but does not necessarily block the same person or email address through another enabled connector.
Verification
To verify your OAuth app is configured correctly:
- Note your redirect URI:
https://auth.example.com/callback/google(replacegooglewith 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 Google’s login page.