Enable PKCE for OAuth token exchange
How to add PKCE to your custom identity provider's OAuth token exchange with Chainguard, either alongside a client …
For the complete documentation index, see llms.txt.
Rather than using chainctl, you can manage your organization’s custom identity provider (IdP) from the Chainguard Console. The Console lets you create, update, and delete the identity provider, map IdP groups to Chainguard roles, and set up SCIM provisioning.
The Console manages one identity provider per organization. If you need more than one, or want to script these tasks, use the chainctl iam identity-providers commands instead.
To follow this guide, you need the following:
owner role. Setting up SCIM also requires the identity_providers.scim.manage capability. Without the required capability, the Console shows the matching buttons as unavailable.The Identity Provider page has three tabs:
| Field | Required | Description |
|---|---|---|
| Name | Yes | A name for the identity provider, up to 64 characters. It can contain lowercase letters, numbers, spaces, periods, hyphens, and underscores. |
| Description | No | Further context on the identity provider. |
| Issuer | Yes | The issuer URL of your identity provider. |
| Client ID | Yes | The client ID of the OIDC application. |
| Client secret | Yes | The client secret of the OIDC application. |
| Default role | Yes | The role that users who log in through this identity provider receive by default, such as viewer. For more about this choice, refer to IAM and security. |
| Scopes | Yes | The scopes Chainguard requests from your identity provider. The form requires openid and email. |
| Correlation rule | Yes | How Chainguard matches logins to users provisioned with SCIM. Keep the default, Subject (sub = externalId), unless your identity provider is Microsoft Entra ID, in which case choose Microsoft Entra ID (oid = externalId) and add the profile scope. You can’t change this value after you create the identity provider. |
| Enable group-based role mapping | No | Select this to grant roles based on your users’ IdP groups. Selecting it shows the Groups claim field. |
| Groups claim | Conditional | Required if you selected Enable group-based role mapping. The name of the token claim in which your identity provider sends group memberships, such as groups. |
When you select Enable group-based role mapping, the Console adds the groups scope to Scopes. Microsoft Entra ID rejects that scope, so the Console doesn’t add it when your issuer is an Entra ID URL, and it blocks the form if you add it yourself. Entra ID sends the groups claim without the scope.
After you create the identity provider, users can log in with it. Refer to Authenticate with chainctl and Authenticate with the Chainguard Console. The Console doesn’t display the identity provider’s ID, which chainctl auth login --identity-provider requires. To find the ID, run chainctl iam identity-providers list. If your organization is verified, users can log in with the organization name instead.
The Client secret field is empty when the form opens, because Chainguard doesn’t display the existing secret. Leave it empty to keep the current secret. To rotate the secret, enter the new value.
If the identity provider uses Microsoft Entra ID and its scopes include groups, the form shows a warning and blocks Update until you remove groups from Scopes.
Group mappings grant Chainguard roles to users based on the groups your identity provider sends. Before you create mappings, configure your identity provider to send a groups claim, as described in the “Step 1: Emit group membership from your IdP” section of Grant Chainguard roles from identity provider groups. That guide also explains how mapped roles behave and how quickly changes take effect.
To turn on group mappings, update the identity provider: select Enable group-based role mapping and enter the Groups claim. Then open the Groups tab.
To grant a group more than one role, add one mapping for each role.
The Default Chainguard role card on the Groups tab sets the role for users who don’t match any group mapping. Select a role, or select No role to grant nothing to unmatched users. The Console saves the change right away.
To delete one mapping, hover over its row on the Groups tab, click the delete icon, type the group name to confirm, and click Delete group mapping. Users in that group stop receiving the role.
To delete every mapping for the identity provider, go to the IdP details tab and click Reset group mappings. Type reset mappings to confirm, and click Reset group mappings. Users then receive only the default role.
SCIM provisioning lets your identity provider create and deactivate users in Chainguard. Before you start, read Provision Chainguard users with SCIM, which explains how provisioning works and what it requires. In particular, your organization needs an owner who can log in and whose owner role is assigned directly, not through SCIM or a group mapping.
While SCIM is on, the identity provider’s default role is optional. Users without one get no role until a group mapping or role binding grants one.
If you think the token is exposed, click Revoke token on the SCIM syncing tab and confirm. Revoking immediately invalidates every SCIM token for the identity provider, including one still active from a rotation. Provisioning stops until you regenerate a token and enter it in your identity provider.
On the SCIM syncing tab, click Disable and confirm. Chainguard refuses provisioning requests until you click Enable again. Existing users, groups, and role assignments stay in place.
Deleting an identity provider stops provisioning from it and revokes access for anyone whose membership depends on it. You can’t undo the deletion. Before you delete it, make sure someone can still log in to your organization another way, such as with a backup account.
delete <idp_name> to confirm, replacing <idp_name> with the identity provider’s name.chainctl iam identity-providers referenceLast updated: 2026-10-21 08:48