Skip to content

Fix AppArmor issue & have safe perms for config #736

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

Merged
merged 1 commit into from
Dec 6, 2020
Merged

Fix AppArmor issue & have safe perms for config #736

merged 1 commit into from
Dec 6, 2020

Conversation

rany2
Copy link
Contributor

@rany2 rany2 commented Oct 11, 2020

The AppArmor profile in contrib forbids /usr/bin/yggdrasil from reading the file in /var/backups/yggdrasil.conf.... This works around that restriction by having the shell do the reading of /var/backups/yggdrasil.conf... file while providing the same exact functionality without making the AppArmor profile less restrictive.

Another change is the safe perms for the /etc/yggdrasil.conf (so that config will have 0640 permissions). This is important because if we kept the default of 644 then any user (privileged or unprivileged) will have the ability to read the yggdrasil private key. We use a restrictive umask of 0027 to make this possible.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The AppArmor profile in contrib forbids `/usr/bin/yggdrasil` from reading the file in `/var/backups/yggdrasil.conf...`. This works around that restriction by having the shell do the reading of `/var/backups/yggdrasil.conf...` file while providing the same exact functionality without making the AppArmor profile less restrictive. 

Another change is the safe perms for the `/etc/yggdrasil.conf` (so that config will have 0640 permissions). This is important because if we kept the default of 644 then any user (privileged or unprivileged) will have the ability to read the yggdrasil private key. We use a restrictive umask of 0027 to make this possible.
@neilalexander neilalexander changed the base branch from master to develop October 11, 2020 10:27
@rany2
Copy link
Contributor Author

rany2 commented Oct 11, 2020

Regarding the AppArmor issues. This will not enable the AppArmor profile. All it does is provide fixes for the users of the AppArmor profile in contrib while not affecting anyone who doesn't use the AppArmor profile

@neilalexander neilalexander merged commit 5b326d8 into yggdrasil-network:develop Dec 6, 2020
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.

None yet

2 participants