Identity Providers
Choose the Identity Provider people sign in with to a custom Zone: Okta, Auth0, Google, or any OpenID Connect provider
A new custom Zone has no sign-in until you select an Identity Provider for it. For the full setup with Okta, Microsoft Entra ID, Auth0, Google, PingOne or another OpenID Connect provider, follow Authenticate users with your identity provider. The steps below are a shorter version of the same setup. For end-to-end walkthroughs, see the tutorials for Okta, Microsoft Entra ID, Ping Identity, and Auth0.
Prerequisites
Section titled “Prerequisites”- A custom Zone, and the Manager Role on it. See Custom Zones.
- An identity provider that supports OpenID Connect and puts the person’s
emailin the ID token. Keycard doesn’t sign people in over SAML.
Connect an Identity Provider
Section titled “Connect an Identity Provider”-
Switch to the Zone and get its Redirect URL
- In Keycard Console, switch to the custom Zone, because Keycard creates a Provider in the Zone you’re in. If you aren’t already in it, go to Zones, open the ⋯ menu on the Zone’s card, and select Switch to zone
- Click Settings under Zone in the sidebar; on the Connection tab, copy the Redirect URL
- Keep this URL handy for the next step
-
Configure your identity provider
In Okta:
- Navigate to Applications → Create App Integration
- Select OIDC - OpenID Connect and Web Application
- Add the Redirect URL to Sign-in redirect URIs
- Keep the Authorization Code grant type. Sign-in doesn’t use Refresh Token
- Assign users to the application
- Note your Client ID and Client Secret. The Issuer URL is your Okta domain
In Keycard Console:
- In the Zone, open Providers and click Add Provider
- Enter a Name, such as “Okta”
- Enter Issuer URL:
https://<your-domain>.okta.com - Enter Client ID and Client Secret
- Click Create Provider
For the full walkthrough, see Connect Okta.
In Auth0:
- Navigate to Applications → Create Application
- Select Regular Web Application
- Add the Redirect URL to Allowed Callback URLs
- Note your Domain, Client ID, and Client Secret
In Keycard Console:
- In the Zone, open Providers and click Add Provider
- Enter a Name, such as “Auth0”
- Enter Issuer URL:
https://<your-tenant>.auth0.com/(include trailing/) - Enter Client ID and Client Secret
- Click Create Provider
For the full walkthrough, see Connect Auth0.
In Google Cloud Console:
- Navigate to APIs & Services → Credentials
- Create OAuth 2.0 Client ID (Web application)
- Add the Redirect URL to Authorized redirect URIs
- Note your Client ID and Client Secret
In Keycard Console:
- In the Zone, open Providers and click Add Provider
- Enter a Name, such as “Google”
- Enter Issuer URL:
https://accounts.google.com - Enter Client ID and Client Secret
- Click Create Provider
For any OpenID Connect provider whose ID token includes an
emailclaim:- Create a web application in your provider
- Add the Redirect URL to allowed redirect URIs
- Enable the Authorization Code grant type. Sign-in doesn’t use Refresh Token
- Make sure the application accepts PKCE and a client secret sent in the token request body (
client_secret_post). Keycard uses both - Note your provider’s issuer URL, client ID, and client secret
In Keycard Console:
- In the Zone, open Providers and click Add Provider
- Enter a Name and your provider’s Issuer URL
- Enter Client ID and Client Secret
- Click Create Provider
The Issuer URL must equal the provider’s
issuervalue character for character, including any trailing slash. To find it, open the issuer URL without its trailing slash, followed by/.well-known/openid-configuration(for examplehttps://<your-tenant>.auth0.com/.well-known/openid-configuration), and copy theissuervalue exactly. Keycard doesn’t check it when you save the Provider, so a mismatch shows up later, at sign-in. -
Select the identity provider for the zone
In Keycard Console:
- Still inside the Zone, open Settings
- Select the Settings tab
- In the Zone sign in configuration section, open the Identity Provider dropdown and select the provider you just configured
- Click Save Changes
Enable directory sync, below the Zone sign in configuration section, can be turned on once the Zone’s Identity Provider is saved. The Zone gets its own SCIM Base URL and sync tokens. Changing the Zone’s Identity Provider later makes those tokens stop working.
Send group claims
Section titled “Send group claims”Policies can read the groups claim your provider puts on the ID token, as context.subject_claims.groups. Most providers don’t send it until you ask. The claim is a snapshot of membership at sign-in: a change in the provider reaches policy only in sessions that start after the user signs in again. An agent that already holds a refresh token keeps the earlier groups; see What Keycard receives from your identity provider. For membership that policy reads on every request, use Keycard Groups instead; the policy owner treats the claim as legacy (see Groups versus the IdP groups claim).
-
Add the claim in your provider
In Okta, open the application’s Sign On tab, expand Advanced Settings, and under Group Claims click Edit:
Field Value Groups claim type Filter Groups claim filter Name: groups, Filter: Matches regex, Value:.*That sends every group. For production, narrow the regex to the groups Keycard needs. Other providers have an equivalent setting; Keycard reads the claim named
groups. -
Ask Keycard to request it
In Keycard Console, open Providers, select the provider, open Configuration, expand Advanced options, and add
groupsto Additional Scopes. Keycard then requests the claim at every sign-in. -
Sign in again
Users who are already signed in keep their old session until it ends. Have them sign out and back in, and the new session carries the claim. To try a rule against the claim before anyone signs in, use the Subject groups field in Run test.
Access Snowflake uses this setup end to end with an Okta data-analysts group.
Troubleshooting
Section titled “Troubleshooting”Sign-in fails with access_denied: no email address
- Keycard creates a User from the
emailclaim in the ID token and doesn’t read the provider’s userinfo endpoint. Without the claim, Keycard stops the sign-in withaccess_deniedand returns the error to the Application when it can. The error description reads “Identity provider did not supply an email address.” - Configure the provider to include
emailin the ID token, then have the User sign in again
OAuth flow fails or redirects to error page
- Verify the Redirect URL is correctly added to your identity provider
- Ensure your identity provider’s issuer URL is correct: open the issuer URL without its trailing slash, followed by
/.well-known/openid-configuration, and copy theissuervalue exactly, including any trailing slash - Check that users are assigned to the application in your identity provider
A policy that reads the groups claim never matches
- Confirm the provider sends a claim named
groupsand the user is in the group the rule names - Confirm
groupsis in the provider’s Additional Scopes in Keycard - Have the user sign out and in again; the claim is read at sign-in, so a membership change waits for the next session. An agent that connected before the change keeps the earlier groups for up to 90 days, because its refresh token keeps using the groups from sign-in. Disabling the person stops it; revoking a grant doesn’t.