ckan / ckan/ckan-docker

Use a password generator for secure passwords

Open
#65 2 comments 0 reactions 1 assignee Claimed by @kowh-ai View on GitHub
Dominant language
Shell
Stars
151
Forks
279
PR merge metrics
No merged PRs in 30d

Description

Passwords are hardcoded in the `.env` file which is then used by docker compose to populate environment variables used in the running containers. These passwords are therefore pretty insecure. Therefore I propose to create a process to generate random secure passwords before the local images are built and before the containers start

The following environment variables will use the passwords generated

1. `POSTGRES_PASSWORD`
2. `CKAN_DB_PASSWORD`
3. `DATASTORE_READONLY_PASSWORD`
4. `CKAN_SYSADMIN_PASSWORD`

The passwords will be housed in a newly generated file which will have it's permissions locked down to just read-only by the file owner. This file (named `.pw`) can then be added to both ckan and db services in the `docker-compose.yml` file as follows:

![Screenshot 2023-07-10 at 2 47 15 pm](https://github.com/ckan/ckan-docker/assets/54408245/32c0bda0-48c7-4eaf-b294-f9bcbb98e5a4)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.