Skip to content

Commit 5190ca1

Browse files
ranbelajhollandpatriciasantaana
authored
[ZT] Access for SaaS OIDC (#20603)
* add oidc claim section * oidc features * Update src/content/docs/cloudflare-one/applications/configure-apps/saas-apps/generic-oidc-saas.mdx Co-authored-by: Alex Holland <[email protected]> * Update src/content/docs/cloudflare-one/applications/configure-apps/saas-apps/generic-oidc-saas.mdx Co-authored-by: Alex Holland <[email protected]> * Update src/content/docs/cloudflare-one/applications/configure-apps/saas-apps/generic-oidc-saas.mdx Co-authored-by: Alex Holland <[email protected]> * add oidc flow details * Update src/content/docs/cloudflare-one/applications/configure-apps/saas-apps/generic-oidc-saas.mdx Co-authored-by: Patricia Santa Ana <[email protected]> --------- Co-authored-by: Alex Holland <[email protected]> Co-authored-by: Patricia Santa Ana <[email protected]>
1 parent 1ac9e1f commit 5190ca1

File tree

4 files changed

+69
-10
lines changed

4 files changed

+69
-10
lines changed

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

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,7 @@ Some SaaS applications provide the Redirect URL after you [configure the SSO pro
3737

3838
6. Select **Add application**.
3939

40-
7. In **Scopes**, select the attributes that you want Access to send in the ID token.
41-
42-
| Scope | Description |
43-
| --------- | ---------------------------------------------------- |
44-
| `openid` | Include a unique identifier for the user (required). |
45-
| `email` | Include the user's email address. |
46-
| `profile` | Include all custom OIDC claims from the IdP. |
47-
| `groups` | Include the user's IdP group membership. |
40+
7. In **Scopes**, select the user attributes that you want Access to send in the ID token. For more information about configuring OIDC scopes and claims, refer to [OIDC claims](#oidc-claims).
4841

4942
8. In **Redirect URLs**, enter the callback URL obtained from the SaaS application.
5043

@@ -81,3 +74,62 @@ Next, configure your SaaS application to require users to log in through Cloudfl
8174
## 4. Test the integration
8275

8376
Open an incognito browser window and go to the SaaS application's login URL. You will be redirected to the Cloudflare Access login screen and prompted to sign in with your identity provider.
77+
78+
## OIDC claims
79+
80+
OIDC claims refer to the user identity characteristics that Cloudflare Access shares with your OIDC SaaS application upon successful authentication. An OIDC scope defines a set of OIDC claims. By default, Cloudflare Access passes all [standard claims](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) that are included in the `openid`, `email`, `profile`, and `groups` scopes (if available).
81+
82+
| Scope | Description |
83+
| --------- | ---------------------------------------------------- |
84+
| `openid` | Includes a unique identifier for the user (required). |
85+
| `email` | Includes the user's email address. |
86+
| `profile` | Includes the user's name and all custom OIDC claims from the IdP. |
87+
| `groups` | Include the user's IdP group membership. |
88+
89+
In your Access application, you can configure the OIDC scopes and claims that Access sends to the SaaS provider. For example, you can remove the `groups` scope if your SaaS application does not need to receive user group information.
90+
91+
### Filter groups
92+
93+
In **Group filter regex**, you can enter a regular expression to define the identity provider groups that you want to include in the `groups` scope. For example, if you enter the expression `(^TEAM-Engineering-.$)|(^TEAM-Product-.$)`, only groups with names like TEAM-Engineering-A or TEAM-Product-B would get passed to the SaaS application.
94+
95+
### Add claims
96+
97+
To add additional OIDC claims onto the ID token sent to your SaaS application, configure the following fields for each claim:
98+
99+
- **Name**: OIDC claim name
100+
- **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.
101+
- **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.
102+
- **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.
103+
- **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**.
104+
105+
## Advanced settings
106+
107+
### Access token lifetime
108+
109+
The OIDC Access token authorizes users to connect to the SaaS application through Cloudflare Access. You can set an **Access token lifetime** to determine the window in which the token can be used to establish authentication with the SaaS application — if it expires, the user must re-authenticate through Cloudflare Access. To balance security and user convenience, Cloudflare recommends configuring a short Access token lifetime in conjunction with a longer **Refresh token lifetime** (if supported by your application). When the access token expires, Cloudflare will use the refresh token to obtain a new access token after checking the user's identity against your Access policies. When the refresh token expires, the user will need to log back in to the identity provider. The refresh token lifetime should be less than your [global session duration](/cloudflare-one/identity/users/session-management/), otherwise the global session would take precedence.
110+
111+
:::note
112+
<Render file="access/saas-apps/saas-sessions" params={{ session: "OIDC Access tokens", token: "Access token"}} />
113+
:::
114+
115+
### OIDC flows
116+
117+
Some SaaS applications require SSO providers to provide tokens to the browser without backend authentication. Access for SaaS supports the following OIDC flows:
118+
119+
- **No additional OIDC flows**: (Default) Recommended unless your application requires additional flows.
120+
- **Hybrid flows**: Used by applications that require information from the ID token before authenticating the user.
121+
- **Implicit flows**: (Not recommended) Typically used by frontend applications that cannot store secrets and which do not support **PKCE without client secret**.
122+
123+
Cloudflare allows various `response_type` values in the authorization request depending on the selected flow. For example, the implicit flow allows Cloudflare to return the ID token, Access token, or both the ID token and Access token from the Authorization endpoint.
124+
125+
| `response_type` values | Default flow | Hybrid flow | Implicit flow |
126+
| -------------- | -- | -- | -- |
127+
| `code` ||||
128+
| `id_token` ||||
129+
| `token` ||||
130+
131+
To include `id_token` in the authorization request, turn on **Return ID Token from Authorization Endpoint**. To include `token`, turn on **Return Access Token from Authorization Endpoint**
132+
133+
:::note
134+
[Refresh tokens](#access-token-lifetime) are not supported with Hybrid or Implicit flows.
135+
:::

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
@@ -100,7 +100,7 @@ To send additional SAML attributes to your SaaS application, configure the follo
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`.
102102
- **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.
103-
- **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.
103+
- **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

106106
### JSONata transforms

src/content/docs/cloudflare-one/identity/users/session-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The application token will expire after this period of time (unless you have set
4949

5050
#### SaaS application sessions
5151

52-
Access session durations only control the front door to a SaaS app; Access does not control how long the user can stay in the SaaS app itself. For example, if the user logs out of the SaaS app and then comes back to it, a valid Access application token allows them to re-authenticate without another login. The SaaS app issues its own authorization cookie that manages the user's session within the app.
52+
<Render file="access/saas-apps/saas-sessions" params={{ session: "Access session durations", token: "Access application token"}} />
5353

5454
### Set policy session duration
5555

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
params:
3+
- session
4+
- token
5+
---
6+
7+
{props.session} only control the front door to a SaaS app; Access does not control how long the user can stay in the SaaS app itself. For example, if the user logs out of the SaaS app and then comes back to it, a valid {props.token} allows them to re-authenticate without another login. The SaaS app issues its own authorization cookie that manages the user's session within the app.

0 commit comments

Comments
 (0)