Managing CKAN sysadmins and site-wide administration

Sysadmins can change almost anything on a CKAN portal, so the group should stay small. This page covers command-line sysadmin creation, email-list management with ckanext-saml2auth, and separating site administration from organization administration.

On this page

CKAN sysadmin management: who needs site-wide rights and why

Sysadmin rights in CKAN are site-wide, so they belong to a small group of people who run the platform. Publishers should hold organization roles instead, which limit what they can change to the datasets and settings of their own organization. A sysadmin can edit or delete content across every organization and reach settings that affect every visitor, so each sysadmin account is a standing risk. Portal teams often find the list has grown by accident: a developer kept access after a migration, a publisher was made sysadmin to fix one stuck dataset, and nobody removed the account when that person changed roles. Treat the current list as something to review before you rely on it.

Three moments make this question urgent. An SSO rollout changes how accounts are created and signed in, so an old sysadmin account may no longer match a person your identity provider still manages. Staff turnover leaves accounts behind when people move out of publishing or platform roles. Audit requests ask you to name every holder, the reason each one holds the right, and when access was last reviewed. If you cannot answer those questions from a current list, build that list before the SSO cutover or the audit window opens. Start by listing every account with sysadmin status in your portal and confirming each holder with their manager.

This page covers how to create the first sysadmin from the command line, how to manage sysadmins by email list when ckanext-saml2auth handles sign-in, and how to keep site administration separate from organization administration so that a department admin does not need platform rights. If you use ckanext-saml2auth, the ckanext.saml2auth.sysadmins_list setting holds the email addresses that receive sysadmin rights. Confirm with your identity team whether that list or group membership in your identity provider will be the source of truth, because the two can drift apart and the portal will follow whichever one you configure.

Ways to grant and manage sysadmin rights in CKAN

This table compares four ways to give someone site-wide administrator rights in CKAN and the settings that control them. Read each row for what it changes, who runs it and the situation it suits. Keep the sysadmin group small whichever route you choose, and confirm exact commands against your CKAN version before you run them.

OptionWhat it changesWho operates itWhere it fits
Command line sysadminSets the sysadmin flag on an existing CKAN user account directly on the server.Platform or site administrator with shell access to the CKAN host.Small teams with few sysadmins and no external identity provider managing accounts.
Sysadmin email list (ckanext-saml2auth)Grants sysadmin rights to listed emails through ckanext.saml2auth.sysadmins_list, from the ckanext-saml2auth extension.Platform team that maintains the extension configuration for the site.SSO portals where a short, named list of administrators should be easy to audit.
Internal login toggleTurns CKAN's own username and password login on or off through ckanext.saml2auth.enable_ckan_internal_login.Platform team, alongside the SSO configuration.SSO-only portals that should not offer local passwords, after confirming a sysadmin can still sign in.
Organization admin roles onlyGrants no site-wide rights. Organization admins manage members and datasets inside their own organization only.Organization admins appointed by each department.Departmental publishing where no one needs site settings or cross-organization control.

Why site administration and organization administration should stay separate

Keep site administration and organization administration in separate hands, because the two roles answer different questions. A sysadmin acts across the whole portal: every organization, every dataset including private ones, every user account and the site configuration. An organization admin acts only inside one organization, where they manage its members and its datasets. The difference sets how far a single mistake or compromised account can reach, so the role map should start from the smallest power each person needs to do their job.

Giving publishers site-wide power is a governance risk even when every person is trusted. A publisher with sysadmin rights can change or remove datasets that belong to departments they do not represent, alter another organization's membership, and edit user accounts outside their mandate. That weakens the audit trail a portal owner must be able to explain, because it becomes unclear who changed a dataset and whether the change was within that person's authority. Separation keeps publishing decisions inside each organization and keeps the sysadmin group small enough that its members can be named, reviewed and removed quickly.

The opposite problem is also a risk: a portal where nobody can fix a broken organization or user. If the last organization admin leaves, a user is locked out, or an organization's ownership is wrong, the people inside that organization may be unable to repair it, and only a sysadmin can act across the portal. Plan for at least one named, reviewed sysadmin who holds no publishing role, and document how that person is reached when an organization admin is unavailable. Before you draft a role map, read the CKAN documentation for your version and confirm the exact permissions each role carries, since installed extensions can change authorization behavior. Record the confirmed permissions in the role map so a reviewer can check them.

