CKAN extension that pushes RDF resources to Apache Jena Fuseki, with CKAN-authenticated SPARQL proxy and embedded YASGUI query interface
Project description
ckanext-fuseki
A CKAN extension for semantic data management in research data portals. It automatically pushes RDF resources to an Apache Jena Fuseki triple store, provides a CKAN-authenticated SPARQL proxy that enforces dataset-level access control, and embeds a YASGUI query interface for interactive SPARQL exploration of linked data.
Requirements
- Apache Jena Fuseki server with custom security configuration (see Deployment section)
- CKAN API Token with admin privileges for background job processing of private datasets
Fuseki Deployment
This extension requires a custom Fuseki deployment with modified security settings to enable CKAN-authenticated access. The necessary files are provided in the optional/ folder:
optional/fuseki/Dockerfile- Custom Fuseki image based onsecoresearch/fuseki:4.9.0optional/fuseki/docker-entrypoint.sh- Security wrapper that blocks anonymous dataset accessoptional/fuseki/index.html- Fixed Fuseki UI for subpath deploymentoptional/docker-compose.yml- Example standalone deployment configuration
See the optional/README.md for standalone deployment instructions, or integrate into your existing Docker Compose setup (see Deployment section below).
Optional: A Sparklis web app for interactive SPARQL querying is also available in the optional folder.
Features
- Per-resource upload toggles — selectively push RDF resources (Turtle, N-Triples, JSON-LD, etc.) to Fuseki
- Named graphs — each resource is stored in its own named graph within a dedicated Fuseki dataset
- CKAN-authenticated SPARQL proxy — enforces CKAN dataset-level access control on all SPARQL endpoints
- Public datasets: accessible to anyone via the CKAN proxy
- Private datasets: require CKAN authentication (browser session or API token)
- Direct Fuseki access: blocked for anonymous users, admin-only
- Query Dataset button — embedded YASGUI interface for interactive SPARQL exploration
- Persistent & reasoning options — configurable at dataset level
See SECURITY.md for the full security architecture.
Compatibility
| CKAN version | Compatible? |
|---|---|
| 2.9 and earlier | not tested |
| 2.10 | ✓ tested |
| 2.11 | ✓ tested |
Installation
1. Install the Extension
From PyPI:
pip install ckanext-fuseki
From Source:
pip install -e git+https://github.com/Mat-O-Lab/ckanext-fuseki.git#egg=ckanext-fuseki
2. Deploy Fuseki
Use secoresearch/fuseki:4.9.0 with the provided configuration files mounted as volumes:
services:
fuseki:
image: secoresearch/fuseki:4.9.0
environment:
- JAVA_OPTIONS=-Xmx10g -Xms10g -DentityExpansionLimit=0
- ENABLE_DATA_WRITE=true
- ENABLE_UPDATE=true
- ENABLE_UPLOAD=true
- QUERY_TIMEOUT=60000
volumes:
- jena_data:/fuseki-base
- ./path/to/ckanext-fuseki/optional/fuseki/index.html:/jena-fuseki/webapp/index.html
- ./path/to/ckanext-fuseki/optional/fuseki/shiro.ini:/jena-fuseki/shiro.ini
networks:
- your_network
healthcheck:
test: ["CMD-SHELL", "wget -qO /dev/null http://localhost:3030/$$/ping || exit 1"]
interval: 10s
timeout: 5s
retries: 3
index.html— fixes asset paths for subpath (nginx proxy) deploymentsshiro.ini— configures HTTP Basic Auth; edit to set the admin password
Start Fuseki:
docker-compose up -d fuseki
3. Configure CKAN
Add fuseki to the ckan.plugins setting in your CKAN config file:
ckan.plugins = ... fuseki
4. Restart CKAN
docker-compose restart ckan
# Or for Apache deployment:
sudo service apache2 reload
Config settings
All configuration is read from ckan.ini (or the equivalent CKANINI__ Docker environment variables):
| ckan.ini key | Default | Description |
|---|---|---|
ckanext.fuseki.url |
http://fuseki:3030/ |
Direct internal URL of the Fuseki container — must not go through nginx |
ckanext.fuseki.username |
admin |
Fuseki admin username — always admin (hardcoded by the Fuseki image) |
ckanext.fuseki.password |
admin |
Fuseki admin password — must match the ADMIN_PASSWORD env var set on the Fuseki container |
ckanext.fuseki.ckan_token |
(empty) | CKAN API token for background job callbacks; required to process private datasets |
ckanext.fuseki.formats |
turtle text/turtle n3 nt hext trig longturtle xml json-ld ld+json jsonld |
Space-separated list of resource formats that trigger upload to the triple store |
ckanext.fuseki.ssl_verify |
true |
Verify SSL certificates when connecting to external resource URLs |
ckanext.fuseki.sparklis_url |
(empty) | If set, the query button redirects to this Sparklis instance instead of the built-in SPARQL UI |
Example Docker environment variables (set in .env):
CKANINI__CKANEXT__FUSEKI__URL=http://fuseki:${FUSEKI_PORT}/
CKANINI__CKANEXT__FUSEKI__USERNAME=admin
CKANINI__CKANEXT__FUSEKI__PASSWORD=<your-fuseki-password>
CKANINI__CKANEXT__FUSEKI__CKAN_TOKEN=<your-ckan-api-token>
CKANINI__CKANEXT__FUSEKI__SSL_VERIFY=${SSL_VERIFY}
ckanext.fuseki.url must be the container-internal address (e.g. http://fuseki:3030/), not the public nginx URL. CKAN uses this URL for all direct Fuseki API calls and the SPARQL proxy.
If ckanext.fuseki.ckan_token is not set, only public resources can be uploaded to the triple store.
Citation
If you use this software, please cite it. GitHub shows a "Cite this repository" button (top right of the repo page) that exports the CITATION.cff in APA or BibTeX format.
After the first Zenodo release, a DOI-specific BibTeX entry will be available on the Zenodo record. Until then:
@software{hanke_ckanext_fuseki,
author = {Hanke, Thomas},
title = {ckanext-fuseki},
url = {https://github.com/Mat-O-Lab/ckanext-fuseki},
license = {AGPL-3.0-or-later},
}
License
Acknowledgements
This project's work is based on a fork of the repo etri-odp/ckanext-jena, and we like to thank the authors of that project for sharing their work. It was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIT) (No.2017-00253, Development of an Advanced Open Data Distribution Platform based on International Standards)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ckanext_fuseki-1.1.0.tar.gz.
File metadata
- Download URL: ckanext_fuseki-1.1.0.tar.gz
- Upload date:
- Size: 109.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9751e9d0fec6c9782f6d3341fbf43df329ace904a645a9dd5efddfbbc93dde9
|
|
| MD5 |
ac559917a647dab9af2c6e1b429f026f
|
|
| BLAKE2b-256 |
7f67f4ea17482865d4f650a8250e516c153bb2a1ecd5b386cf1f6563f9e6e345
|
Provenance
The following attestation bundles were made for ckanext_fuseki-1.1.0.tar.gz:
Publisher:
pypi.yml on Mat-O-Lab/ckanext-fuseki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ckanext_fuseki-1.1.0.tar.gz -
Subject digest:
b9751e9d0fec6c9782f6d3341fbf43df329ace904a645a9dd5efddfbbc93dde9 - Sigstore transparency entry: 1144109069
- Sigstore integration time:
-
Permalink:
Mat-O-Lab/ckanext-fuseki@4d3369e593a1bf39672b2273f3a9629705248650 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/Mat-O-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@4d3369e593a1bf39672b2273f3a9629705248650 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ckanext_fuseki-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ckanext_fuseki-1.1.0-py3-none-any.whl
- Upload date:
- Size: 57.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b07e688bff3c0b7745199308cabf89b80028e48106fc6a05e99afa6f7fda7488
|
|
| MD5 |
a7d5bd462e7490df1e3801d93fb9ec45
|
|
| BLAKE2b-256 |
282dafd86e43f016a51e58df0784c2f8bcb5f112248c0d15b3d651a0024562cd
|
Provenance
The following attestation bundles were made for ckanext_fuseki-1.1.0-py3-none-any.whl:
Publisher:
pypi.yml on Mat-O-Lab/ckanext-fuseki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ckanext_fuseki-1.1.0-py3-none-any.whl -
Subject digest:
b07e688bff3c0b7745199308cabf89b80028e48106fc6a05e99afa6f7fda7488 - Sigstore transparency entry: 1144109102
- Sigstore integration time:
-
Permalink:
Mat-O-Lab/ckanext-fuseki@4d3369e593a1bf39672b2273f3a9629705248650 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/Mat-O-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@4d3369e593a1bf39672b2273f3a9629705248650 -
Trigger Event:
release
-
Statement type: