ckanext-ssm-config
CKAN extension to interpolate config values from Amazon SSM Parameter Store.
Useful for managed environments where secrets (Beaker session key, XLoader tokens, reCAPTCHA keys) should be stored outside config management.
Features
- Placeholder syntax:
${ssm:/path/to/value} or {{ssm:/path/to/value}}
- Fallback values:
{{ssm:/path/to/value:default_value}}
- Auto-load all SSM parameters under a prefix into CKAN config (slashes converted to dots)
- Runtime resolution of config values from AWS Parameter Store
Requirements
- CKAN 2.9, 2.10, 2.11, or master (2.12)
- boto3
- IAM permissions for
ssm:GetParameter, ssm:GetParameters, ssm:GetParametersByPath
Installation
- Activate your CKAN virtual environment.
- Install from PyPI:
pip install ckanext-ssm-config
- Add
ssm_config to the ckan.plugins setting in your CKAN config file.
Config settings
ckanext.ssm_config.region_name = ap-southeast-2
ckanext.ssm_config.prefix = /ckan/production/
ckanext.ssm_config.aws_access_key_id = YOUR_KEY
ckanext.ssm_config.aws_secret_access_key = YOUR_SECRET
Usage example in ckan.ini:
beaker.session.secret = ${ssm:/ckan/beaker_session_secret}
ckanext.xloader.api_token = {{ssm:/ckan/xloader_token:default_token}}
Note: DB passwords cannot be handled since they are read before the plugin loads.
Developed for data.qld.gov.au and publications.qld.gov.au.
License
AGPL-3.0