Setting up CKAN sysadmins from the command line and the email list

This sequence moves CKAN site administration from an unclear set of accounts to a short, reviewed list of sysadmins. It starts with an inventory of who holds the sysadmin flag today, creates a known first account from the command line, and then hands the approved list to ckanext-saml2auth so that sign-in enforces it. Each step ends with a check, so you finish with a list you can explain to an auditor.

  1. Inventory current sysadmins and their owners

    Before changing anything, list every account that currently has the sysadmin flag, using the CKAN admin pages or a database query run by your platform team. Record who owns each account: a named person, a shared service account, or an integration. Ask the platform owner to confirm which accounts are still needed and which were created for a one-off task. The step is done when you have a written inventory with one owner per account and no account marked as unknown. Keep this record, because the removals in later steps depend on it.

  2. Decide the target sysadmin list

    Agree the short list of people who will hold site-wide rights, and name the role each one needs, such as platform operations, security review or emergency access. Keep service accounts and shared mailboxes off the list. Confirm with the data governance owner that organization administrators are not being granted site-wide rights by default. Record the email address each person signs in with through your identity provider, because that address is what the sysadmin list will match. The step is done when the owner signs off the list and every entry matches a recorded sign-in address.

  3. Create the first sysadmin from the command line

    On the staging CKAN server, as the account that runs CKAN, use the sysadmin subcommand of the CKAN command-line tool to flag one known user, for example by running ckan sysadmin add followed by the username. Confirm the exact subcommand and prompts for your CKAN version in its documentation before you run it. Then sign in as that user and open the account page to confirm the sysadmin flag is set. The step is done when the account signs in with site-wide administration visible, and the change is written to your change record.

  4. Install and configure ckanext-saml2auth

    Install ckanext-saml2auth into the same Python environment as CKAN, add it to the plugins setting, and configure your SAML2 identity provider settings as the extension documents them. Confirm that the extension version you install supports your CKAN release, since the extension is designed for CKAN 2.10 and later. Test single sign-on with one non-privileged test account before changing anything about sysadmins. The step is done when that test account signs in through the identity provider and lands in CKAN with its expected role.

  5. Set the sysadmins list to approved addresses

    Set ckanext.saml2auth.sysadmins_list in the CKAN configuration to the approved email addresses from your target list, using the separator format the extension documents. Keep your inventory open while you do this, because an account removed from the list loses site-wide rights at its next sign-in, not at the moment you edit the file. Restart CKAN as your deployment process requires. The step is done when the configuration lists exactly the approved addresses and your inventory marks every other flagged account for removal.

  6. Decide on enable_ckan_internal_login

    Decide whether users can still sign in with CKAN's own username and password alongside single sign-on, and set ckanext.saml2auth.enable_ckan_internal_login to match that decision. Keeping internal login on gives you a fallback if the identity provider is unavailable, but it also creates a second sign-in path with its own password controls and review. Decide explicitly whether any sysadmin needs that fallback. The step is done when the setting and its reason are recorded and the security owner has accepted the choice.

  7. Test a non-sysadmin account and a sysadmin

    On the staging portal, sign in with an account that is not on the sysadmin list and confirm it cannot reach site-wide administration pages, such as the admin area or edits to organizations it does not belong to. Then sign in with a listed sysadmin account and confirm the sysadmin flag shows as set. Run these sign-ins on staging first, because sign-in behavior should be verified there before any production change. The step is done when both accounts behave as their list entries predict.

  8. Confirm removed addresses lose site-wide rights

    On staging, take one test address off the sysadmin list, then have that user sign in again. Confirm that site-wide rights are gone at that next sign-in by checking the account page and an admin-only page, and record the time and the outcome. Repeat this check whenever the list changes. The step is done when a removed address is confirmed to lose site-wide rights, and the staging result is attached to your change record before the same change goes to production.

How a sign-in decides whether a user becomes a sysadmin

