How Strapi CAS login fits Users and Permissions
A university or regulated body that already runs a CAS server usually wants students, staff or partners to sign in to the front end of a Strapi site with the same credentials they use everywhere else, while Strapi serves the content behind it. The first design fact to settle is where that login actually happens. Strapi's single sign-on documentation covers administrator login to the admin panel only, through an identity provider and with auto-registration and a default admin role. End-user authentication is a separate concern handled by the Users and Permissions plugin, so a CAS integration for front-end users is a provider integration on that plugin, not an admin SSO setup. Editors who sign in to the admin panel and visitors who sign in to the site are two different identity paths, and each needs its own owner, test and review.
Within Users and Permissions, the CAS work comes down to three questions for your team to answer before design is final. First, whether your CAS version exposes OpenID Connect endpoints that Strapi's OIDC-style provider settings can use, or whether a bridge such as a Keycloak or authentik broker is needed in front of CAS. Second, which claims or attributes identify each user, because Strapi creates or matches the end-user record from them and the username and email mapping decides whether accounts merge cleanly. Third, how the JWT your front end receives is validated and how long its lifetime is set. Confirm the exact CAS connector or OIDC provider option against the current Strapi and CAS versions in your environment, since provider support changes between releases and this choice drives everything that follows. Record the answers, because auditors reviewing access to student or staff data will ask how each account was created and matched.
What you need before the CAS login build starts
A CAS login for Strapi Users & Permissions touches three teams: the identity team that runs CAS, the Strapi team that owns the backend, and the front-end team that handles redirects and sessions. Each item below names who owns it and the question to settle before any build work starts.
Strapi version and runtime support
Confirm which Strapi version the project runs and that its database and Node.js versions are supported. Strapi 5 supports PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later and SQLite 3, and it runs only on Active or Maintenance LTS Node.js versions. Strapi v4 reached end of life on April 30, 2026, so a v4 project should plan its upgrade before adding new login work. Owner: Strapi team. Question: is the project on Strapi 5, and does the production database and Node.js version appear on the supported list?
Installation requirementsCAS server with OIDC enabled
Confirm that the CAS server runs a release with OpenID Connect support turned on, and record the exact version and the OIDC discovery endpoint. The Strapi provider settings depend on OIDC metadata such as the issuer, authorization and token endpoints, and the signing keys. Without OIDC enabled on the CAS side, the provider cannot be configured as planned. Owner: identity team. Question: which CAS version is running, and is its OIDC endpoint reachable from the Strapi backend?
Registered service definition
A CAS service or OIDC client definition must exist before Strapi can log anyone in. The identity team needs to register the Strapi backend callback URL as an allowed redirect, decide whether the client is confidential, and set which attributes are released to the application. Ask who approves changes to that definition, because a wrong redirect URL is the most common cause of a failed first sign-in. Owner: identity team. Question: who owns the service definition, and who signs off on its redirect URLs?
HTTPS endpoints for backend and front end
Both the Strapi backend and the front end need HTTPS addresses that the CAS server can reach and that browsers can use after sign-in. Mixed HTTP and HTTPS endpoints, or a front end on a different host than the one registered with CAS, will break the redirect chain. Settle the public hostnames, certificates and reverse proxy routing before writing provider settings. Owner: Strapi team with the front-end team. Question: what are the final public hostnames for the API and the app, and who issues their certificates?
Test identity set that matches the population
Build a test set of CAS accounts that reflects the real user population, including students, staff, affiliates and any accounts with incomplete attributes. Testing only with a single administrator account hides the cases that create duplicate Strapi users or missing roles. Agree in advance how test accounts are created and removed, and keep them separate from production identities. Owner: identity team with the front-end team. Question: which account types must be tested, and who approves the test accounts?
Personal data scope and records
Login pages often carry student or staff personal data, so decide which CAS attributes Strapi will store on the end-user record and why. Data protection rules such as the FERPA regulations in 34 CFR Part 99 may apply to an institution's records, so the Strapi team should confirm with the institution's compliance owner which fields are necessary. Record who approved the attribute list before the build starts. Owner: Strapi team with compliance. Question: which attributes are needed, and who approves storing them?
34 CFR Part 99 textHow a CAS sign-in reaches Strapi, and where trust changes hands
The flow starts in the browser on the public front end, which sends the user to the CAS OIDC authorization endpoint. CAS returns an authorization code to the Strapi callback route through the browser. Strapi then exchanges the code at the token endpoint and reads identity attributes from the userinfo endpoint or ID token claims. Strapi creates or matches the Users & Permissions user and issues its own Strapi JWT to the front end. Check that the redirect URI matches the CAS service definition exactly, and that the attributes Strapi reads are the ones your university releases.
Request path from browser to CAS and back, with the Strapi JWT issued last.
Which integration path fits your CAS setup
This path uses the Users & Permissions plugin and a provider configuration that talks to the CAS server's OpenID Connect endpoints. Strapi handles the redirect to CAS, the callback and the creation or matching of the end-user record, so most of the work is configuration plus any custom provider code your Strapi version requires. It changes the Strapi project's plugin settings and possibly a small amount of server code, and it keeps the login flow inside Strapi's own authentication model.
- Codebase change: provider settings and callback URLs in the Strapi configuration, with custom code only where the default provider does not map your CAS attributes.
- Maintenance: usually the Strapi back-end team, with the identity team owning the CAS service definition.
- Checks: confirm the CAS server exposes the OIDC endpoints and scopes you need, then test the redirect URL, token exchange and user creation.
- Limit: the provider only works if CAS OIDC support is enabled for your service, which is common in universities but must be confirmed.
- Upgrade risk: provider behavior can change between Strapi releases, so retest login after each upgrade.
Before you commit, ask the CAS administrator to confirm the OIDC configuration and the attributes returned for your users.
This path adds a custom route and controller in Strapi back-end code. The route receives the CAS ticket or authorization code from the front end, exchanges it with the CAS server on the back end, validates the response, maps the CAS identity to a Strapi user and issues a Strapi session token. It gives the team full control over validation and mapping, but that control becomes code the team must write, test and keep current.
- Codebase change: a new route, a controller and a service that call CAS, plus tests for failure cases such as expired tickets and replayed codes.
- Maintenance: the Strapi development team owns the code for its full lifetime, including security fixes after dependency updates.
- Checks: verify that the back end checks the CAS response on every exchange, rejects replayed or expired credentials and never trusts a user identifier sent by the browser.
- Mapping: define how CAS attributes map to Strapi users, roles and deactivated accounts, and document it.
- Cost driver: the amount of custom security logic your team must review, which usually grows with the number of CAS attributes and services involved.
Ask the CAS administrator which ticket or code formats are supported and how long they remain valid, then have security review the exchange code before it goes live.
In this path, the front end handles the CAS redirect, receives the CAS result and sends a verified assertion to Strapi. Strapi then trusts the assertion only after checking its signature, audience and expiry. The model suits front ends that already run their own authentication session, but it moves a significant part of the trust decision into the browser application, so the assertion design matters as much as the code.
- Codebase change: a login flow in the front-end application and a Strapi endpoint or policy that verifies the assertion before issuing a Strapi token.
- Maintenance: shared ownership between the front-end and Strapi teams, which can lead to gaps when either side changes.
- Checks: verify the signature, audience, issuer and expiry on every assertion, and confirm that the browser cannot forge or reuse one.
- Session model: decide whether the Strapi token is short-lived and how the front end refreshes it.
- Risk: a weakly verified assertion gives Strapi no independent proof of the CAS login, so this path needs the strictest review.
Confirm with your security team that an assertion format is acceptable for your audit scope before building on it.
The CAS login setup sequence in Strapi
This sequence connects a CAS server with OIDC support to Strapi's Users & Permissions plugin so that end users sign in through the university identity service and arrive in Strapi as accounts with known roles. Each step closes with a check, so a failure is caught at the step that caused it.
Confirm the CAS OIDC discovery document
Before touching Strapi, the CAS administrators or your team fetch the OIDC discovery document from the CAS server and confirm the issuer, authorization, token and userinfo endpoints, the supported scopes, and the claims the server returns for a test user. Confirm with the CAS administrators whether the server issues refresh tokens and which claim carries the user's email address, since Strapi maps users on that value. This step is done when the discovery document fetches without error from the network where Strapi will run and lists the endpoints you need.
Register the Strapi service with CAS administrators
Send the CAS administrators a request to register Strapi as an OIDC relying party. The request must include the exact callback URL that Strapi's Users & Permissions provider will use, built from your public Strapi domain and the provider name you choose, along with the client type (confidential), the scopes and any attribute release needed for email and name. Ask them to confirm in writing which client identifier and secret they issue and whether the callback URL is allowed exactly as written. This step is done when you hold a client identifier and secret and the callback URL is on the registered list.
Store the client credentials outside source control
Place the client identifier, the client secret and the CAS endpoints in environment variables or your secrets manager, not in config files committed to the repository. Reference them from the Strapi provider configuration so that the values are read at startup. Restrict who can read the secret in each environment, and plan a rotation path with the CAS administrators. This step is done when the repository contains no secret values and a process started with the variables set can read them.
Configure the provider in Strapi Users & Permissions
In the Strapi admin panel, open the Users & Permissions providers settings and configure the OpenID Connect provider with the CAS issuer, the endpoints from the discovery document, the client identifier and secret read from the environment, and the scopes you confirmed. Confirm the redirect URL shown in the provider settings matches the callback URL registered with CAS character for character. This step is done when a sign-in attempt from the front end redirects to the CAS login page and returns to Strapi with an authorization code.
Map returned claims to user fields
Map the claims that CAS returns to the Strapi user fields you need, typically the email as the unique identifier and the display name for the username. Check the mapping against the claims from your test account rather than assumptions, and decide how to handle a missing email claim, because a user without a usable identifier should not be created. Record the mapping in your runbook so that later changes to the CAS attribute release are caught. This step is done when a test sign-in produces a user record with the expected email and name.
Set the default role and first sign-in handling
Decide which Users & Permissions role a new CAS user receives on first sign-in, and make it the least-privileged role that still lets the front end read the content it needs. Confirm whether the integration creates accounts automatically or requires an existing record, and whether an account created by CAS can later be linked to an account with the same email that already exists. Agree these rules with the university's identity team, since they decide who can reach protected content. This step is done when a first-time sign-in creates a user in the intended role and a second sign-in reuses the same record.
Test with a dedicated account and review the audit trail
Sign in with a dedicated test account that has a known role and a non-production email, then verify the access rules: protected endpoints should reject a request without a valid token, accept one with a token from the test user, and show nothing beyond that role's permissions. Repeat the test after a logout and after the CAS session expires, and record the outcome in the change log. Ask the CAS administrators to confirm which sign-in events they can log for the same account. This step is done when the test account behaves as the role specifies in each scenario and the results are recorded.
Mapping CAS attributes to Strapi user fields
This table compares each CAS or OIDC attribute you may receive with the Strapi Users & Permissions field it fills, its purpose and the handling rules to set before go-live. Claim names depend on your CAS attribute release policy, so confirm every name with the CAS administrators before you configure the provider. The main takeaway is that the identifier you match on should be stable, because a changed email or group should never silently create or merge accounts.
| CAS or OIDC claim | Strapi field | Purpose | Handling notes |
|---|---|---|---|
| Stable subject or user ID (confirm name, for example sub or a CAS uid) | Username or a custom identifier field | Matches the returning user to the same Strapi account | Treat as the primary key. Do not reuse a value that a university may reassign to another person. |
| Email address (confirm whether it is released) | Contact address, password reset and notifications | Confirm it is released by policy. Decide whether a changed email updates the existing user or creates a conflict. | |
| Display name (for example givenName and surname, or displayName) | Custom name fields on the user content type | Shows the person in editorial tools and audit history | Optional for end users. Refresh it at each login only if your policy allows edits from the identity source. |
| Affiliation or group attribute (confirm name and values) | Role or custom attribute used by your access rules | Decides which content or features the user can reach | Map only the values you need. Unknown or empty values should fall back to a least-privilege role. |
| Source attribute change (for example a new affiliation value) | Existing Strapi user record | Keeps access aligned with the person's current status | Decide in advance whether the user keeps, loses or gains access on next login, and test that path. |
| Account removed or disabled at the source | Strapi user blocked or deleted | Ends access when a person leaves or graduates | CAS login alone does not remove local accounts. Plan a deprovisioning step and confirm how sessions are revoked. |
| Attribute release policy (confirm with CAS administrators) | Whole mapping | Determines which attributes Strapi can receive | Request only the attributes Strapi needs. Record each released attribute for your data protection review. |
What FERPA and GLBA ask of the login layer
The first question for a university is whether FERPA applies to the student data Strapi will hold. The FERPA regulations in 34 CFR Part 99 apply to any educational agency or institution that receives funds under a program administered by the US Secretary of Education (34 CFR 99.1). If Strapi publishes or stores personally identifiable student information, such as names tied to course enrollments, advising notes or application status, the login layer is part of the set of controls the institution has to be able to explain. Counsel and the registrar should confirm which rules apply to each data set before any build starts, because the answer decides how strict the access design must be.
If a contractor such as DeployOpen works on that system, the institution can share records with it only under the school official condition. The contractor must perform a service the institution would otherwise use its own employees for, sit under the institution's direct control for the use and maintenance of the records, and follow the redisclosure limits in 99.33(a) (34 CFR 99.31(a)(1)(i)(B)). In practice this means the CAS service definition, the Strapi provider settings and the Users and Permissions roles must be written so that a contractor's administrative access can be granted, reviewed and removed by the institution. The institution must also use reasonable methods, such as technological access controls, so that each user sees only the records in which they have a legitimate educational interest (34 CFR 99.31(a)(1)(ii)). Confirm with the institution which attributes from CAS map to which Strapi roles, and test that a user from one department cannot read another department's entries through the API.
FERPA also requires a record of each request for access to and each disclosure of personally identifiable information, with the parties involved and their legitimate interests, kept for as long as the records are kept (34 CFR 99.32). Strapi's own audit logs are an Enterprise feature on the self-hosted pricing page, so the institution should confirm whether it needs that plan or whether its reverse proxy, CAS and database logs can produce an equivalent record. For GLBA, every institution in the Title IV federal student aid programs has agreed in its Program Participation Agreement to follow the Safeguards Rule in 16 CFR Part 314, and the Department of Education checks this in annual compliance audits (FSA Electronic Announcement GENERAL-23-09). The Safeguards Rule requires multi-factor authentication for anyone accessing any information system (16 CFR 314.4(c)(5)), so the institution should confirm whether CAS enforces a second factor for staff and administrators who reach the Strapi admin panel or sensitive collections. DeployOpen prepares these controls and the evidence for them, but it does not issue compliance determinations; independent auditors and the institution's own counsel do.
Security controls for the CAS login path
A CAS login path for Strapi Users & Permissions puts a university identity server in front of student and staff data, so each link in the chain needs a named control. The cards below cover transport, redirect and state checks, token lifetimes, secret handling, group-based account creation, logging and offboarding. Each one names a setting or check you can verify before go-live.
TLS validation on every endpoint
Validate certificates on the CAS server, the OIDC discovery URL, the token endpoint and the Strapi callback host, and do not disable verification in the Strapi provider code to get past a private certificate authority. Install the internal CA chain on the Strapi host so the back-channel token exchange succeeds with verification on. Test with an expired or untrusted certificate in a staging environment to confirm the login fails closed.
Exact redirect URI registration
Register each Strapi callback URL on the CAS OIDC client as an exact string, including scheme, host, port and path, with no wildcards and no path prefixes. Separate staging and production clients so a staging redirect cannot receive production codes. Ask the CAS operator to confirm how the server matches redirect URIs, since matching rules differ between CAS deployments.
State and nonce validation
Confirm that the flow sends a state value and a nonce in the authorization request, and that Strapi rejects a callback whose state does not match the one it issued. Check that the nonce in the returned ID token matches the request. Test both by replaying an old callback URL and by editing the state parameter in a browser.
Short-lived Strapi sessions
Choose the Strapi token mode before go-live. Legacy long-lived JWTs stay valid until they expire, so their lifetime needs a deliberate value, while refresh mode lets you set shorter access token lifetimes and revoke sessions. Match Strapi token lifetimes to the institution's session policy, and document who can end a session early.
Client secrets outside the repository
Keep the CAS OIDC client secret and the Strapi JWT signing secret in environment variables or a secrets manager, never in config/plugins.js committed to Git. Restrict read access to the Strapi host and the deployment pipeline, and rotate the client secret after any staff change that touched it. Confirm with the CAS team how they rotate client secrets without a login outage.
Group-based account creation
Limit which CAS groups or attributes can create a Strapi account. Map only the approved groups to the Users & Permissions role assigned on first login, and deny sign-in when the attribute is missing rather than creating a default account. Review the group list with the registrar or identity team, since broad university groups such as all staff can grant access far beyond the editorial team.
Sign-in and provider error logging
Log successful sign-ins, failed callbacks, state mismatches and token errors with timestamps, the CAS user identifier and the source address, and forward them to the institution's log platform. Avoid writing tokens or raw ID token claims to logs. Check that a failed provider response produces a log entry that a security team member would see.
Offboarding test for disabled accounts
Test that disabling a person in CAS removes their Strapi access. Because Strapi keeps a local user record, a disabled CAS account can still hold a valid Strapi session until its token expires or is revoked. Run this test with a test account: disable it in CAS, attempt a Strapi API call with its existing token, and confirm the call fails within the session policy you set.
Common CAS login failures in Strapi and how to fix them
This table pairs each common failure when Strapi Users & Permissions signs people in through a CAS server with OIDC support with its likely cause and the configuration or check that fixes it. Read it as a triage list: start with the symptom your users report, then verify the cause against the CAS service definition and the Strapi provider settings. Most failures trace back to a mismatch between the two.
| Symptom | Likely cause | Fix or check |
|---|---|---|
| Redirect error or "redirect_uri mismatch" after CAS sign-in | The callback URL registered in the CAS service definition does not exactly match the callback URL Strapi sends, including scheme, host, port and path | Copy the callback URL from the Strapi provider configuration into the CAS service definition character for character, then retest in a private browser window |
| Login page fails to load or CAS discovery errors at startup | The OIDC discovery URL is wrong, the CAS server exposes OIDC under a different base path than assumed, or the CAS server is unreachable from the Strapi host | Open the discovery document URL directly from the Strapi server, confirm the issuer value matches the configured issuer, and check DNS and firewall rules between the two hosts |
| TLS or certificate chain errors in the Strapi logs during token exchange | The CAS server certificate is issued by an internal certificate authority that the Strapi container or host does not trust, or the intermediate certificate is missing from the served chain | Install the institution's root and intermediate certificates into the Strapi runtime trust store, and verify the full chain with a command-line TLS client from the Strapi host |
| Tokens rejected as not yet valid or expired immediately | Clock skew between the CAS server and the Strapi host exceeds the tolerance in token validation | Confirm both hosts sync time with a trusted NTP source, and check the issued and expiry timestamps in a decoded test token |
| A second Strapi account appears for a user who already had one | The attribute Strapi uses to match an existing user changed, for example from an email address to a campus username, so the lookup created a new record | Choose a stable identifier from the CAS attributes, decide the matching field before go-live, and merge or deactivate duplicate accounts with the content owner's sign-off |
| Authentication succeeds but profile fields such as email or name are empty | The CAS attribute release policy for the Strapi service does not release the requested claims, so the identity token omits them | Ask the CAS administrator to add the required attributes to the release policy for this service, then sign in again to check the claims in a test session |
| Users sign in but have no role or see no content | The Users & Permissions default role is missing, or the default role has no public or authenticated permissions for the content types they need | Confirm the default role assigned on first login in the Users & Permissions settings, and review that role's permissions against each content type and endpoint |
| Former staff or students can still use the Strapi site after their CAS account is disabled | Strapi keeps its own session and JWT until expiry, and disabling the CAS account does not end sessions already issued | Set short token lifetimes, plan revocation with the refresh token approach, and run a documented check that disabled accounts cannot obtain new tokens |
Questions buyers ask before a CAS login build
How much effort does a Strapi CAS login build take?
Effort depends mostly on four things: how much access your team has to the CAS server configuration, how many user attributes Strapi needs to map, how the front end is built, and how far testing has to go. A single sign-on flow with a small attribute set and one front end is a much smaller job than a build that maps faculty, staff and student roles across several applications. Ask for a written scope that lists each of these four drivers so the quote can be compared against your own estimate.
Can a university team build a CAS login for Strapi without a partner?
Yes, a team with Strapi and CAS experience can build it internally, but the work spans three skill sets: Strapi Users and Permissions configuration, OIDC client setup on the CAS side, and front-end session handling. Many universities split the work between their web team and their identity team. The main risk is not the code but the approvals and the CAS change process, which can slow an internal team that does not run the identity service day to day. A partner is most useful when the identity team has limited capacity or when the build needs a documented, reviewable result.
What does the build need from the identity and CAS administrators?
The CAS administrators need to register a service for the Strapi application, confirm the OIDC support is enabled, set the allowed redirect URLs, and decide which attributes are released to Strapi. The identity team also needs to agree on the identifier Strapi uses to match a user, such as a campus username or a stable unique ID. Before work starts, confirm who can make these changes, how long the change window takes, and whether a test CAS environment exists. Without a test service definition, the build will move slowly.
How long does a CAS login build take?
This page does not give a duration. The time depends on approvals, the change process for the CAS service definition, and whether a test environment is available alongside production. Ask for a written scope and timeline from any provider, and check that it names the dependencies on the identity team. The scope document sets the timeline for each phase, including testing and rollout.
Does CAS login work with Strapi Community Edition or does it need a paid plan?
End-user login is handled by the Users and Permissions plugin, which is part of the core product, so it does not depend on an admin SSO add-on. However, SSO for administrator login to the admin panel is a Growth add-on and an Enterprise feature on the self-hosted plans. Confirm the current feature list on the self-hosted pricing page before you choose a plan, and confirm with your provider which features your build actually uses. Licensing of your Strapi edition should be checked against your own requirements.
What happens to the CAS integration when Strapi or CAS is upgraded?
Upgrades can affect both sides. A Strapi 5 minor release can change plugin behavior, and CAS upgrades can change OIDC settings, endpoints or attribute release rules. Keep the provider configuration in version control, test the login flow on a staging copy after each upgrade, and confirm that redirect URLs and client settings still match. Plan a rollback path, and take a database backup before any Strapi upgrade. Ask the provider how they handle regression testing for the CAS integration across both upgrade paths.
Does the CAS login build need a compliance review for student data?
Possibly. If the Strapi site stores or displays education records, the institution's FERPA obligations apply, including limits on which school officials can access records and a record of disclosures. Confirm with your compliance team which data the login flow passes to Strapi and what the site stores. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications.
How DeployOpen scopes and delivers the CAS login work
DeployOpen scopes the CAS login as a written piece of work covering the CAS service definition, the Strapi Users & Permissions provider settings and the verification your security and registrar teams need. The work runs in infrastructure you control, so the people who own the identity and the Strapi instance stay in the loop from the first day.
How we scope
- Confirm the CAS server version and whether its OIDC support is enabled for your deployment.
- Agree which user attributes Strapi needs and which student or staff groups may sign in.
- Document the Strapi environments, hostnames and redirect URLs that the CAS service definition must allow.
How we build
- Register the Strapi application as a CAS OIDC client with the agreed redirect and logout URLs.
- Configure the Users & Permissions provider settings and test the sign-in and token flow end to end.
- Check that only intended end users are created or linked, with default roles and public permissions reviewed.
How we hand over
- Deliver the written configuration, the CAS service definition and the provider settings used for the build.
- Provide a test script covering successful sign-in, denied access, logout and expired sessions.
- Walk your identity and operations teams through the runbook for changing URLs, secrets and CAS settings.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Ask any partner for a quote that lists the CAS and Strapi versions covered and who maintains each setting.

