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

config: make user-config world readable #2804

Closed
wants to merge 1 commit into from

Conversation

lucasmoura
Copy link
Contributor

@lucasmoura lucasmoura commented Oct 20, 2023

Why is this needed?

To allow non-root users to see user-config changes performed by root users, we need to make the user-config file world-readable

Test Steps

Verify that the modified integration test and the manual test are passing

Checklist

  • I have updated or added any unit tests accordingly
  • I have updated or added any integration tests accordingly
  • Changes here need to be documented, and this was done in:

Does this PR require extra reviews?

  • Yes
  • No

To allow non-root users to see user-config changes
performed by root users, we need to make the user-config
file world-readable
Comment on lines +432 to +436
if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "30~"; then
if [ -f /var/lib/ubuntu-advantage/user-config.json ]; then
chmod 0644 /var/lib/ubuntu-advantage/user-config.json
fi
fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to continue the pattern of keeping the version migrations in order, so can you move this down after the if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "29~"; block?

@orndorffgrant
Copy link
Collaborator

Discussion decision: we shouldn't make this file world-readable because it may include proxy secrets. We want to fix the underlying bug properly and not rush it into this release. I'll create an issue then close this.

@orndorffgrant
Copy link
Collaborator

Issue is here #2809

@orndorffgrant orndorffgrant deleted the update-user-config-permission branch May 17, 2024 09:30
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.

2 participants