The sign-in starts at your SAML2 identity provider, which authenticates the user and passes attributes, including the email address, to the CKAN server. Inside CKAN, ckanext-saml2auth compares that address with the list set in ckanext.saml2auth.sysadmins_list. A match gives the account sysadmin rights, and no match leaves it as a regular user. The boundary marks the hand-off between the identity provider and CKAN, so the identity provider must send an email address you trust. The internal login branch applies only when ckanext.saml2auth.enable_ckan_internal_login is on, and you should confirm how it assigns sysadmin rights. Command-line sysadmin creation is a separate administrator action on the server. Confirm each branch in a test environment before relying on it.

Expected sign-in flow, to confirm in your environment before relying on it.

Security risks in sysadmin management and how to contain them

Sysadmin rights reach every organization, private dataset and site setting, so a weak process here affects the whole portal. The six risks below share one root cause: the sysadmin group changes without a named owner, a recorded reason or a regular review. Each card pairs a risk with the control that closes it and the check to run in your environment.

Stale sysadmins who have left

A sysadmin who has left the organization keeps full site-wide rights until someone removes them. Those rights reach every organization, every private dataset and every site setting. Removal belongs in the offboarding checklist, next to identity provider deprovisioning, with a periodic review that compares the sysadmin list against current staff. Confirm who owns that checklist, how quickly removal happens after an exit, and whether contractors or service accounts appear on the list.

Drift between the email list and the identity provider

With ckanext-saml2auth, sysadmin status can come from the ckanext.saml2auth.sysadmins_list setting, a list of email addresses maintained apart from your identity provider. When someone changes role or leaves in the directory, the CKAN list can keep the old entry. Treat the identity provider group as the source of truth and reconcile the list against it on a fixed schedule. Confirm who edits the setting, where each change is recorded, and whether a directory change triggers any update in CKAN.

Internal login left enabled as a bypass path

CKAN's internal username and password login can stay available beside SSO. That lets anyone holding a local account sign in without passing through the identity provider's controls, such as multi-factor authentication or account disabling. The ckanext.saml2auth.enable_ckan_internal_login setting controls this path. Where SSO is the only approved method, disable internal login. Before changing it, list local accounts that hold sysadmin rights and document a planned, logged fallback for when the identity provider is down.

saml2auth extension docs

Shared or generic sysadmin accounts

A shared login such as admin or a team mailbox hides who acted on the site. When several people use one account, a change to a dataset or a setting cannot be traced to a person, and removing one person's access means changing the password for everyone. Each sysadmin needs a named individual account, with any API token issued to that same person. Confirm that no generic accounts appear in the user list, that the sysadmin list contains only personal addresses, and that break-glass credentials sit in your secrets vault with a named owner.

Missing records of additions and removals

If nobody recorded who was added as a sysadmin, when, and on whose approval, a later review cannot confirm that the grant was legitimate. Changes to the sysadmin list often happen through a configuration file or a command run on the server, and those changes can leave no trail unless you record them. Keep a change record for every addition and removal, with the requester, approver, date and reason, stored outside the CKAN server. Confirm where your deployment keeps configuration history and whether server logs retain command output.

Sysadmin rights used for routine publishing

Sysadmins can edit any dataset on the site. Using that account to publish, correct metadata or manage a team's drafts turns every routine mistake into a site-wide one and widens the damage a stolen session can do. Publishing work belongs to organization roles, and sysadmin stays reserved for site configuration and emergency access. Give publishers organization roles and limit sysadmin to administration. Confirm which sysadmins also publish, and whether any publisher holds sysadmin only because a dataset once needed a one-time fix.

Which sysadmin model fits your portal

A portal run by one department and one platform team usually keeps sysadmin rights with a small group of platform engineers who install, upgrade and back up CKAN. Publishing stays in organizations, so department staff rarely need site-wide rights. Sign-in is often a local CKAN account, so the sysadmin group is maintained by hand and reviewed as part of normal platform access checks.

  • Sysadmin holders: Limit rights to the engineers who are on call for the portal, and keep department staff out of the group, even senior ones.
  • Account creation: Create the first and any later sysadmin from the command line, and record each grant in your access register so the list can be audited.
  • Publishing roles: Give each publishing team an organization with editor or admin rights, so dataset work never depends on site-wide rights.
  • Login: Local accounts are common here, so agree password rules, account removal and leaver steps with your identity team.
  • Review cadence: Recheck the sysadmin list whenever a platform engineer changes role or leaves the team.

