Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a non-root user for all application files/directories, use another non-root user to run the CKAN processes #79

Open
kowh-ai opened this issue Sep 6, 2024 · 1 comment · May be fixed by #80 or ckan/ckan-docker#172
Assignees

Comments

@kowh-ai
Copy link
Contributor

kowh-ai commented Sep 6, 2024

One of the things that can increase security of the CKAN images/containers is to have a non-root user own all files and directories that are part of the application. Also to have another non-root user run the CKAN processes

This will be part the work on enhancements for a more production like environment

Repo: ckan-docker-base

For CKAN 2.10, 2.11 and master images (base and dev)

User: ckan-sys (id=502)- owns the files/directories that are part of the application and supporting libraries

User: ckan (id=503) - runs the application processes, owns files and directories it needs write access to

The primary group for the ckan-sys and ckan users is ckan-sys (id=503) - this is so if more granular write access for both users is needed in the future then this group could be used to do that

The following directories/file are required to be owned by the ckan-sys and ckan user:

ckan-sys
/srv/app/*
/docker-entrypoint.d/*
/usr/local/*

ckan
/srv/app/ckan.ini
/srv/app/src/*
/var/lib/ckan/*
/srv/app/src_extensions/ (for Development)

Repo: ckan-docker

The following directories/file are required to be owned by the ckan-sys user:

ckan-sys
/docker-entrypoint.d/
/srv/app/patches/*

@kowh-ai kowh-ai self-assigned this Sep 6, 2024
@kowh-ai
Copy link
Contributor Author

kowh-ai commented Sep 9, 2024

I will also include instructions on how to login to the running ckan container as the ckan-sys user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant