How CKAN OpenID Connect login with Okta works with PKCE
ckanext-oidc-pkce adds an OpenID Connect login to CKAN at /user/login/oidc-pkce, using the PKCE flow. It was developed for Okta and has not been tested with other identity providers, so a team using Okta has a starting point, while a team using another provider must test every step before relying on it. For a portal team, the first practical question is whether your staff accounts live in Okta and whether your Okta tenant is set up for this kind of client, which your Okta administrator should confirm before the build starts. The extension is published on its PyPI page.
The standard CKAN login stays in place after the extension is installed, so local accounts keep their usual sign-in form. The extension's description lists compatibility with CKAN 2.9 and 2.10, but CKAN's release policy supports only the current minor line and the previous one, with the latest patch of each. CKAN 2.12.0 was released on August 26, 2026, so the supported lines on that date were 2.12 and 2.11. Confirm the CKAN version you will run, and whether it falls within a supported line, before you plan the work. A portal on 2.9 or 2.10 may need an upgrade first, and that upgrade changes the project plan.
The rest of this section follows the path a sign-in takes, then the work around it: the Okta application setup, the settings CKAN needs, how Okta user attributes map to CKAN accounts, how to hide the local login form when only SSO accounts should be allowed, and how to test each stage. Hiding the form is outside this extension, so the team must plan it as a separate change. Decide which accounts will remain local, such as break-glass sysadmin accounts, and record that decision with the portal owner. Keep at least one local administrator path until the SSO sign-in has been tested end to end, because a misconfigured Okta application can otherwise lock out the people who would repair it.
Where the browser, CKAN and Okta exchange the login
The flow starts when a user opens /user/login/oidc-pkce on CKAN, which redirects the browser to Okta with a code challenge. Okta signs the user in, including any MFA that the Okta policy enforces, then sends the browser back to CKAN's callback with an authorization code. CKAN makes the token request itself and sends the code verifier, so a client secret for a confidential Okta app stays on the CKAN server. Check that CKAN validates the returned ID token before it creates the session.
The browser only carries redirects, while CKAN makes the token exchange with Okta.
What CKAN and Okta need before you configure the login
Six groups of prerequisites decide whether the login can be configured and tested without rework. They cover the CKAN version and stack, the Okta org and admin rights, network and callback settings, and the staging setup that protects production. Work through them in order before you create any app in Okta.
CKAN version and support line
CKAN supports the latest patch of the current minor version and the previous minor version, and outdated patches lose support once a newer one ships. Today that means 2.12 and 2.11. The ckanext-oidc-pkce extension is described as compatible with CKAN 2.9 and 2.10, so the extension's own description does not cover 2.11 or 2.12. Confirm 2.11 and 2.12 compatibility in staging before you choose the version to deploy.
CKAN release policyThe CKAN software stack
The install-from-source guide requires Python 3.10 or newer, PostgreSQL 12 or newer, Solr 9 (recommended) or Solr 8, and Redis. uWSGI and Nginx are recommended for production. Minor releases may include backwards-incompatible changes, so check these requirements against the exact release you plan to run. Confirm the extension installs into that same Python environment and that Solr and Redis are reachable from every web node.
CKAN install guideOkta org, suite and admin role
Okta sells Workforce Identity in suites, and the Starter suite includes Single Sign-On. Check the tier your org holds before you plan the login, because the suite determines which identity features your team can use. You need an admin role that can create an OpenID Connect app in the Admin Console. Ask who holds that role today and who will own the client secret after go-live.
Okta pricingHTTPS callbacks, egress and time
Okta returns the user to CKAN at a registered redirect URI, so the callback must use HTTPS and match the public CKAN hostname exactly. Register the path the extension's login route expects, and confirm that path in the extension documentation. CKAN servers must also reach Okta's endpoints over outbound HTTPS, so check firewall rules and any proxy in between. Clock drift can make signed tokens look expired or not yet valid, so confirm time sync on every web node.
Staging CKAN, test app and secrets
Build a staging CKAN that matches production's CKAN version, plugins and hostname pattern, and register a separate test OpenID Connect app in Okta for it. The extension is developed for Okta and is not tested with other providers, so keep this login in staging until your own tests pass. Store the client ID and client secret in your secrets store, not in ckan.ini or version control, and rotate them through the same process you use for other production credentials.
Access Gateway is not needed
Okta Access Gateway is a reverse proxy deployed behind your firewall to protect on-premises applications that lack federation support. CKAN's OpenID Connect login works with Okta directly, so you do not deploy Access Gateway for it. Remove it from the architecture review, and confirm that no proxy in your stack intercepts CKAN's login route. Verify the login flow in staging with no gateway in the path.
Access Gateway overviewConfiguring CKAN OpenID Connect login with Okta step by step
This sequence takes a CKAN portal from a staging test to production sign-in with Okta through the ckanext-oidc-pkce extension. Each step closes with a check you can record, so the team knows which stage is complete before moving on. The result is an OpenID Connect login at the extension's route, with CKAN users matched from a claim you have confirmed.
Confirm CKAN and extension compatibility in staging
Start in a staging copy of your portal. The ckanext-oidc-pkce package page lists compatibility with CKAN 2.9 and 2.10, so compare your running CKAN version against that list before installing anything. If your version is not named there, confirm support with the extension's maintainers and test in staging before any other step. Your platform owner should approve the version in writing. This step closes when the version check is recorded in your change record and the staging CKAN instance starts cleanly on its current configuration.
Create the Okta OpenID Connect app
In the Okta Admin Console, create an OpenID Connect application for CKAN. Set the sign-in redirect URI to the exact callback path named in the extension's README, combined with your staging base URL. Choose the client type and token endpoint authentication method the README specifies. The package page warns that the extension was developed for Okta and has not been tested with other providers, so record your Okta settings in your deployment documentation. This step closes when Okta shows the app with the redirect URI saved and the client ID recorded.
Install the pinned extension and enable it
Install ckanext-oidc-pkce at a pinned version in the Python environment that runs CKAN, and record that version in your deployment files. Use the same version you checked in the first step. Add the plugin to
ckan.pluginsin the CKAN configuration, then restart the service. This step closes when the CKAN start log shows the plugin loading without errors and the portal's home page still loads.Set configuration keys and store the secret
Set each configuration key the README documents for the extension, using the issuer, client ID and redirect values from your Okta app. Keep the client secret out of the CKAN configuration file and version control. Load it from your secrets store at service startup instead. This step closes when CKAN restarts cleanly and a review of the configuration and logs shows no secret value in plain text.
Confirm the login route responds
Request the /user/login/oidc-pkce route on staging with a browser or with curl. The expected result is a redirect to Okta's sign-in page. Any server error means the plugin or its configuration needs attention, so check the CKAN log before continuing. The standard CKAN login stays available at its usual path, so test this route directly. This step closes when the redirect appears and the log shows no errors for the request.
Run a first sign-in and confirm the claim
Sign in with a test Okta account while watching the CKAN log. Confirm which claim the extension reads to match an existing CKAN user or create a new one, using the README and the test user's Okta profile. Check that the claim holds the value you expect. Then sign in a second time with the same account and confirm it returns the same CKAN user without creating a duplicate. This step closes when both sign-ins succeed and the claim is documented.
Assign organization roles and sysadmins
Decide which users need organization roles or sysadmin rights in CKAN, then set them through CKAN's administration pages. Confirm in the extension's README whether it assigns roles at sign-in. Do not assume it does. Sign in with a non-admin test account and confirm it cannot reach the administration pages. This step closes when each test account shows the roles you planned and the sysadmin list matches your records.
Move to production in a change window
Repeat the app, configuration and secret steps in production with production redirect URIs and production Okta credentials. Deploy the pinned extension version in a planned change window. Decide before go-live whether the standard CKAN login stays visible, because the extension leaves it in place and hiding it is handled by the site or by another extension. This step closes when a production test sign-in succeeds, the production start log is clean, and the change record includes the rollback steps.
How Okta identities map to CKAN accounts and roles
This table compares each Okta identity field and lifecycle event with its CKAN counterpart, and notes what the ckanext-oidc-pkce documentation covers and what remains a team decision. Read the claim-to-field rules in the extension documentation first, then confirm each row in staging before production use. The main takeaway is that signing in and granting access are separate decisions, and group-to-role and sysadmin rules are the most likely to need custom work.
| Okta identity field or event | CKAN counterpart | Notes |
|---|---|---|
| Subject identifier (sub claim) | CKAN login identity for the account | Okta's sub claim is the stable identifier for the user. Confirm in the extension documentation which claim it matches on. |
| Email (email claim) | CKAN user email address | Confirm whether the extension links existing CKAN accounts by email. A changed address in Okta could leave an account unmatched. |
| Display name (name or given and family name) | CKAN full name | Confirm which claim fills the CKAN full name and how the extension handles a missing name. |
| Username generation and uniqueness | CKAN username | CKAN usernames must be unique. Confirm how the extension derives them and what it does on a collision. |
| Okta group membership | CKAN organization membership and role (admin, editor, member) | Check the extension documentation for group rules. If none exist, mapping groups to roles is a team decision to test in staging. |
| Sysadmin assignment | CKAN sysadmin flag | Sysadmin is a platform-wide privilege. Decide whether Okta can grant it at all, and keep the list of holders reviewed. |
| Okta user deactivated or unassigned | CKAN account state and API tokens | Okta blocks new sign-ins. Confirm whether the CKAN account is disabled and whether existing API tokens are revoked. |
| Any claim or attribute the extension does not map | Not covered by the extension | Team decision. Record an owner, a default value and a review process before go-live. |
Hiding the standard CKAN login when only SSO accounts are allowed
Hiding the standard login form is a separate decision from adding the OIDC login. The ckanext-oidc-pkce extension adds the /user/login/oidc-pkce route and leaves the original CKAN login in place, so the site or another extension has to remove it. Two practical routes exist. The first is a small custom extension that overrides the login template so the local username and password form is no longer shown and only the Okta sign-in option remains. The second is to redirect the local login route to the OIDC route, so anyone who opens the standard login page is sent to Okta. Both depend on the template names and routing code in your installed CKAN release, so confirm each option against that exact version and against the extension's own compatibility notes before you build on it.
Whichever route you choose, keep at least one break-glass sysadmin account that can still sign in with a local password. If Okta is unavailable, misconfigured or its tenant is changed, sysadmins may be the only users who can still repair the portal through the web interface. Decide who holds that account, where its credentials are stored, how its sign-in is monitored, and how the password is rotated and tested. Document the break-glass path and test it in a staging portal before you hide the form in production, so you learn in staging whether it works before an outage forces the question.
Hiding the form does not remove what already exists. Local accounts created before the change keep their passwords, the password reset flow may still send reset links, and API tokens issued to users or scripts can still authenticate against the Action API. Each needs its own review. List the local accounts and decide which to disable, confirm whether the reset route is still reachable and whether it should be, and inventory API tokens so you can revoke those tied to people who no longer need them or to accounts that should now be SSO only. Also check whether user registration remains open, since a new visitor could still create a local account. Record the outcome of each check as evidence for your access review.
Security controls for CKAN OpenID Connect login with Okta
These six controls cover the points where a CKAN OpenID Connect login usually draws review questions: the Okta app registration, the code that validates tokens, the session layer, the people who administer Okta, where identity data is held, and what gets logged. Work through them in order, because the app registration and token checks determine whether the login can be trusted before the operational controls matter.
Okta app registration and secrets
Confirm whether the Okta application is a public or confidential client, and set it to match the flow you run. PKCE is designed for clients that cannot keep a secret safely, so a client secret should exist only if your configuration requires one. Any secret belongs in a secret manager or environment variables, never in ckan.ini or other files committed to source control. Register each redirect URI exactly as CKAN will call it, using HTTPS and the /user/login/oidc-pkce path, with no wildcards. Remove leftover staging or localhost entries before go-live.
Verify ID token checks
Read the extension's code before you trust its login. The ID token from Okta must be checked for signature, issuer, audience and expiry, and a token that fails any one of these checks should create no CKAN session. Confirm that signing keys come from the issuer you configured and that the audience matches your client ID. Then test with an expired token, a token issued for another client and a token from a different issuer, and confirm each is rejected. The package notes it was developed for Okta and not tested with other providers, so your own review and test results are the evidence.
Extension package pageSession cookies and workers
The login state lives in a session cookie, so its settings decide who can reuse a login. Review the cookie attributes in your CKAN configuration, including whether the cookie is sent only over HTTPS, and confirm the SameSite setting still works with the redirect back from Okta. When several CKAN web workers sit behind a load balancer, each worker must read the same session data. Check where sessions are stored and whether that store is shared. Test logout on one worker and confirm the session ends on every other worker too.
Admin and service account hygiene
Treat Okta admin roles and service accounts as the highest-value identities in this setup. In a root cause analysis published November 3, 2023, Okta reported that a threat actor accessed files in its customer support system associated with 134 Okta customers, using a service account credential an employee had saved to a personal Google profile. Apply that lesson here: keep API tokens in an approved secret store, limit admin roles to named people, require strong multi-factor authentication for admins, and rotate service credentials on a schedule you can show to an auditor.
Okta root cause analysisOkta data residency cell
Confirm which Okta cell your tenant runs in before you connect CKAN, and whether that choice can change later. Okta lists cells across the US, EMEA, Japan, Australia, Canada and India. Okta also states that sub-processor processing locations can vary with the service and the cell you select, so ask for the current sub-processor list and processing locations for your cell. Record the cell, the sub-processor locations and the CKAN hosting region together in your data inventory, since cross-border login data can matter to data protection reviewers.
Okta data residencySign-in and admin logs
Log events on both sides so an investigation can connect them. On the CKAN side, record login attempts through the /user/login/oidc-pkce route, new accounts and sysadmin changes, and ship those logs to a store your security team can query. On the Okta side, export the System Log events for sign-ins and administrator changes, such as app assignments, policy edits and admin role grants, and keep copies outside the tenant. In a test run, match timestamps and user identifiers across both sides, and confirm you can answer who signed in, from where, and which admin changed the app.
Testing the login against Okta and other identity providers
Each path into CKAN through Okta can create, match or change a CKAN account, so test these cases with test users in a non-production instance before any real user signs in. Use the login route at /user/login/oidc-pkce for every case, and compare each result with the access model you wrote down before testing. Keep the outcome of each case in a dated test log.
- First sign-in creates the account: Sign in once with a new Okta test user and confirm that one CKAN account appears with the expected username, email address and display name.
- Repeat sign-in reuses the account: Sign in a second time and confirm that no duplicate account appears and that the existing account keeps its organization memberships and roles.
- MFA policy enforcement: Confirm that the Okta policy for the CKAN application requires the factors you intend, and that no CKAN route lets a user reach a session without completing them.
- No organization access: Sign in as a user who belongs to no CKAN organization, and confirm that the user sees only what your access model allows, with private datasets hidden.
Keep these results with the access model so that a later upgrade or Okta policy change can be checked against the same cases.
Sessions and account status change after the first sign-in, so these checks cover what happens when a user leaves, goes idle or loses access in Okta. They also confirm the recovery path that administrators will use if Okta is unavailable. Run each case on the same test instance and record the timeout values from your configuration.
- Sign-out: Sign out of CKAN and confirm that the old session cookie no longer grants access. Then check whether signing out also ends the Okta session, and document the answer for your users.
- Session expiry: Leave a CKAN session idle past the timeout you configured, and confirm that the next request requires a new sign-in through Okta.
- Deactivated Okta user: Deactivate a test user in Okta and attempt a new sign-in, which should be refused. Then measure how long an already open CKAN session stays valid, and decide whether your process needs to end that session sooner.
- Break-glass sysadmin path: Confirm that a named sysadmin can still sign in through the standard CKAN login while Okta is unavailable or misconfigured. The extension leaves that login in place, so keep this case in the test cycle for as long as it is your recovery path.
Repeat these checks after every change to Okta policies, session settings or CKAN configuration, because each change can alter the result.
The ckanext-oidc-pkce extension on PyPI was developed for Okta and was not tested with other providers, so treat every other OpenID provider as untested. Swapping the issuer, client ID or client secret is not enough to show that the login works. Before using another provider, design and run a full test cycle that covers the Okta cases and adds the checks below.
- Claims and mapping: Confirm which claims CKAN receives for username, email address and display name. Confirm that a missing claim fails safely, without creating an account with incomplete data.
- Failure cases: Test a wrong client secret, a revoked user, an expired token and a provider outage, and confirm that each fails without granting access.
- Provider MFA and sessions: Verify the provider's own multi-factor and session settings, because the Okta policy checks do not carry over to another provider.
- Written sign-off: Record the provider version, the test results and the named owner who accepts the remaining risk before any user signs in through the new provider.
Confirm that the test record is complete and signed off before you open the login route to users.
Why CKAN OpenID Connect login with Okta fails and how to fix it
This table pairs each common failure with its likely cause and the fix to try first. Work through the redirect and route checks before the session and account checks, since early failures block everything after them. The extension was developed for Okta and documented for CKAN 2.9 and 2.10, so confirm both before debugging further.
| Symptom | Likely cause | Fix |
|---|---|---|
| Okta shows a redirect URI mismatch error | The callback URL CKAN sends differs from the Okta redirect URI in scheme, host, port or path | Copy the exact callback URL from CKAN and register it in Okta with the same scheme, host, port and path. |
| Login route returns not found | The plugin is missing from the plugins setting, or workers were not restarted after install | Add the plugin to the plugins setting, install it in the CKAN environment, then restart the web server and background workers. |
| CKAN fails to start after the change | The CKAN version is outside the 2.9 and 2.10 range the extension documents | Confirm your CKAN version first. Move to a supported version or test on a staging copy before enabling the plugin. |
| Duplicate or unexpected usernames | The claim mapped to the CKAN username is not unique or changes for some users | Pick one stable, unique claim, check existing accounts for collisions, and test with two Okta users before go-live. |
| User signs in but sees no organization access | The CKAN account exists without organization membership or a role | Add the user to the right organization with the right role in CKAN, and confirm how your setup assigns memberships. |
| Login fails between redirect and callback | The session cookie is lost across load-balanced workers or a cookie domain mismatch | Use sticky sessions or shared session storage, and set the cookie domain to match the public host name. |
| Standard CKAN login form still visible | The extension keeps the original login in place by design | Hide the form in your theme or with another extension if only SSO accounts should sign in, then test as a logged-out user. |
| Okta returns a client or app type error | The Okta app was created with a client type that does not match the extension's flow | Edit or recreate the app with the client type the extension expects, and check the client secret and grant settings. |
What buyers ask before adding Okta login to CKAN
How much does Okta login for CKAN cost?
Two separate costs apply: the Okta subscription and the labor to configure and test the login. Okta sells Workforce Identity suites per user per month, billed annually, with a $1,500 annual contract minimum according to Okta's pricing page, so the subscription depends on your user count, chosen suite and contract term. The subscription is paid to Okta and recurs every year. DeployOpen's labor is quoted from a written scope and covers the Okta application setup, the CKAN extension and configuration, account and role decisions, testing and handover. DeployOpen does not publish a price list. Scope drivers include the number of CKAN environments, how many Okta groups must map to CKAN roles, and how much testing your security team expects. Ask for a quote that separates one-time setup from any recurring support retainer, and confirm who holds the Okta tenant and its license.
How long does it take to add Okta login to CKAN?
No duration was supplied for this topic, so the schedule follows the scope you agree in writing. The main drivers are the number of environments, usually a staging CKAN and a production CKAN, how many Okta applications and groups must be set up, and how many decisions about account matching and roles are still open. Work that waits on a security review, a change window or Okta administrator approval often lengthens the calendar more than the configuration itself. Ask for a timeline with milestones for staging sign-in, role mapping sign-off, break-glass testing and production cutover, and confirm which milestones your team owns. A fixed-scope agreement should state these milestones before work starts.
What do we need to provide for an Okta login project?
The work needs four things from your side:
- Okta admin access to create and configure an OpenID Connect application for your CKAN host.
- A staging CKAN that matches production's version and plugins, so redirect URIs and sign-in can be tested before go-live.
- Decisions on account matching, such as whether an Okta sign-in links to an existing CKAN user by email, and how Okta groups map to CKAN roles and organizations.
- Named break-glass accounts that can still sign in with a local CKAN password if Okta is unavailable, with a documented owner for each one.
Confirm the login path and redirect settings against your CKAN version before the build starts, since the extension's listing describes compatibility with CKAN 2.9 and 2.10.
Can our in-house team add Okta login to CKAN themselves?
Yes, if the team has both skills the work needs. The first is CKAN plugin experience: installing extensions, editing the configuration file, restarting web and worker processes, and reading plugin code. The second is Okta administration: creating OIDC applications, assignments, groups and sign-on policies. The extension itself is small, but the risk sits in surrounding decisions. Careless account matching can create duplicate accounts or let one user take over another, and the standard CKAN login must be handled deliberately. If either skill is missing, that gap is where a partner's time usually goes. Plan for staging time, tests of failed sign-ins and expired sessions, documentation of break-glass access, and a handover to whoever will patch CKAN later.
Which Okta suite do we need for CKAN single sign-on?
Okta's pricing page lists Single Sign-On in the Starter suite, so Starter covers the sign-in this extension needs, subject to your user count and other requirements. Essentials adds Adaptive MFA, Lifecycle Management and Access Governance. Enterprise adds API Access Management, Access Gateway and machine-to-machine tokens. Access Gateway is a reverse proxy for on-premises apps without federation support, and this CKAN login does not depend on it, so it should not be the reason to buy Enterprise for this project alone. Choose the suite on your other needs, such as MFA policy, lifecycle automation or API access for other systems. Confirm current suite contents on the pricing page before purchase, because packaging can change.
Should we choose a different identity path for CKAN?
Choose this extension when Okta is your identity provider and you accept that it was developed for Okta and has not been tested with other providers. For other providers, look at the CKAN single sign-on with Keycloak topic, which covers community extensions and how upstream identity providers reach CKAN through Keycloak. If you need SAML2, the ckanext-saml2auth extension adds SAML2 single sign-on to CKAN 2.10 and later and can assign users to organizations and roles from SAML2 attributes. If your organization already federates other systems through one of these, check whether that existing setup fits better before adding a second identity path to CKAN.
How DeployOpen scopes and delivers the CKAN Okta login
DeployOpen sets up CKAN OpenID Connect login with Okta using PKCE inside infrastructure you control, with the Okta tenant, CKAN configuration and login route agreed in writing before work starts. The ckanext-oidc-pkce extension is built for Okta and has not been tested with other providers, so we scope and test against your Okta setup and CKAN version. Engagements are fixed-scope, and ongoing support is available as a retainer.
How we scope
- The written scope names your CKAN version, Okta org and the login route at
/user/login/oidc-pkce. - We confirm the extension supports your CKAN release, since its listed compatibility covers CKAN 2.9 and 2.10.
- The scope states whether the standard CKAN login stays available or is hidden for SSO-only accounts.
How we build
- Configure the Okta application for the authorization code flow with PKCE and the exact redirect URI for your portal.
- Install and configure ckanext-oidc-pkce on a staging CKAN, then promote the same configuration to production.
- Test the sign-in and sign-out paths on staging before production cutover, and record the results.
How we hand over
- Written configuration record covering Okta app settings, CKAN config keys and the redirect URI in use.
- Decision note on hiding the standard login form, with any template change tested and documented.
- Runbook for rotating Okta client settings and for checking the login after each CKAN upgrade.
How we support
- Retest the login after each CKAN patch or minor upgrade, and after any Okta tenant change.
- Ongoing support and continuous testing are available as retainers, scoped in writing.
- Okta licensing is billed by Okta to your organization, so confirm your suite includes the SSO features you need.

