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.
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:
- Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
- Clone the source and install it on the virtualenv
git clone https://github.com/DataShades/ckanext-auth.git
cd ckanext-auth
pip install -e .
-
Add
authto theckan.pluginssetting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini). -
Apply database migrations:
ckan db upgrade
- 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
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ckanext_auth-0.4.5.tar.gz | 41.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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.