Before relying on this model, confirm how your team removes a sysadmin account and where that change is recorded in your environment.

Limits to confirm before you change sysadmin access

Sysadmin rights in CKAN reach every organization and dataset, so confirm these limits before you change who holds them. Each item depends on your CKAN version, your identity provider and your extension release, and the answer can differ between a test portal and production. Check every item against your own environment and the ckanext-saml2auth repository before you rely on it.

Command options for your version

The sysadmin subcommand of the ckan command accepts different arguments depending on the CKAN version you run, so the syntax in a blog post or older guide may not match your install. Run the help output for the exact installed version from the same virtual environment and service user that runs CKAN, and record the subcommands and options you intend to use. Test a grant and a revoke on a staging copy first, since a mistyped email can make the wrong account an administrator.

Match the saml2auth release

The ckanext-saml2auth extension adds SAML2 sign-on to CKAN 2.10 and later, but that range alone does not tell you which extension release to install. Find the release the repository lists for your exact CKAN version, and confirm it installs against the rest of your pinned dependencies. Repeat that check whenever CKAN moves to a new minor version, because the extension may need a newer release. Record the CKAN and extension versions together in your change record.

ckanext-saml2auth repository

Removal timing after sign-out

When you delete an email address from the sysadmin list, confirm whether that person loses administrator rights immediately or only at their next sign-in. The answer depends on how the extension evaluates ckanext.saml2auth.sysadmins_list and whether an existing browser session or API token keeps working. Test it with a disposable account: remove the address, then check whether the account can still reach admin pages in an open session and through an existing token. Write down what happens so your offboarding steps match the observed behavior.

Email attribute from your identity provider

The sysadmin list depends on the email value your identity provider sends, so the attribute name, its format and its letter casing all affect whether a grant works. Ask the identity team for the exact attribute name, whether it is always populated, and whether addresses can change or be reassigned to someone else. Compare a test login with the entries in ckanext.saml2auth.sysadmins_list, including upper and lower case. An address that is missing from the login response may not match, so an admin can appear to hold no rights.

Whether changes reach portal logs

Confirm whether grants and revocations of sysadmin rights leave a trace in the portal logs your auditors can read, because the events CKAN logs by default may not include every access change. Check where application logs go in your deployment, how long they are kept, and who can read them. If a grant made through the identity provider does not appear in CKAN logs, record the change in your own access register. Test one grant and one revocation and keep the log lines as evidence for the review.

Behavior during CKAN upgrades

Patch releases of CKAN do not break backwards compatibility, but minor releases may include backwards-incompatible changes, so a move to a new minor version needs its own test. Check how your sysadmin configuration, the extension release and your login flow behave on a staging copy at the target version before you upgrade production. CKAN 2.12.0 was released on August 26, 2026, and the project supports the latest patch of the current minor version and the previous minor version. Plan upgrade windows around that support policy.

CKAN release policy

Common questions about CKAN sysadmin management

How much effort does a CKAN sysadmin cleanup take and what drives it?

Effort depends mostly on how many accounts hold sysadmin rights, how they were granted, and how quickly each owner can confirm they still need access. Discovery and confirmation often take longer than the configuration change itself. The main drivers are:

  • The number of accounts with sysadmin rights, including old test, shared and service accounts.
  • How many people must confirm each account, and how quickly they respond.
  • Whether sysadmins were added by hand over time, with no record of why.
  • How many identity provider groups or attributes must change to match the decision.
  • How much testing the staging portal needs before production changes.

The cleanup itself is one-time work. The reviewed list and the periodic check that follows are recurring. Ask for a quote that itemizes discovery, owner confirmation, configuration, testing and handover, and states who performs each.

Can our own team clean up CKAN sysadmin accounts without outside help?

Yes, if one or two people have shell access to the CKAN host, administrator rights in the identity provider, and enough CKAN experience to change settings safely. The mistakes that catch internal teams most often are:

  • Removing the last working sysadmin, which leaves no one able to fix a broken login.
  • Changing the identity provider before the CKAN setting that reads it is ready.
  • Missing automation, such as harvesters or publishing scripts, that depends on a sysadmin's API token.

