As the lead replacing a VPN with Cloudflare Access for a wiki and an HR portal, which account rules and session durations do you set, and what must each origin still check?
answer
- one application, one AUD tag
- who may write a Bypass
- session length by sensitivity
- deny by default for new hostnames
- origins verify, always
basics
~20 sGive each application its own policies and AUD tag, keep HR sessions short and the wiki's longer, turn on Block traffic to all domains in this account and strict service token authentication, review every Bypass, and make each origin verify the Access JWT.
solid answer
~50 sSplit by sensitivity. The wiki gets an Allow for employees through the company identity provider with a long session; the HR portal gets an Allow requiring an HR identity provider group with a short policy session duration, plus a Service Auth policy on its one export path for the nightly job. Turn on Block traffic to all domains in this account so a new hostname stays blocked until it has an application, and own the exemption list. Treat any Bypass as a reviewed change, because it is unlogged and blind to identity. Turn on strict service token authentication if the organisation predates its default, and set token durations, expiry alerts and inactive-token cleanup. Then write down the origin rule: each origin verifies `Cf-Access-Jwt-Assertion` against its own AUD tag. The price is more logins, more applications to maintain, and launches blocked until an application exists.
go deeper
Know that each application has its own policies and AUD tag, and that sessions have global, application and policy durations.
Explain what Block traffic to all domains in this account and strict service token authentication change, and why identity selectors reflect the identity captured at login.
Design the wiki and HR policies, the offboarding runbook and the origin checks, and show where each guard closes a route around Access.
Own the trade-offs: session length against friction, default deny against launch speed, Bypass review against integration speed, with an owner for every exception.
## What the lead is deciding Moving the wiki and the HR portal from a VPN to Cloudflare Access is not a single switch. Access gives a team a set of settings, and the lead decides how strict each one is and who may loosen it. The open choices are how to split applications, how long sessions last, which account-wide guards to turn on, who may change policies, and what the origins still check. None has one right answer; each trades friction for exposure. ## Applications and policies - **One application per sensitivity boundary.** The wiki and the HR portal get separate Access applications, so each has its own policies, session duration and **AUD tag**. A shared application would give every wiki user a token the HR origin cannot tell apart. - **Reusable policies, named for their audience**, such as `employees`, `hr-staff` and `hr-nightly-report`, so a reviewer reads intent rather than selectors. - **Groups from the identity provider.** The HR Allow policy requires an **Identity provider group**, a selector offered for several identity providers and for groups provisioned with SCIM. - **Guests by name only.** If the wiki needs outside collaborators, enable one-time PIN and list their emails. Never Include the One-time PIN login method itself, which admits anyone with an address. - **Machines through Service Auth**, one service token per job, named with the Service Token selector rather than Any Access Service Token. ## Session durations | Setting | Wiki | HR portal | Why | |---|---|---|---| | Global session duration | 24 hours (default) | same, account-wide | How often anyone signs in to the identity provider again, which refreshes groups and attributes | | Application or policy session duration | A week or more | A few hours | How long one application token lasts before Access re-checks the stored identity against the policies | | Non-identity selectors | Re-checked per request | Re-checked per request | IP ranges, Country and device posture apply mid-session | The trade-off is concrete, and it has two levers. When an application token expires, Access re-checks the identity it **stored at login** against the current policies, so a short HR policy session makes policy edits, such as removing a name from the HR policy, bite within hours. A change made in the identity provider, such as removing someone from the HR group, is seen only when the user next signs in there, which the global session duration bounds, or sooner when **SCIM** provisioning forces a re-check. So the HR portal wants a short policy session and the account wants SCIM; the cost is more silent re-checks for HR staff and, with a shorter global session, more logins for everyone. For offboarding, the runbook is: disable the account in the identity provider, then **Revoke** the user under Team & Resources so existing sessions end and no new one can start. ## Account-wide guards - **Block traffic to all domains in this account.** Any hostname without an Access application gets Error 1050. New internal services cannot go public by accident, but a launch waits until someone creates its application. Own the **Hostnames to Exempt** list and keep it to genuinely public sites. - **Strict service token authentication.** Organisations created on or after 5 October 2026 have it on and cannot turn it off; older ones should turn it on, so that service-token requests get 401 or 403, are judged only by Service Auth policies, and receive no reusable cookie. - **Service token hygiene:** durations no longer than the job's review cycle, the **Expiring Access Service Token** notification, rotation with grace periods, and **Automatically clean up inactive service tokens**. ## Who may change what 1. Policies change through the API or a reviewed configuration pipeline, so every edit has an author and a reviewer. 2. A **Bypass** needs security sign-off and an expiry, because it disables authentication and Access logging for its path. Cloudflare itself advises against Bypass as permanent access to internal applications. 3. Recreating an application changes its AUD tag, so that change ships together with the origin's configuration. ## What each origin still checks Access replaces the VPN's front door, not the origin's own judgement. 1. Every request carries a `Cf-Access-Jwt-Assertion` that verifies against the keys at the team domain's `/cdn-cgi/access/certs`. 2. `aud` contains that origin's own AUD tag, and `iss` is the team domain. 3. Identity comes from the verified claims; groups come from `get-identity` when the token's custom claims may be trimmed. 4. The HR export path accepts only the nightly job's `common_name`. ## The trade-offs in one place | Choice | Gain | Cost | |---|---|---| | Short HR sessions | Group removals bite quickly | More re-checks and logins for HR staff | | Account-wide default deny | No accidental exposure | Each launch needs an Access application first | | Bypass by review only | Every route stays authenticated and logged | Slower integrations | | Mandatory origin verification | Routes around Access fail closed | Code or tunnel configuration in every service | A lead who sets these once, writes them down and assigns an owner to each exception gets most of the VPN's protection and few of its blind spots.
- How short should the HR portal's session be, and what does that cost?A few hours suits HR: when the token expires Access re-checks the stored identity against current policies, so a policy edit takes effect within that window. It does not refresh identity provider groups, which change at the next identity provider login or through SCIM. The cost is more re-checks for HR staff, which a long wiki session avoids for low-risk content.
- When is a departing employee actually cut off?Disable the account in the identity provider first, so no new login can succeed, then revoke the user's sessions in Zero Trust under Team & Resources so existing tokens stop working. Revoking alone is not enough, because an active identity provider account can simply start a new session.
- Why not Bypass the wiki for the office's IP range to save logins?Bypass checks no identity and leaves no Access log, so anyone on that network, including a visitor or a compromised device, reaches the wiki unseen. Cloudflare advises against Bypass as permanent internal access; keep an Allow policy and, if wanted, add IP ranges as a Require rule.
- Once Access is in front, origins can drop their own token checks.
- One Access application for every internal tool keeps policy simple and safe.
- A month-long session is fine because identity provider group removals take effect at once.
- A Bypass for the office IP range is a harmless convenience.
- Strict service token authentication changes nothing for teams already using Service Auth.
Assumes Cloudflare Access as of 2026-10-10; strict service token authentication arrived in October 2026 and is mandatory for Zero Trust organisations created from 5 October 2026.