Extension Drupal IDP


Extension Basics

Title
Drupal IDP
Name
ckanext-drupal-idp
Type
Public extension
Description
Drupal session-based authentication
CKAN versions

~2.9, ~2.10, ~2.11

Show details
Download-Url (zip)
Download-Url commit date
2025-04-01
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

Authenticates CKAN users via Drupal session cookies. Automatically creates missing users using data from Drupal database and optionally synchronizes user details when changed on Drupal side. Features include automatic user creation from Drupal sessions, configurable user synchronization, sysadmin inheritance from Drupal admin role, custom Drupal field synchronization, same ID option for CKAN/Drupal user alignment, static request skipping for CSS/JS resources, kick_user option for missing sessions, API actions (drupal_idp_user_show, user_initialize, user_synchronize), CLI commands for user management, and configurable Drupal login endpoint redirect.

Version
0.5.0
Version release date
2025-04-01
Contact name
DataShades / Sergey Motornyuk
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Installation: git clone, pip install -e ., add ‘drupal-idp’ to ckan.plugins, configure Drupal DB. Configuration: ckanext.drupal_idp.db_url (mandatory, e.g., mysql://drupal_user:drupal_pass@127.0.0.1:3306/db_name) for Drupal database connection, ckanext.drupal_idp.synchronization.enabled (default: false) to sync user details on every session, ckanext.drupal_idp.host (optional) for static hostname useful in local testing, ckanext.drupal_idp.admin_role.inherit (default: false) to grant sysadmin to Drupal admins, ckanext.drupal_idp.admin_role.name (default: ‘administrator’) for admin role name, ckanext.drupal_idp.same_id (default: false) to use Drupal ID as CKAN user ID, ckanext.drupal_idp.extra_fields (default: []) for custom Drupal fields to sync, ckanext.drupal_idp.skip_static (default: false) to skip identification for static requests, ckanext.drupal_idp.kick_user (configurable) for missing session handling, ckanext.drupal_idp.drupal_login_endpoint (configurable) for login redirect. API actions: drupal_idp_user_show(id=DrupalID), user_initialize, user_synchronize. CLI: ‘ckan drupal-idp user list’ to list users with DrupalID. Requirements: Python >=3.6, CKAN >=2.9 (v0.5.0 requires CKAN >=2.10). Use cases: Drupal-CKAN integration, unified user management, SSO via Drupal sessions, role synchronization.

Plugins to configure (ckan.ini)
drupal-idp
CKAN Settings (ckan.ini)
# ckanext.drupal_idp.db_url = <URL> # ckanext.drupal_idp.synchronization.enabled = true # ckanext.drupal_idp.host = my.site.com # ckanext.drupal_idp.admin_role.inherit = true # ckanext.drupal_idp.admin_role.name = administrator # ckanext.drupal_idp.same_id = true # ckanext.drupal_idp.extra_fields = field_age field_xxx # ckanext.drupal_idp.skip_static = yes
DB migration to be executed
(not set)
<< back to Extensions