Before deciding, confirm who can reach each system, whether a staging portal exists, and who signs off on each removal. A written plan with a rollback step lowers the chance of a lockout. A scoped review by an outside party is a sensible first step for a team new to this work.

How long does a CKAN sysadmin management project usually take?

No duration can be fixed in advance. The schedule follows the number of accounts to review, how quickly named owners respond, and whether the identity provider and staging portal are ready when the work starts. Timing also depends on change windows at your organization and on other CKAN work running in parallel, such as an upgrade. Phases usually run in sequence: an inventory of current sysadmins, owner confirmation, a change to the sysadmin list or command-line process, testing on staging, and then production with a check of every account afterward. Waiting for people is often the longest step, so the plan should set a response deadline for each owner. Ask for a schedule with milestones, the client inputs each milestone needs, and the point at which the work is considered complete.

What does our team need to provide for a sysadmin cleanup?

Four things are needed from your side before the work starts:

  • Access to the identity provider, so the group or attribute mapping that grants sysadmin rights can be read and changed under your change control.
  • Server access to the CKAN host, including the configuration file and the command-line tools that list and remove sysadmins.
  • A staging portal close enough to production to test login, the sysadmin list and the API tokens automation relies on.
  • A named owner for each sysadmin account who confirms the access is still needed and approves removal.

Also name one decision-maker who settles disputes about accounts. In the quote, ask which of these items DeployOpen expects from your team, when each is needed, and how any temporary access is removed at handover.

Does the CKAN sysadmin email list work without single sign-on?

The email list only works where users sign in through ckanext-saml2auth, so it depends on single sign-on. Without SSO, sysadmin rights stay in CKAN's own user records and are managed with the command-line tools on the server. The extension can also turn CKAN's internal login on or off through ckanext.saml2auth.enable_ckan_internal_login, so set that key deliberately before relying on the list. Confirm in the extension's documentation how the list treats accounts that log in with a password, and test both login paths on staging. In the quote, ask how each login path will be handled and who reviews the list over time.

What changes to sysadmin management when we upgrade CKAN?

The sysadmin list and its settings must be rechecked on every upgrade, and the extension must be confirmed compatible with the target version. CKAN's release policy says patch releases do not break backwards compatibility and exclude schema changes and new features, while minor releases may include backwards-incompatible changes. A patch update is therefore usually a smaller check than a minor version move. Plan these steps:

  • Confirm that ckanext-saml2auth supports the target CKAN version, since it covers CKAN 2.10 and later.
  • Read the release notes for the target version for changes to authentication or user handling.
  • After the upgrade, verify that each listed sysadmin can log in and that removed accounts cannot.

Ask the quote whether the upgrade is included and whether sysadmin checks form part of the upgrade acceptance steps. The CKAN release policy explains how patch and minor releases differ.

How DeployOpen scopes and delivers sysadmin management

DeployOpen treats sysadmin management as an access decision before it is a configuration task. We scope which people need site-wide rights, separate them from organization administrators, and build the sign-in and admin list in your own infrastructure. Each engagement is fixed-scope, with the written scope agreed before work starts.

How we scope

  • The written scope lists every person who will hold site-wide sysadmin rights and the reason each one needs them.
  • Site administration and organization administration are scoped separately, with a named owner for each sysadmin decision.
  • Fixed-scope engagements agree the sysadmin list format, sign-in method and change process in writing before work starts.

How we build

  • Create the first sysadmin from the command line, then confirm that account signs in before other changes.
  • Where SSO is used, set ckanext.saml2auth.sysadmins_list to the approved email addresses and keep the list under change control.
  • Decide whether ckanext.saml2auth.enable_ckan_internal_login stays enabled, and document which local accounts can still sign in.

How we hand over

  • A sysadmin register listing each account, who approved it, the date granted and its business reason.
  • Runbook steps for adding, removing and reviewing sysadmins, including the command-line commands used in your environment.
  • A walkthrough with your administrators on site rights and organization admin roles, recorded against the written scope.

How we support

  • Ongoing support is available as a retainer, and sysadmin list reviews can be included in its written scope.
  • Retesting of admin settings and access paths can be added to confirm rights still match the approved list.
  • Confirm with your identity provider team and against your CKAN version's documentation before relying on these settings.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.