Skip to content

Commit 0c10711

Browse files
ranbeldledfordcf
andauthored
[ZT] Custom OIDC claim details (#23293)
* Added steps to pass Entra OID through Access Found adding OID to ODIC claims is pretty simple but not really documented anywhere. Added steps to add these steps. * add custom oidc claim details * point other IdP guides to custom OIDC claims --------- Co-authored-by: dledfordcf <[email protected]>
1 parent 5ed518c commit 0c10711

File tree

10 files changed

+34
-14
lines changed

10 files changed

+34
-14
lines changed

src/content/docs/cloudflare-one/applications/configure-apps/saas-apps/generic-oidc-saas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ To add additional OIDC claims onto the ID token sent to your SaaS application, c
9696

9797
- **Name**: OIDC claim name
9898
- **Scope**: Select the OIDC scope where this claim should be included. In most cases, we recommend selecting `profile` since it already includes other custom claims from the IdP.
99-
- **IdP claim**: The identity provider value that should map to this OIDC claim. You can select any [SAML attribute](/cloudflare-one/identity/idp-integration/generic-saml/#saml-headers-and-attributes) or [OIDC claim](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that was configured in a Zero Trust IdP integration.
99+
- **IdP claim**: The identity provider value that should map to this OIDC claim. You can select any [SAML attribute](/cloudflare-one/identity/idp-integration/generic-saml/#saml-headers-and-attributes) or [OIDC claim](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that was configured in a Zero Trust IdP integration.
100100
- **Required**: If a claim is marked as required but is not provided by an IdP, Cloudflare will fail the authentication request and show an error page.
101101
- **Add per IdP claim**: (Optional) If you turned on multiple identity providers for the SaaS application, you can choose different attribute mappings for each IdP. These values will override the parent **IdP claim**.
102102

src/content/docs/cloudflare-one/applications/configure-apps/saas-apps/generic-saml-saas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To send additional SAML attributes to your SaaS application, configure the follo
9999
- `Unspecified`: (default) No specific format required.
100100
- `URI`: Name is in a format such as `urn:ietf:params:scim:schemas:core:2.0:User:userName` or `urn:oid:2.5.4.42`.
101101
- `Basic`: Name is a normal string such as `userName`.
102-
- **IdP claim**: The identity provider value that should map to this SAML attribute. You can select any [SAML attribute](/cloudflare-one/identity/idp-integration/generic-saml/#saml-headers-and-attributes) or [OIDC claim](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that was configured in a Zero Trust IdP integration.
102+
- **IdP claim**: The identity provider value that should map to this SAML attribute. You can select any [SAML attribute](/cloudflare-one/identity/idp-integration/generic-saml/#saml-headers-and-attributes) or [OIDC claim](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that was configured in a Zero Trust IdP integration.
103103
- **Required**: If an attribute is marked as required but is not provided by an IdP, Cloudflare will fail the authentication request and show an error page.
104104
- **Add per IdP claim**: (Optional) If you turned on multiple identity providers for the SaaS application, you can choose different attribute mappings for each IdP. These values will override the parent **IdP claim**.
105105

src/content/docs/cloudflare-one/identity/idp-integration/awscognito-oidc.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ To retrieve those values:
7979

8080
5. (Optional) Enable [Proof of Key Exchange (PKCE)](https://www.oauth.com/oauth2-servers/pkce/) if the protocol is supported by your IdP. PKCE will be performed on all login attempts.
8181

82-
6. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that you wish to add to users' identity. This information will be available in the [user identity endpoint](/cloudflare-one/identity/authorization-cookie/application-token/#user-identity).
82+
6. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that you wish to add to users' identity.
8383

8484
7. Select **Save**.
8585

src/content/docs/cloudflare-one/identity/idp-integration/centrify.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ Centrify secures access to infrastructure, DevOps, cloud, and other modern enter
6666

6767
4. (Optional) To enable SCIM, refer to [Synchronize users and groups](/cloudflare-one/identity/idp-integration/generic-oidc/#synchronize-users-and-groups).
6868

69-
5. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that you wish to add to your users' identity. This information will be available in the [user identity endpoint](/cloudflare-one/identity/authorization-cookie/application-token/#user-identity).
70-
69+
5. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that you wish to add to your users' identity.
7170
6. Select **Save**.
7271

7372
To test that your connection is working, go to **Authentication** > **Login methods** and select **Test** next to the login method you want to test.

src/content/docs/cloudflare-one/identity/idp-integration/entra-id.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ More narrow permissions may be used, however this is the set of permissions that
110110
- **Entra ID Policy Sync**: Refer to our [Entra ID Conditional Access tutorial](/cloudflare-one/tutorials/entra-id-conditional-access/).
111111
- **Enable SCIM**: Refer to [Synchronize users and groups](#synchronize-users-and-groups).
112112
- **Email claim**: Enter the Entra ID claim that you wish to use for user identification (for example, `preferred_username`).
113-
- **OIDC Claims**: Enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that you wish to add to your users' identity. This information will be available in the [user identity endpoint](/cloudflare-one/identity/authorization-cookie/application-token/#user-identity).
113+
- **OIDC Claims**: Enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that you wish to add to your users' identity.
114114

115115
</TabItem> <TabItem label="API">
116116

@@ -165,6 +165,10 @@ To receive an email claim in the `id_token` from Microsoft Entra, you must:
165165
3. If you gave your email claim another name than `email`, you must update your configuration in the Cloudflare dashboard. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Authentication** > **Azure AD** > **Edit**.
166166
4. Under **Optional configurations** > **Email claim**, enter the name of the claim representing your organization's email addresses.
167167

168+
#### Object ID
169+
170+
If you are concerned that users' emails or UPNs may change, you can pass the user's object ID (`oid`) from Microsoft Entra to Cloudflare Access. To configure Access to receive the object ID, refer to [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims). No additional configuration is required in Microsoft Entra.
171+
168172
## Synchronize users and groups
169173

170174
The Microsoft Entra ID integration allows you to synchronize IdP groups and automatically deprovision users using [SCIM](/cloudflare-one/identity/users/scim/).
@@ -308,4 +312,4 @@ You can require users to re-enter their credentials into Entra ID whenever they
308312
code = {{
309313
mark: [16]
310314
}}
311-
/>
315+
/>

src/content/docs/cloudflare-one/identity/idp-integration/generic-oidc.mdx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,26 @@ If you would like to build policies based on IdP groups:
135135

136136
## Optional configurations
137137

138-
### OIDC claims
138+
### Custom OIDC claims
139139

140-
OIDC integrations support the use of custom OIDC claims. Custom OIDC claims can be referenced in [Access policies](/cloudflare-one/policies/access/), offering a means to control user access based on these specific attributes. Custom OIDC claims are not currently supported in Gateway policies.
140+
All OIDC IdP integrations support the use of custom OIDC claims. Once configured, Access will add the claims to the [Access JWT](/cloudflare-one/identity/authorization-cookie/application-token/) for consumption by your origin services. You can reference the custom OIDC claims in [Access policies](/cloudflare-one/policies/access/), offering a means to control user access to applications based on custom identity attributes. Custom OIDC claims are not currently supported in Gateway policies.
141+
142+
To add a custom OIDC claim to an IdP integration:
143+
144+
1. In your identity provider, ensure that the custom claim is included in your OIDC ID token.
145+
2. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Authentication**.
146+
3. Under **Login methods**, find your identity provider and select **Edit**.
147+
4. Under **OIDC Claims**, enter the name of your custom claim (for example, `oid`).
148+
5. Select **Save**.
149+
6. Select **Test** and verify that the custom claim appears in `oidc_fields`. For example,
150+
151+
```json
152+
"oidc_fields": {
153+
"oid": "54eb1ed2-7150-44e6-bbe4-ead24c132fd4"
154+
},
155+
```
156+
157+
You can now build an Access policy for the custom claim using the **OIDC Claim** or **IdP OIDC Claim** selector. The custom claim will also be passed to origins behind Access in a [JWT](/cloudflare-one/identity/authorization-cookie/application-token/#custom-saml-attributes-and-oidc-claims).
141158

142159
#### Email claim
143160

src/content/docs/cloudflare-one/identity/idp-integration/google-workspace.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ You do not need to be a Google Cloud Platform user to integrate Google Workspace
8585

8686
4. (Optional) Enable [Proof of Key Exchange (PKCE)](https://www.oauth.com/oauth2-servers/pkce/). PKCE will be performed on all login attempts.
8787

88-
5. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that you wish to add to your Access [application token](/cloudflare-one/identity/authorization-cookie/application-token/).
88+
5. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that you wish to add to your user's identity.
8989

9090
6. Select **Save**. To complete setup, you must visit the generated link. If you are not the Google Workspace administrator, share the link with the administrator.
9191

src/content/docs/cloudflare-one/identity/idp-integration/okta.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ Additionally, you can configure Okta to use risk information from Zero Trust [us
6060

6161
14. (Optional) Create an Okta API token and enter it in Zero Trust (the token can be read-only). This will prevent your Okta groups from failing if you have more than 100 groups.
6262

63-
15. (Optional) To configure [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims):
63+
15. (Optional) To configure [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims):
6464

6565
1. In Okta, create a [custom authorization server](https://developer.okta.com/docs/guides/customize-authz-server/main/) and ensure that the `groups` scope is enabled.
6666
2. In Zero Trust, enter the **Authorization Server ID** obtained from Okta.
67-
3. Under **Optional configurations**, enter the claims that you wish to add to your users' identity. This information will be available in the [user identity endpoint](/cloudflare-one/identity/authorization-cookie/application-token/#user-identity)
67+
3. Under **Optional configurations**, enter the claims that you wish to add to your users' identity.
6868

6969
16. (Optional) Enable [Proof of Key Exchange (PKCE)](https://www.oauth.com/oauth2-servers/pkce/). PKCE will be performed on all login attempts.
7070

src/content/docs/cloudflare-one/identity/idp-integration/onelogin-oidc.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ OneLogin provides SSO identity management. Cloudflare Access supports OneLogin a
5050

5151
5. (Optional) To enable SCIM, refer to [Synchronize users and groups](/cloudflare-one/identity/idp-integration/generic-oidc/#synchronize-users-and-groups).
5252

53-
6. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that you wish to add to your Access [application token](/cloudflare-one/identity/authorization-cookie/application-token/).
53+
6. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that you wish to add to your user's identity.
5454

5555
7. Select **Save**.
5656

src/content/docs/cloudflare-one/identity/idp-integration/pingone-oidc.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The PingOne cloud platform from PingIdentity provides SSO identity management. C
3535
4. Input the **Client ID**, **Client Secret**, and **Environment ID** generated previously.
3636
5. (Optional) Enable [Proof of Key Exchange (PKCE)](https://www.oauth.com/oauth2-servers/pkce/). PKCE will be performed on all login attempts.
3737
6. (Optional) To enable SCIM, refer to [Synchronize users and groups](/cloudflare-one/identity/idp-integration/generic-oidc/#synchronize-users-and-groups).
38-
7. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#oidc-claims) that you wish to add to your users' identity. This information will be available in the [user identity endpoint](/cloudflare-one/identity/authorization-cookie/application-token/#user-identity).
38+
7. (Optional) Under **Optional configurations**, enter [custom OIDC claims](/cloudflare-one/identity/idp-integration/generic-oidc/#custom-oidc-claims) that you wish to add to your users' identity.
3939
8. Select **Save**.
4040

4141
You can now [test your connection](/cloudflare-one/identity/idp-integration/#test-idps-in-zero-trust) and create [Access policies](/cloudflare-one/policies/access/) based on the configured login method.

0 commit comments

Comments
 (0)