Extension SSO


Extension Basics

Title
SSO
Name
ckanext-sso
Type
Public extension
Description
OpenID Connect plugin for CKAN providing Keycloak-based Single Sign-On authentication used by the B.C. Data Catalogue.
CKAN versions
Download-Url (zip)
Last commit
9 months ago (2025-06-03 17:57:22)
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

ckanext-sso

OpenID Connect plugin for CKAN used by the B.C. Data Catalogue.

Currently only supports Keycloak.

Features

  • Keycloak-based Single Sign-On (SSO) authentication
  • Bearer token support for CKAN REST API access
  • Auto-creation of CKAN users for corresponding Keycloak users
  • Original CKAN auth works alongside SSO
  • Users are added to organizations based on Keycloak group memberships
  • Sysadmin group assignment via Keycloak groups

Requirements

  • CKAN 2.7+
  • Keycloak identity provider

Installation

To install ckanext-sso:

  1. Activate your CKAN virtual environment.
  2. Clone the source and install it: git clone https://github.com/bcgov/ckanext-sso.git cd ckanext-sso pip install -e .
  3. Add sso to the ckan.plugins setting in your CKAN config file.
  4. Configure the Keycloak settings in your CKAN config.

Config settings

ckan.sso.authorization_endpoint = <keycloak auth endpoint>
ckan.sso.realm = <keycloak realm>
ckan.sso.client_id = <client id>
ckan.sso.client_secret = <client secret>
ckan.sso.sysadmin_group_name = <group name for sysadmins>
ckan.sso.profile_group_field = <field for group membership>
ckan.sso.profile_username_field = <field for username>
ckan.sso.profile_email_field = <field for email>
ckan.sso.profile_fullname_field = <field for display name>
ckan.sso.profile_group_delim = <delimiter for groups>

License

AGPL-3.0

Version
0.1
Version release date
(not set)
Contact name
B.C. Government
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

Requires Keycloak identity provider. Configure authorization endpoint, realm, client ID and secret.

Plugins to configure (ckan.ini)
sso
CKAN Settings (ckan.ini)
# ckan.sso.authorization_endpoint = https://keycloak.example.com/auth
# ckan.sso.realm = ckan
# ckan.sso.client_id = ckan-client
# ckan.sso.client_secret = your-secret
# ckan.sso.sysadmin_group_name = sysadmins
# ckan.sso.profile_group_field = groups
# ckan.sso.profile_username_field = preferred_username
# ckan.sso.profile_email_field = email
# ckan.sso.profile_fullname_field = name
# ckan.sso.profile_group_delim = ,
DB migration to be executed
(not set)
<< back to Extensions