Skip to main content

Tests

This extension partially based on the ckanext-security

The extension provides a 2FA authentication mechanism for CKAN.

There are two methods of 2FA available:

  • TOTP (Time-based One-Time Password) with authenticator apps like Google Authenticator, Authy, etc.
  • Email

Requirements

Python 3.10+

This extension uses Redis, so it must be configured for CKAN.

Compatibility with core CKAN versions:

CKAN version Compatible?
2.9 and earlier no
2.10 yes
2.11 yes

If you want to add compatibility with CKAN 2.9 and earlier, you can contact me and I'll help you with that.

Installation

To install ckanext-auth:

  1. Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
  1. Clone the source and install it on the virtualenv
git clone https://github.com/DataShades/ckanext-auth.git
cd ckanext-auth
pip install -e .
  1. Add auth to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).

  2. Apply database migrations:

ckan db upgrade
  1. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload

Config settings

There are several configuration settings available for this extension. Check the config declaration file.

If you have the ckanext-admin-panel installed, the configuration settings will be available in the admin panel too.

How to

  • If you want to change the email for email 2FA, you can do it by creating a new template file at auth/emails/verification_code.html.

Tests

To run the tests, do:

pytest --ckan-ini=test.ini

License

AGPL

Metadata

Release files for ckanext-auth 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ckanext-auth 0.4.5
File Size Uploaded Provenance
ckanext_auth-0.4.5.tar.gz 41.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-auth 0.4.5
File Interpreter ABI Platform
ckanext_auth-0.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 88.8 kB

Release files / ckanext_auth-0.4.5.tar.gz

Download URL ckanext_auth-0.4.5.tar.gz
Size 41.6 kB
Tags Source
SHA-256 checksum
How to use checksums
91afe33221ab632ab526f99641f1298ca0540e542970858723361ef922cc9637
BLAKE2b-256 checksum
How to use checksums
41e0027bbd48c2889f4472f50bae93b7cbf8f1ac097ae30b6b551f5f5363d830
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / ckanext_auth-0.4.5-py3-none-any.whl

Download URL ckanext_auth-0.4.5-py3-none-any.whl
Size 47.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b1a9311f37a5fc1d83608addd23b5271ac7728b22c27c960b013401db1bcd9c
BLAKE2b-256 checksum
How to use checksums
9663374b7343ca15d212ca83bee111a806a99e9acbff159da9258c120b87c50f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for ckanext-auth 0.4.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page