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

Change owner of /opt/keypass files #193

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

rg2011
Copy link
Contributor

@rg2011 rg2011 commented Sep 16, 2024

Previous versions of keypass (1.9.0 and below) had all files in /opt/keypass belong to UID 1000. This made it possible to run the container with an unprivileged user (UID 1000).

Version 1.11.0 dropped the chown from the Dockerfile and had all files in /opt/keypass owned by root. Since the keypass-entrypoint.sh performs some inline changes with sed -i in /opt/keypass/config.yml, it requires keypass to be run as root (UID 0).

Changing the security profile impacts on the policies in container orchestration environments such as openshift. We could modify our security policies, but believe that actually keypass can run as un unprivileged user just fine, as long as it is the owner of the /opt/keypass folder and subfolders.

This PR restores ownership of the /opt/keypass folder to UID 1000, keeping backward compatibility with the security policy configured for keypass 1.9.0.

Previous versions of keypass (1.9.0 and below) had all files in `/opt/keypass` belong to UID 1000. This made it possible to run the container with an unprivileged user (1000).

Version 1.11.0 dropped the `chown` from the Dockerfile and had all files in /opt/keypass owned by root.

Since the `keypass-entrypoint.sh` performs some inline changes with `sed -i` in `/opt/keypass/config.yml`, it has to be run as root. Which breaks some security constraints in openshift.

This PR restores ownership of the `/opt/keypass` folder to UID 1000, keeping backward compatibility with the security policy configured for keypass 1.9.0
@AlvaroVega
Copy link
Member

it was done when Dockerfile was moved from Centos to debian

Copy link
Member

@AlvaroVega AlvaroVega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlvaroVega AlvaroVega merged commit d1028a5 into telefonicaid:master Sep 16, 2024
@fgalan
Copy link
Member

fgalan commented Sep 17, 2024

Changelog was missing. Included in a nesxt PR #194

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

Successfully merging this pull request may close these issues.

3 participants