Skip to content

Commit 1fa5082

Browse files
committed
chore: mention about secrets
1 parent 9bd51ea commit 1fa5082

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ images](https://datashades.github.io/file-keeper/adapters/emulate/). Even
5050
though these images do not replicate ideally corresponding cloud provider,
5151
generally they are close enough to be used for local development and testing.
5252

53+
**Never use inline secrets in the config file. Use references to environment
54+
variables(like in examples below) or
55+
[ckanext-envvars](https://github.com/ckan/ckanext-envvars).**
56+
57+
5358
### ckan:s3
5459

5560
AWS S3 adapter. Wraps [file-keeper's implementation](https://datashades.github.io/file-keeper/adapters/s3/)
@@ -65,8 +70,8 @@ pip install 'ckanext-file-keeper-cloud[s3]'
6570
```ini
6671
ckan.files.storage.my_cloud.type = ckan:s3
6772
ckan.files.storage.my_cloud.bucket = my_bucket
68-
ckan.files.storage.my_cloud.key = ABC123
69-
ckan.files.storage.my_cloud.secret = 321CBA
73+
ckan.files.storage.my_cloud.key = %(CKAN_S3_KEY)s
74+
ckan.files.storage.my_cloud.secret = %(CKAN_S3_SECRET)s
7075
```
7176

7277
Only `bucket` option is required as all other parameters can be read from
@@ -93,8 +98,8 @@ pip install 'ckanext-file-keeper-cloud[azure]'
9398
```ini
9499
ckan.files.storage.my_cloud.type = ckan:azure_blob
95100
ckan.files.storage.my_cloud.container_name = my_container
96-
ckan.files.storage.my_cloud.account_name = ABC123
97-
ckan.files.storage.my_cloud.account_key = 321CBA
101+
ckan.files.storage.my_cloud.account_name = %(CKAN_AZURE_ACCOUNT)s
102+
ckan.files.storage.my_cloud.account_key = %(CKAN_AZURE_KEY)s
98103
```
99104

100105
Recommended options:
@@ -146,8 +151,8 @@ pip install 'ckanext-file-keeper-cloud[libcloud]'
146151
ckan.files.storage.my_cloud.type = ckan:libcloud
147152
ckan.files.storage.my_cloud.provider = S3
148153
ckan.files.storage.my_cloud.container_name = my_bucket
149-
ckan.files.storage.my_cloud.key = ABC123
150-
ckan.files.storage.my_cloud.secret = 321CBA
154+
ckan.files.storage.my_cloud.key = %(CKAN_CLOUD_KEY)s
155+
ckan.files.storage.my_cloud.secret = %(CKAN_CLOUD_SECRET)s
151156
```
152157

153158
Requires following options:

0 commit comments

Comments
 (0)